Time Left - 15:00 mins

OS Rapid Quiz - 1 (App update required to attempt this test)

Attempt now to get your rank among 803 students!

Question 1

Match the following groups.
Group-I (Scheduling)
A- FCFS
B- SJF
C- Priority scheduling
D- RR scheduling
Group-II (Advantage)
1- Used in time sharing system
2- More reactive, used in real time system
3- Minimizes average turn around time
4- Very simple, next process can be selected quickly

Question 2

Consider a system having 'n' resources of the same type. These resources are shared by 3 processes X, Y and Z, which have peak time demands of 5, 6 and 4 respetively. The minimum value of 'n' that ensures that deadlock will never occur given that the combined maximum resource requirement of processes Y and Z at any time is 10 will be ______.

Question 3

A file system uses an in-memory cache to cache disk blocks. The miss rate of the cache is shown in the figure. The latency to read block from the cache is 1ms and to read a block from the disk is 10 ms. Assume that the cost of checking whether a block exists in the cache is negligible. Available cache sizes are in multiples of 10 MB.

The smallest cache size required to ensure an average read latency of less than 6 ms is ____ MB.

Question 4

Consider a paging system with a 32-bit virtual address space. Each address refers to a byte in memory.
Let the page size be 16 KB, and the main memory size be 256 MB. What is minimum size of page table in MB? Assume page table entry has atleast 2 protection bits.

Question 5

consider the following pseudo code.
main()
{
int t1=0, t2=0, t3=0;
t1=fork(); // fork 1
t2=fork(); // fork 2
if(t1!=0)
{
t3= fork(); // fork 3
printf(“0”);
}
}
How many 0’s are printed when above code is executed.

Question 6

Suppose two processes P and Q are as follows where m1, m2 and m3 are binary semaphores having values m1=1, m2=0, m3=1.
P: Q:
While (1) While (1)
{ {
A C
P (m3); P (m3);
Print (0); Print (1);
V (m3); V (m3);
B D
} }
For output “010101”, what will be the correct option for A, B, C, D?
  • 803 attempts
  • 2 upvotes
  • 2 comments
Apr 10GATE & PSU CS