Operating Systems questions

Q20

GATE CS 2014 CS-2File SystemsNAT1 mark
A FAT (file allocation table) based file system is being used and the total overhead of each entry in the FAT is 4 bytes in size. Given a 100×106100 \times 10^6 bytes disk on which the file system is stored and data block size is 10310^3 bytes, the maximum size of a file that can be stored on this disk in units of 10610^6 bytes is ____________.
Show answer without attempting

Answer: 99.55 to 99.65

Q31

GATE CS 2014 CS-2Concurrency and SynchronizationMCQ2 marks−2/3 if wrong
Consider the procedure below for the Producer-Consumer problem which uses semaphores:
semaphore n = 0;
semaphore s = 1;

void producer()
{
    while(true)
    {
        produce();
        semWait(s);
        addToBuffer();
        semSignal(s);
        semSignal(n);
    }
}

void consumer()
{
    while(true)
    {
        semWait(s);
        semWait(n);
        removeFromBuffer();
        semSignal(s);
        consume();
    }
}
Which one of the following is TRUE?
Show answer without attempting

Answer: C

Q32

GATE CS 2014 CS-2SchedulingNAT2 marks
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 tct_c CPU milliseconds and then initiates a single I/O operation that lasts for tiot_{io} 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:
Process idtct_ctiot_{io}
A100 ms500 ms
B350 ms500 ms
C200 ms500 ms
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 ___________.
Show answer without attempting

Answer: 1000

Q33

GATE CS 2014 CS-2Memory ManagementMCQ2 marks−2/3 if wrong
A computer has twenty physical page frames which contain pages numbered 101 through 120. Now a program accesses the pages numbered 1, 2, …, 100 in that order, and repeats the access sequence THRICE. Which one of the following page replacement policies experiences the same number of page faults as the optimal page replacement policy for this program?
Show answer without attempting

Answer: D

Q20

GATE CS 2014 CS-3Memory ManagementNAT1 mark
A system uses 3 page frames for storing process pages in main memory. It uses the Least Recently Used (LRU) page replacement policy. Assume that all the page frames are initially empty. What is the total number of page faults that will occur while processing the page reference string given below?

4,7,6,1,7,6,1,2,7,24, 7, 6, 1, 7, 6, 1, 2, 7, 2
Show answer without attempting

Answer: 6

Q31

GATE CS 2014 CS-3DeadlocksNAT2 marks
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 _________.
Show answer without attempting

Answer: 7

Q32

GATE CS 2014 CS-3SchedulingNAT2 marks
An operating system uses shortest remaining time first scheduling algorithm for pre-emptive scheduling of processes. Consider the following set of processes with their arrival times and CPU burst times (in milliseconds):
ProcessArrival TimeBurst Time
P1012
P224
P336
P485
The average waiting time (in milliseconds) of the processes is _________.
Show answer without attempting

Answer: 5.5

Q33

GATE CS 2014 CS-3Memory ManagementNAT2 marks
Consider a paging hardware with a TLB. Assume that the entire page table and all the pages are in the physical memory. It takes 10 milliseconds to search the TLB and 80 milliseconds to access the physical memory. If the TLB hit ratio is 0.6, the effective memory access time (in milliseconds) is _________.
Show answer without attempting

Answer: 122

Q19

GATE CS 2014 CS-1SchedulingNAT1 mark
Suppose a disk has 201 cylinders, numbered from 0 to 200. At some time the disk arm is at cylinder 100, and there is a queue of disk access requests for cylinders 30, 85, 90, 100, 105, 110, 135 and 145. If Shortest-Seek Time First (SSTF) is being used for scheduling the disk access, the request for cylinder 90 is serviced after servicing ____________ number of requests.
Show answer without attempting

Answer: 3

Q20

GATE CS 2014 CS-1Processes and ThreadsMCQ1 mark−1/3 if wrong
Which one of the following is FALSE?
Show answer without attempting

Answer: D

Q31

GATE CS 2014 CS-1DeadlocksMCQ2 marks−2/3 if wrong
An operating system uses the Banker's algorithm for deadlock avoidance when managing the allocation of three resource types X, Y, and Z to three processes P0, P1, and P2. The table given below presents the current system state. Here, the Allocation matrix shows the current number of resources of each type allocated to each process and the Max matrix shows the maximum number of resources of each type required by each process during its execution.
Allocation XAllocation YAllocation ZMax XMax YMax Z
P0001843
P1320620
P2211333
There are 3 units of type X, 2 units of type Y and 2 units of type Z still available. The system is currently in a safe state. Consider the following independent requests for additional resources in the current state:

REQ1: P0 requests 0 units of X, 0 units of Y and 2 units of Z
REQ2: P1 requests 2 units of X, 0 units of Y and 0 units of Z

Which one of the following is TRUE?
Show answer without attempting

Answer: B

Q32

GATE CS 2014 CS-1SchedulingNAT2 marks
Consider the following set of processes that need to be scheduled on a single CPU. All the times are given in milliseconds.
Process NameArrival TimeExecution Time
A06
B32
C54
D76
E103
Using the shortest remaining time first scheduling algorithm, the average process turnaround time (in msec) is ____________________.
Show answer without attempting

Answer: 7.2

Q33

GATE CS 2014 CS-1Memory ManagementNAT2 marks
Assume that there are 3 page frames which are initially empty. If the page reference string is 1, 2, 3, 4, 2, 1, 5, 3, 2, 4, 6, the number of page faults using the optimal replacement policy is__________.
Show answer without attempting

Answer: 7

0/130 correct0 marks

Related topics in GATE CS