0% found this document useful (0 votes)
108 views3 pages

CSE321 Fall 2023 Final Question Set A 1

Operating system

Uploaded by

khossain201308
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
108 views3 pages

CSE321 Fall 2023 Final Question Set A 1

Operating system

Uploaded by

khossain201308
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 3
Duration: 1 Hour 45 Minutes co4 Department of Computer Science and Engineering Final Examination Fall 2023 CSE 321: Operating Systems Answer the following questions. Figures in the right margin indicate marks. a) A super shop has launched year-end sales on all their products. To avail the offer so many customers went there and purchased products as per their preferences. The issue occurred when they started the procedure of bill payment. There are 3 counters for paying bills but the number of customers waiting for completing payment is 50. Explain with proper logic, what issue has been raised in the above scenario and what will be the approach to provide proper synchronization to the issue according to the problem statement b) For the upcoming PMCO finals team “xyz” has arranged training sessions for players. In a training session a player needs to use a set of headphones and a mobile device together. The team can only facilitate a set of headphones and a mobile device to players for training. In a particular session 1 hour left for 2 players Alex and Zyoll. Each will get a 30 mins slot. But somehow Alex has captured the device and Zyoll has captured headphones at the same time and that is why nobody is able to make any progress in the training session. Logically explain what issue has occurred in the above scenario ¢) Ina system, following conditions are present. + There are 3 processes: P1, P2 and P3. + There is a semaphore, s=2. ‘+ Ready queue is in the following order, (P1, P2, P3] ‘* CPU allocation is managed by round robin scheduling algorithm with the time quantum of 6 ms. ‘+ Each statement takes 2 ms to execute. ‘+ Critical section contains 3 statements + Remainder section contains 2 statements. The structure of process Pi in solution using Semaphore: wait(s){ le(s: +//ousy wait dot wait (3)+ /{eritical section signal (s): //remainder section Jwhile (true); signal (s) ( + Total Marks: 40 A 3) 2] co4 cos Complete the table given below for processes P1, P2 and P3 using semaphore. Process 1 Process 2 Process 3 a) We have various ways to overcome deadlock in a system. Among these approaches is the strategy of ignoring it and relying on system restarts to resolve the deadlock. Despite the need for restarting the system, this method remains popular. Discuss why this strategy is commonly employed and mention the type of system that may utilize this method b) Suppose, in a workplace, we have a set of resource types, R = {R1, R2, R3, R4} and a set of processes, P = {P1, P2, P3, P4}, R1, R2, R3, and R4 have 2, 2, 2, and 2 instances respectively. + PLis holding 1 instance of R4 + P2is holding 1 instance of R1 + P3is holding 1 instance of R1 + P4is holding 1 instance of R4 + P4 holding 1 instance of R2 + P2 requests 1 instance of R3 ‘+ P2is holding 1 instance of R2 + Plis requests 1 instance of RI ‘+ P3is holding 1 instance of R3 + P4is holding 1 instance of R3 + P3 requests 1 instance of R4 + P4 requests 2 instances of RI Construct a resource allocation graph for the above scenario and identify the cycle (if any) and decide whether there is a deadlock or not. a) Arrays are stored in contiguous memory locations to optimize access to array elements, yet allocating processes in contiguous memory locations is discouraged. Explain why this is not recommended in terms of space complexity. 6) 8) [4] Bl cos b) A system with an associative lookup time of 7ns, and memory access time of 59ns, what should be the approximate hit ratio to achieve Effective Access Time of 92ns? } Assume that, page size of a process is 8 bytes and size of the main memory is 72 bytes. Logical memory and page table of the process are given below, Logical Memory PMT Page# | Data [Ponow | Frame Main memory PO a po (a Pi be pt 6 Pz wi t p2 [7 Pa de b = a ps [a3 Pe 7 pa [at ps |s How can the user's memory? Find out corresponding physical addresses of the following logical addresses ~ 18(10010), 44(101100) and 27(11011) of memory be mapped into the main ) If the page size is 9 KB, how many frames will be needed in Main memory for a process size of 83,645 Bytes? Is there any internal fragmentation? - If yes, calculate the value, [1 KB = 1024 Bytes] ) In a particular time, the snapshot of Main memory given below for dynamic partitioning where gray portions of the memory are representing occupied spaces. Apply worst fit and first fit algorithms to place processes with the space requirement of P1=600k, P2=400k, P3=348k, P4=200k, P5=52k, P6= 100k and P7=72k (in order). Explain which algorithm makes the most effective use ‘of memory? 800K [600K] 120K [ROOK] 400K | 522k a) Consider a computer with @ main memory that has 3 frames and page reference string of 0-7 page [0, 1, 6, 6, 4, 0, 0, 5, 5, 4]. The page reference string represents the order in which the pages are accessed by a program. Apply LRU & OPT algorithm to simulate the page replacement that occurs when the main memory can hold at most 3 pages at a time. Record the number of page faults and compare the result. Mention which algorithm performs better in this scenario, G3) ie) BI Ql 5) fa

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy