Time Left - 45:00 mins

GATE 2022: Subject Revision Quiz-4

Attempt now to get your rank among 362 students!

Question 1

Which of the following statements is correct when user-level threads are compared to Kernel-level threads?

Question 2

Which of the following scheduling algorithms is non-preemptive?

Question 3

Which of the following is NOT a valid deadlock prevention scheme?

Question 4

Three processes A, B, C uses binary semaphores x, y, z to
synchronize between them as shown below. All the semaphores are initialized to 1

Question 5

Consider the following data:

Suppose round robin scheduling is applied on the given data with time quantum=2 units. It is also given that scheduling of a process or context switch will take 1 unit of time. What is the completion time and turnaround time of process P4?

Question 6

Lets consider a classical problem in IPC which takes place in a barber shop. The barber shop has 1 barber and n chairs for its customers. If there are no customers, barber sleeps and customer on arrival wakes up the sleeping barber or wait sitting on a chair if the barber is busy. If all the chairs are full, the customer leaves the shop. The below given solution uses three semaphores, cust: counts the total no of waiting customers, mutex: used for mutual exclusion and idle: 0 if barber is busy and 1 if he is sleepy. There are two processes, barber and customer. Semaphore cust is initialised with 0, idle is initialised with 0 and mutex with 1. A shared variable free is intialised to N which denotes the number of free seats. Given below is the description of each process,

The statements at A, B and C are:

Question 7

Consider the following two concurrent processes with a shared memory variable x. Assume x is initialized to 10.

The maximum possible value of x when both processes have completed __________.

Question 8

A system contains three programs and each requires three tape units for its operation. The minimum number of tape units which the system must have such that deadlocks never arise is a _________.

Question 9

Consider a virtual memory system with 34- bit address and page-size is 2 kB. How many entries does an inverted page table need for thye system with 64 MB physical memory?

Question 10

Consider five processes of sizes 678 KB, 124 KB, 256 KB, 450 KB and 430 KB and seven memory partitions of size 400 KB, 200 KB, 150 KB, 800 KB, 500 KB, 460 KB, 700 KB.
If the best-fit algorithm is used, total size of left out partitions not alloted to any process is:

Question 11

A file system with 300 GByte disk uses a file descriptor with 8 direct block addresses, 1 indirect block address and 1 doubly indirect block address. The size of each disk block is 128 Bytes and the size of each disk block address is 8 Bytes. The maximum possible file size in this file system is

Question 12

For the processes listed in the following table, preemptive shortest remaining time first scheme is used for scheduling.

The average waiting time of these processes is

Question 13

A shared variable x, initiated to zero, is operated on by four concurrent processes A, B, C, D as follows. Each of the processes A and B reads x from memory, decrement by two, stores it to memory and then terminates. Each of the processes C and D reads x from memory, increments by one, stores it to memory and then terminates. Each process before reading x invokes wait() operation on a counting semaphore S and invokes the signals operation on the semaphore S after storing x to memory, semaphore S is initialized to two. How many different possible values of x can be, after all processes complete execution?

Question 14

Consider the following statements regarding user - level and kernel - level thread-

1) Context switching is faster with kernel supported threads

2) User-level threads can be scheduled independently

3) User level threads are transparent to kernel

Which of the above statements are true?

Question 15

Assume that the following jobs are to be executed on a single processor system:

Calculate the throughput (P) and CPU utilization in percentage(Q) using the scheduling technique First Come First Serve. Give the value of 17*P+Q.

  • 362 attempts