Time Left - 30:00 mins

GATE 2020 : Revision Quiz -5 (App update required to attempt this test)

Attempt now to get your rank among 836 students!

Question 1

Three processes A, B and C each execute a loop of 100 iterations. In each iteration of the loop, a process performs a single computation that requires tc CPU milliseconds and then initiates a single I/O operation that lasts for tio milliseconds. It is assumed that the computer where the processes execute has sufficient number of I/O devices and the OS of the computer assigns different I/O devices to each process. Also, the scheduling overhead of the OS is negligible. The processes have the following characteristics:

The processes A, B, and C are started at times 0, 5 and 10 milliseconds respectively, in a pure time sharing system (round robin scheduling) that uses a time slice of 50 milliseconds. The time in milliseconds at which process C would complete its first I/O operation is ____.

Question 2


Above process arrive in the order P1, P2, P3 and are served in FCFS order. Then average waiting time is :

Question 3

A system has 6 identical resources and processes competing for them. Each process can request at most 2 resources. Which one of the following values of N could lead to a deadlock?

Question 4

Find the type of given grammar :

S -> #S | @ A#

A -> @ A @ | #B!A

B -> &B% | ! | e

Non Terminal (V) = { S , A , B }

Terminal (T) = { # , ! , @ , % , & }

Here e is epsilon or null symbol.

Question 5

Consider the following grammar :

r1 : S AA

r2 : A aA

r3 : A b

The LR(0) parse table for the above grammar is :

The above parsing table is used to parse the given input. Parsing is done with the help of stack. Find the maximum stack size required to parse the input 'aabb$'___________

Question 6

Fetch_And_Add(X, i) is an atomic Read-Modify-Write instruction that reads the value of memory location X, increments it by the value i, and returns the old value of X. It is used in the pseudocode shown below to implement a busy-wait lock. L is an unsigned integer shared variable initialized to 0. The value of 0 corresponds to lock being available, while any non-zero value corresponds to the lock being not available.
AcquireLock (L) {
while (Fetch_And_Add (L,1))
L = 1;
}
ReleaseLock (L) {
L = 0;
}
This implementation

Question 7

Which combination of the following features will suffice to characterize an OS as a multi-programmed OS? A. More than one program may be loaded into main memory at the same time for execution. B. If a program waits for certain events such as I/O, another program is immediately scheduled for execution. C. If the execution of a program terminates, another program is immediately scheduled for execution.

Question 8

A process executes the following code
For (i=0; i < n; i++) fork( );
The total number of child processes created is

Question 9

Draw the process state transition diagram of an OS in which (i) each process is in one of the five states: created, ready, running, blocked (i.e. sleep or wait), or terminated, and (ii) only non-preemptive scheduling is used by the OS. Label the transitions appropriately.

Question 10

Let S be the reference string and X, Y be the no. Of page fault occur using the optimal and LRU page replacement policies respectively. Let SR be the reverse of S, and X' and Y' be the no. Of page fault occur using the optimal and LRU page replacement policies respectively. Which of the following is true?

Question 11

A system that uses a two-level page table has 212 - byte pages and 36-bit virtual addresses. The first 8-bits of the address serve as the index into the first level page table.

The number of bits specify the second level index is ________?

Question 12

Consider a disk system with 120 cylinders. The request to access the cylinder occur in the sequence “92,11, 42,81,54,30,67, 89”. Assume that the head is currently at cylinder 40.The total number of cylinders traversed throughout serving the above request using SSTF algorithm is

Question 13

Consider the following table with 4 processes:

If the system is having 150 unit of resources, Identify the value of X and Y for which the system will not be safe?

Question 14

Let where (a, b) a=Start time, b=Finish time
Find the minimum number of machines required to schedule all the task.

Question 15

Consider the following table

Process P1 P2 P3 P4
Arrival Time 0 1 2 3
Service Time 6 3 1 4


Find the average turn around time when processes are scheduled with SRTF
  • 836 attempts
  • 3 upvotes
  • 7 comments
Jun 25GATE & PSU CS