Operating System |Gate-2008| previous year question|Set-13

Set-15 Operating System Questions

Operating System |Gate-2008|

  1. The data blocks of a very large file in the Unix file system are allocated using  : [GATE – 2008] 

a. contiguous allocation
b. linked allocation
c. indexed allocation
d. an extension of indexed allocation

Answer : d)


  1. Which of the following statements about synchronous and asynchronous I/O is NOT true? [GATE – 2008]

a. An ISR is invoked on completion of I/O in synchronous I/O but not in asynchronous I/O
b. In both synchronous and asynchronous I/O, an ISR (Interrupt Service Routine) is invoked after completion of the I/O
c. A process making a synchronous I/O call waits until I/O is complete, but a process making an asynchronous I/O call does not wait for
completion of the I/O
d. In the case of synchronous I/O, the process waiting for the completion of I/O is woken up by the ISR that is invoked after the completion of I/O

Answer : b)


  1. Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes? [GATE – 2008]

a. In deadlock prevention, the request for resources is always granted if the resulting state is safe
b. In deadlock avoidance, the request for resources is always granted if the result state is safe
c. Deadlock avoidance is less restrictive than deadlock prevention
d. Deadlock avoidance requires knowledge of resource requirements a priori

Answer : a)


  1. A process executes the following code for (i =0; i < n; i + +) for ( ); The total number of child processes created is  : [GATE – 2008]

a. n
b. 2n
c. (2n) – 1
d. (2n+1) – 1

Answer : c)


5. A processor uses 36 bit physical addresses and 32 bit virtual addresses, with a page frame size of 4 Kbytes. Each page table entry is of size 4 bytes. A three level page table is used for virtual to physical address translation, where the virtual address is used as follows

  • Bits 30-31 are used to index into the first level page table
  • Bits 21-29 are used to index into the second level page table
  • Bits 12-20 are used to index into the third level page table, and
  • Bits 0-11 are used as offset within the page

The number of bits required for addressing the next level page table (or page frame) in the page table entry of the first, second and third level page tables are respectively  : [GATE – 2008]

a. 20, 20 and 20
b. 24, 24 and 24
c. 24, 24 and 20
d. 25, 25 and 24

Answer : d)


6. Consider the execution of the following commands in a shell on a linux operating system system bash$cat alpha Mathematics bash$in alpha beta bash$ rm alpha bash$cat >> beta << SAME Information Technology SANE bash$ cat beta The output of the last command will be: [GATE – 2008]

a. Mathematics Information Technology SAME.
b. Information Technology SAME.
c. Information Technology.
d. Mathematics Information Technology.

Answer : b)


7. Assume that EA = (X)+ is the effective address equal to the contents of location X, with X incremented by one word length after the effective address is calculated; EA = −(X) is the effective address equal to the contents of location X, with X decremented by one word length before the effective address is calculated; EA = (X)− is the effective address equal to the contents of location X, with X decremented by one word length after the effective address is calculated. The format of the instruction is (opcode, source, destination), which means (destination ← source op destination). Using X as a stack pointer, which of the following instructions can pop the top two elements from the stack, perform the addition operation and push the result back to the stack. [GATE – 2008]

a. 6 and 1, 2, 3, 4
b. 7 and 1, 2, 4, 5
c. 8 and 1, 2, 4, 5
d. 9 and 1, 2, 3, 5

Answer  : b)


8. The following is a code with two threads, producer and consumer, that can run in parallel. Further, S and Q are binary semaphores equipped with the standard P and V operations. semaphore S = 1, Q = 0; integer x; producer:                            consumer: while (true) do                    while (true) do P(S);                                      P(Q); x = produce ();                    consume (x); V(Q);                                     V(S); done                                       done Which of the following is TRUE about the program above? [GATE – 2008]

a. The process can deadlock
b. One of the threads can starve
c. Values generated and stored in ‘x’ by the producer will always be consumed before the producer can generate a new value
d. Some of the items produced by the producer may be lost

Answer : c)


9. An operating system implements a policy that requires a process to release all resources before making a request for another resource. Select the TRUE statement from the following: [GATE – 2008]

a. Starvation can occur but deadlock cannot occur
b. Starvation cannot occur but deadlock can occur
c. Both starvation and deadlock can occur
d. Neither starvation nor deadlock can occur

Answer : a)


10. If the time-slice used in the round-robin scheduling policy is more than the maximum time required to execute any process, then the policy will : [GATE – 2008]

a. degenerate to shortest job first
b. degenerate to priority scheduling
c. degenerate to first come first serve
d. none of the above

Answer : c)
Operating System |Gate-2008|


11. Match the following flag bits used in the context of virtual memory management on the left side with the different purposes on the right side of the table below.[GATE – 2008]

 Name of the bit               Purpose
I.Dirtya.Page initialization
II.R/Wb.Write-back policy
III.Referencec.Page protection
IV.Validd.Page replacement policy

a. I-d, II-a, III-b, IV-c
b. I-b, II-c, III-a, IV-d
c. I-c, II-d, III-a, IV-b
d. I-b, II-c, III-d, IV-a

Answer : d)
Operating System |Gate-2008|


Back to GATE-HOME


Spread the love

Leave a Comment

Your email address will not be published. Required fields are marked *