Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

gate-os1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

GATE questions

1.State whether the following statement are TRUE or


FALSE with reason.
The Link-load-and-go loading scheme required less
storage space than the Link-and-go loading scheme.
(Y -1990)2M

Answer -true

2.Which page replacement policy sometimes leads to


more page faults when size of memory is increased?

(a) Optimal
(b) LRU
(c) FIFO
(d) None of those

Answer-C
Explanation
Belady's anomaly proves that in case of First in First Out
(FIFO) page replacement algorithm it is possible to have
more page faults when increaseing the no of page frames.
Bélády's anomaly is the phenomenon in which increasing
the number of page frames results in an increase in the
number of page faults for certain memory access patterns.
This phenomenon is commonly experienced when using the
first-in first-out page replacement algorithm
3.Match the pairs in the following question.
(Y -
List -I
(a)Virtual Memory
(b)Shared Memory
(c)Look-ahead buffer
(d)look-aside buffer
List -II
(p) Temporal Locality
(q) Spatial Locality
(r) Address translation (s) Mutual exclution
answer

a-q, b-s, c-p, d-r

4.Under paged memory management scheme


simple look and key memory protection arrangement
may still be required if the ..............processors do
not have address mapping hardware. (Y-1990)2M
A- input/output

5.Match the pairs in the following Question.


1990 Question - Marks 2
List-I
(A) Critical region
(B) Wait/Signal
(C) Working Set
(D) Deadlock
List-II
(p) Hoare's monitor
(q) Mutual exclution
(r) Principle of locality
(s) Circular Wait

Answer

A-q,B-p,C-r,D-s

6.The total size of address space is a virtual memory


systems is limited by (1991-2M)
(a) the length of MAR
(b) the available secondary storage
(c) the available main memory
(d) all of the above
(e) none of the above

Answer -b
7.In a Virtual Memory system, the address space
specified by the address lines of the CPU must be
__________ than the physical memory size and
__________ than the secondary storage size.
A. smaller, smaller

B. smaller, larger

C. larger, smaller

D. larger, larger

Answer - c

explanation :
memory < virtual memory < secondary memory
We can extend VM upto the size of disk(secondary memory).
8.The correct matching for the following pairs is
(A) Disk Scheduling (1) Round robin
(B) Batch Processing (2) SCAN
(C) Time sharing (3) LIFO
(D) Interrupt processing (4) FIFO
(y-1997)
Codes:
A B C D a
3 4 2 1 b 4
3 2 1 c 2 4
1 3 d 3 4 3
2

(A) a
(B) b
(C) c
(D) d

Explanation: Round-Robin is also called Time-sharing.

Disk Scheduling Algorithms are used to reduce the total seek


time of any request. SCAN is one of the Algorithms.

Interrupt processing is LIFO because when we are processing


an interrupt, we disable the interrupts originating from lower
priority devices so lower priority interrupts cannot be raised. If
an interrupt is detected then it means that it has higher priority
than currently executing interrupt so this new interrupt will
preempt the current interrupt so, LIFO.

Batch processing – FIFO


9.I/O redirection. (Y- 1997)

A.implies changing the name of a file


B. can be employed to use an existing file as input file
for a program
C.implies connecting 2programs through a pipe
D.None of the above

ANSWER-B

explanation :
Typically, the syntax of these characters is as follows,
using < to redirect input, and > to redirect output.
command1 > file1
executes command1, placing the output in file1, as
opposed to displaying it at the terminal, which is the
usual destination for standard output. This will
clobber any existing data in file1.
Using,
command1 < file1
executes command1, with file1 as the source of input, as
opposed to the keyboard, which is the usual source for
standard input.
command1 < infile > outfile
combines the two capabilities: command1 reads from
infile and writes to outfile.

10.When an interrupt occurs, an operating system


(Y- 1997)
(A) ignores the interrupt
(B) always changes state of interrupted process to
‘blocked’ and schedules another process
(C) always resumes execution of interrupted process
after processing the interrupt
(D) may change the state of interrupted process to
‘blocked’and schedule another process

Answer -D
explanation
Scheduler decides that the interrupted process will complete
execution or some other process will be executed.
If the interrupt signaled an I/O completion event, and at the
same time a high priority process came into Ready state then
the scheduler block the interrupted process and dispatch the
high priority process in the running state. If low priority process
comes into Ready state then scheduler dispatch the interrupted
process.

11.Which of the following devices should get higher


priority in assigning interrupts?(CS -1998)

(A) Hard disk


(B) Printer
(C) Keyboard
(D) Floppy disk

Answer: (C)

12.Listed below are some operating system


abstractions (in the left column) and the hardware
components or mechanism (in the right column) that
they are abstractions of. Which of the following
matching of pairs is correct?
A. Thread 1. Interrupt
B. Virtual address space 2. Memory
C. File system 3. CPU
D. Signal 4. Disk

(A) A-2, B-4, C-3, D-1


(B) A-1, B-2, C-3, D-4
(C) A-3, B-2, C-4, D-1
(D) A-4, B-1, C-2, D-3

Explanation:
1. Thread is handled by CPU.
2. Virtual address space (it is a set of virtual memory
addresses that a process can use) is associated with
memory management.
3. File System is used for disk management.
4. Interrupt is a type of signal.

13.Consider a disk pack with 16 surfaces, 128 tracks


per surface and 256 sectors per track. 512 bytes of
data are stored in a bit serial manner in a sector. The
capacity of the disk pack and the number of bits
required to specify a particular sector in the disk are
respectively:

(A) 256 Mbyte, 19 bits


(B) 256 Mbyte, 28 bits
(C) 512 Mbyte, 20 bits
(D) 64 Gbyte, 28 bit
Answer: (A)
Capacity of the disk = 16 surfaces X 128 tracks X 256
sectors X 512 bytes = 256 Mbytes.
To calculate number of bits required to access a sector,
we need to know total number of sectors.
Total number of sectors = 16 surfaces X 128 tracks X
256 sectors = 2^19
So the number of bits required to access a sector is 19.

14.Consider a disk drive with the following specifications:


16 surfaces, 512 tracks/surface, 512 sectors/track, 1 KB/
sector, rotation speed 3000 rpm. The disk is operated in
cycle stealing mode whereby whenever one byte word is
ready it is sent to memory; similarly, for writing, the disk
interface reads a 4 byte word from the memory in each
DMA cycle. Memory cycle time is 40 nsec. The
maximum
percentage of time that the CPU gets blocked during
DMA operation is: (CS-2005)
(A) 10
(B) 25
(C) 40
(D) 50
Answer: (B)

Explanation: Time takes for 1 rotation = 60/3000


It reads 512*1024 Bytes in one rotation.
Time taken to read 4 bytes = 153 ns
153 is approximately 4 cycles (160ns)
Percentage of time CPU gets blocked = 40*100/160 =
25
15.An application loads 100 libraries at start-up.
Loading each library requires exactly one disk access.
The seek time of the disk to a random location is
given as 10 ms. Rotational speed of disk is 6000 rpm.
If all 100 libraries are loaded from random locations
on the disk, how long does it take to load all libraries?
(The time to transfer data from the disk block once the
head has been positioned at the start of the block may
be neglected). (CS 2011 )
(A) 0.50 s
(B) 1.50 s
(C) 1.25 s
(D) 1.00 s
Answer: (B)
explanation
Since transfer time can be neglected, the average access time
is sum of average seek time and average rotational latency.
Average seek time for a random location time is given as 10
ms. The average rotational latency is half of the time needed for
complete rotation. It is given that 6000 rotations need 1 minute.
So one rotation will take 60/6000 seconds which is 10 ms.
Therefore average rotational latency is half of 10 ms, which is
5ms.
Average disk access time = seek time + rotational
latency
= 10 ms + 5 ms
= 15 ms
For 100 libraries, the average disk access time
will be 15*100 ms

You might also like