Computer Science and Information Technology
GATE CSE topic:operating-system PYQs
Build your understanding with focused practice from past exam papers.
Questions 51–60 of 65. Imported answers require independent review unless marked reviewed.
Question 41
Open questionCSNAT2 marksNeeds review
Consider the following for four processes with arrival times (in milliseconds) and their length of CPU bursts (in milliseconds) as shown below:
Process | P1 | P2 | P3 | P4 |
|---|---|---|---|---|
Arrival time | 0 | 1 | 3 | 4 |
CPU burst time | 3 | 1 | 3 | Z |
These processes are run on a single processor using preemptive Shortest Remaining Time First scheduling algorithm. If the average waiting time of the processes is 1 millisecond, then the value of Z is ________.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 42
Open questionCSNAT2 marksNeeds review
The index node (inode) of a Unix-like file system has 12 direct, one single-indirect and one double-indirect pointers. The disk block size is 4 kB, and the disk block address is 32-bits long. The maximum possible file size is (rounded off to 1 decimal place) ______ GB.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 10
Open questionCSMCQ1 markNeeds review
Consider a process executing on an operating system that uses demand paging. The average time for a memory access in the system is M units if the corresponding memory page is in memory, and D units if the memory access causes a page fault. It has been experimentally measured that the average time taken for a memory access in the process is X units.
Which one of the following is the correct expression for the page fault rate experienced by the process?
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 24
Open questionCSNAT1 markNeeds review
Consider a system with 3 processes that share 4 instances of the same resource type. Each process can request a maximum of K instances. Resource instances can be requested and released only one at a time. The largest value of K that will always avoid deadlock is ____.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 39
Open questionCSMCQ2 marksNeeds review
In a system, there are three types of resources: E, F and G. Four processes P₀, P₁, P₂ and P₃ execute concurrently. At the outset, the processes have declared their maximum resource requirements using a matrix named Max as given below. For example, Max[P₂,F] is the maximum number of instances of F that P₂ would require. The number of instances of the resources allocated to the various processes at any given state is given by a matrix named Allocation.
Consider a state of the system with the Allocation matrix as shown below, and in which 3 instances of E and 3 instances of F are the only resources available.
Allocation: P₀ (E=1, F=0, G=1); P₁ (E=1, F=1, G=2); P₂ (E=1, F=0, G=3); P₃ (E=2, F=0, G=0).
Max: P₀ (E=4, F=3, G=1); P₁ (E=2, F=1, G=4); P₂ (E=1, F=3, G=3); P₃ (E=5, F=4, G=1).
From the perspective of deadlock avoidance, which one of the following is true?
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 40
Open questionCSMCQ2 marksNeeds review
Consider the following solution to the producer-consumer synchronization problem. The shared buffer size is
. Three semaphores empty, full and mutex are defined with respective initial values of 0,
and 1. Semaphore empty denotes the number of available slots in the buffer, for the consumer to read from. Semaphore full denotes the number of available slots in the buffer, for the producer to write to. The placeholder variables, denoted by P, Q, R and S, in the code below can be assigned either empty or full. The valid semaphore operations are: wait() and signal().Producer: | Consumer: |
|---|---|
do {<br> wait(P);<br> wait(mutex);<br> //Add item to buffer<br> signal(mutex);<br> signal(Q);<br>} while(1); | do {<br> wait(R);<br> wait(mutex);<br> //Consume item from buffer<br> signal(mutex);<br> signal(S);<br>} while(1); |
Which one of the following assignments to P, Q, R and S will yield the correct solution?
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 53
Open questionCSNAT2 marksNeeds review
Consider a storage disk with 4 platters (numbered as 0, 1, 2 and 3), 200 cylinders (numbered as 0, 1, ..., 199) and 256 sectors per track (numbered as 0, 1, ..., 255). The following 6 disk requests of the form [sector number, cylinder number, platter number] are received by the disk controller at the same time:
[120, 72, 2], [180, 134, 1], [60, 20, 0], [212, 86, 3], [56, 116, 2], [118, 16, 1]
Currently the head is positioned at sector number 100 of cylinder 80, and is moving towards higher cylinder numbers. The average power dissipation in moving the head over 100 cylinders is 20 milliwatts and for reversing the direction of the head movement once is 15 milliwatts. Power dissipation associated with rotational latency and switching of head between different platters is negligible.
The total power consumption in milliwatts to satisfy all of the above disk requests using the Shortest Seek Time First disk scheduling algorithm is _____.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 7
Open questionCSMCQ1 markNeeds review
Which of the following is/are shared by all the threads in a process?
I. Program counter
II. Stack
III. Address space
IV. Registers
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 8
Open questionCSMCQ1 markNeeds review
In a file allocation system, which of the following allocation scheme(s) can be used if no external fragmentation is allowed?
I. Contiguous
II. Linked
III. Indexed
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 18
Open questionCSMCQ1 markNeeds review
Threads of a process share
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer