OS Merged
OS Merged
2.The operating system -----------and--------- the use of the hardware among the
various applications programs for the various users.
A. Controls , Coordinates
B.Control and Radiates
C.Use and Coordinate
D.Use and Radiate
3.The operating system acts as the --------------of these resources and allocates them
to specific programs and users as necessary for tasks.
A.Manager
B.Conductor
C.Router
D.Orientor
4.To speed up processing, jobs with similar needs were ------------together and were
run through the computer as a group.
A. batched
B.seperated
C.Connected
D.All
5.------------, in essence, uses the disk as a huge buffer, for reading as far ahead as
possible on input devices and for storing output files until the output devices are able
to accept them.
A. Spooling
B.Pooling
C.Scheduling
D.Dispatching
6.----------increases CPU utilization by organizing jobs such that the CPU always has
one to execute.
A. Multiprogramming
B.Singleprogramming
A. Multiprogramming
B.Singleprogramming
C.Object Oriented Programming
D.Structural Programming
A. Time-sharing
B.Multiprogramming
C.Object Oriented
D.Batch
9.A program that is loaded into memory and is executing is commonly referred to as
a----------------.
A. process
B.program
C.Primary Program
D.Secondary Program
10.----------operating system allows the many users to share the computer
simultaneously.
A. A time-shared
B. A Multiprogrammed
A.complex
B.Simple
C.Compatible
D.Easy
12.As hardware costs have decreased, it has once again become feasible to have a
computer system dedicated to a single user. These types of computer systems are
usually referred to as ---------------.
D.Babbage
13.Personal computers appeared in the --------s.
A.1970
B.1971
C.1972
D.1980
14.The goals of the personal Computer operating systems have changed with time;
instead of maximizing CPU and peripheral utilization, the systems opt for
maximizing user-------------------.
A.tightly coupled
B.loosely Coupled
C.Rightly coupled
D.wrongly coupled
16.Systems that are designed for graceful degradation are also called------------.
A. fault-tolerant
B.fault-intolerant
C.default-tolerant
D.tolerant
17.In multiple-processor systems ,------------- model is used , in which each processor
runs an identical copy of the operating system, and these copies communicate with
one another as needed.
A. symmetricmultiprocessing
B. asymmetricmultiprocessing
18.Some systems use---------------, in which each processor is assigned a specific
task.
A. asymmetric multiprocessing
B. symmetric multiprocessing
19.A---------- operating system has well-defined, fixed time constraints.
A. real-time
B. Half real-time
C.Full real-time
D.Null real-time
A. hard real-time
B. soft real-time
C. firm real-time
D. all real-time
21.-----------------is an achievable goal that is amenable to mixing with other types of
systems.
Ch 2 Process
1.----------------: The process is being created
A.New
B.Running
C.Waiting
D.Ready
3.----------------: The process is waiting for some event to occur (such as an I/O
completion or reception of a signal).
A.New
B.Running
C.Waiting
D.Ready
7.------------: The counter indicates the address of the next instruction to be executed
for this process.
A. Program counter
B.Program conector
C.Process counter
D.Process Connector
8. ---------------include accumulators, index registers, stack pointers, and general-
purpose registers, plus any condition-code information
A.CPU Registers
B.Program Counter
C.CPU Block Control
D. Register CPU
9.As processes enter the system, they are put into a ------queue.
A.job
B.Device
C.Memory
D.CPU
10.A----------- will contain pointers to the first and last PCBs in the list.
A. ready-queue header
B. device-queue header
C. program
D. job-queue header
11.A----------- migrates between the various scheduling queues throughout its
lifetime.
A. process
B. program Queue
C.Device
D.Memory
12.If it takes 10 milliseconds to decide to execute a process for 100 milliseconds,
then 10/(100 + 10) = 9 percent of the CPU is being used (wasted) simply for-----------
-- the work.
A. scheduling
B. Memory Management
C.Dispataching
D. I/O operation
13.The-------- controls the degree of multiprogramming (the number of processes in
memory).
A. long-term scheduler
B. short-term scheduler
C. Medium-term scheduler
D.Semi Short-term scheduler
14.An ---------is one that spends more of its time doing I/0 than it spends doing
computations.
A.I/O-bound process
B.CPU-bound process
C.Memory-bound process
D.Storage-bound process
15.A, ------------- is one that generates I/O requests infrequently, using more of its
time doing computation than an I/O-bound process uses.
A.CPU-bound process
B.I/O-bound process
C.Memory-bound process
D.Storage-bound process
16.Switching the CPU to another process requires saving the state of the old process
and loading the saved state for the new process. This task is known as a -------.
A.context switch
B.cortext switch
C.context match
D.memory switch
17.----------time is pure overhead, because the system does no useful work while
switching.
A.context switch
B.cortext switch
C.context match
D.memory switch
18.When a process------------- a new process, two possibilities exist in terms of
execution:
1. The parent continues to execute concurrently with its children.
2. The parent waits until some or all of its children have terminated.
There are also two possibilities in terms of the address space of the new
process:
3. The child process is a duplicate of the parent process.
4. The child process has a program loaded into it.
A. creates
B.deletes
C.Terminates
D.sends
19.A parent may----------- the execution of one of its children for a variety of reasons,
such as:
1. The child has exceeded its usage of some of the resources it has been
allocated.
2. The task assigned to the child is no longer required.
3. The parent is exiting, and the operating system does not allow a child to
continue if its parent terminates.
A. terminate
B.create
C.Send
D.pause
20.If a process terminates (either normally or abnormally), then all its children must
also be terminated. This phenomenon is referred to as------------ and is normally
initiated by the operating system.
A. cascading termination
B. regular termination
C. irregular termination
D. faulty termination
21.A process is -------if it cannot affect or be affected by the other processes
executing in the system.
A.independent
B.cooperating
C.inner
D.Outer
22.a process is cooperating if it can affect or be affected by the other processes
executing in the system.
A.cooperating
B. independent
C.inner
D.Outer
23.A producer process produces information that is consumed by a consumer
process.
A.producer,consumer
B.producer,producer
C.consumer,producer
D.consumer,consumer
24.A, ---------sometimes called a lightweight process (LWP), is a basic unit of CPU
utilization, and consists of a program counter, a register set, and a stack space.
A. thread
B.thorn
C.Server
D.Memory
25.The---------- are scheduled by the kernel's scheduler and execute on the CPU or
CPUs in the system.
A. kernel threads
B. User threads
C. Device threads
D. kernel
Chapter 3
PROCESS SCHEDULING
1.An I/O-bound program would typically have many very-------- CPU bursts.
A. short
B.Long
C.Medium
D.Perfect
2.A CPU-bound program might have a few very -------- CPU bursts.
A. Long
B.short
C.Medium
D.Perfect
3.The---------- selects from among the processes in memory that are ready to execute,
and allocates the CPU to one of them.
A. scheduler
B. Dispatcher
C.Allocator
D.Priotiser
5.Under----------- scheduling, once the CPU has been allocated to a process, the
process keeps the CPU until it releases the CPU either by terminating or by switching
to the waiting state.
A. nonpreemptive
B.preemptive
C.nonproductive
D.productive
6.The-------- is the module that gives control of the CPU to the process selected by
the short-term scheduler.
A. dispatcher
B.scheduler
C.mover
D.deadlock
7.The time it takes for the dispatcher to stop one process and start another running is
known as the--------------.
A. dispatch latency
B.shecule latency
C. Memory access latency
D.context swtich Latency
8.One measure of work is the number of processes that are completed per time unit,
called--------------.
A. throughput
B.cpu utilization
C.Dispatch Latency
D.thoughput
9.The interval from the time of submission of a process to the time of completion is
the ----------------------.
A.turnaround time
B.Waiting Time
C.Avg waiting Time
D.Avg. Turn around Time
10.------------is the sum of the periods spent waiting in the ready queue.
A. Waiting time
B. Turn around Time
C.Dispatch Time
D.throughpu Time
11.-------------, is the amount of time it takes to start responding, but not the time that
it takes to output that response.
A. response time
B. Waiting Time
C.Turn around Time
D.execution Time
12.With ------------- scheme, the process that requests the CPU first is allocated the
CPU first.
A.FCFS
B.SJF
C.SRTF
D.RR
13.The FCFS scheduling algorithm is------------. Once the CPU has been allocated to
a process, that process keeps the CPU until it releases the CPU, either by terminating
or by requesting I/O.
A. nonpreemptive
B.Preemptive
C.Productive
D.Recursive
14.The FCFS algorithm is particularly troublesome for------ systems, where it is
important that each user get a share of the CPU at regular intervals.
A. time-sharing
B.multiprogramming
C.time-reducing
D.time spending
15.In------- ,When the CPU is available, it is assigned to the process that has the
smallest next CPU burst.
A. SJF
B.FCFS
C.Priority
D.RR
16.In SJF, if two processes have the same length next CPU burst,---- scheduling is
used to break the tie.
A. FCFS
B.SJF
C.Priority
D.RR
17.The SJF scheduling algorithm is provably optimal, in that it gives the--------
average waiting time for a given set of processes.
A. minimum
B.Maximum
C.50-50
D.Largest
18.SJF scheduling is used frequently in--------- scheduling.
A. long-term
B.Medium
C.Right term
D.Wrong turn
19.A-------- algorithm will preempt the currently executing process, whereas a---------
-- algorithm will allow the currently running process to finish its CPU burst.
A. preemptive SJF, nonpreemptive SJF
B.nonpreemptive SJF, preemptive SJF
C.preemptive SJF, preemptive SJF
D.nonpreemptive SJF, nonpreemptive SJF
2. When several processes access the same data concurrently and the outcome of the
execution depends on the particular order in which the access takes place, is called
a) dynamic condition
b) race condition
c) essential condition
d) critical condition
7. When high priority task is indirectly preempted by medium priority task effectively
inverting the relative priority of the two tasks, the scenario is called
a) priority inversion
b) priority removal
c) priority exchange
d) priority modification
15.The link between two processes P and Q to send and receive messages is called :
a) communication link
b) message-passing link
c) synchronization link
d) All of these
16. Which of the following are TRUE for direct communication :(choose two)
a) A communication link can be associated with N number of process(N = max.
number of processes supported by system)
b) A communication link can be associated with exactly two processes
c) Exactly N/2 links exist between each pair of processes(N = max. number of
processes supported by system)
d) Exactly one link exists between each pair of processes
14) For a deadlock to arise, which of the following conditions must hold
simultaneously ? ( choose all that apply )
a) Mutual exclusion
b) Starvation
c) Hold and wait
d) No preemption
e) Circular wait
20) To ensure that the hold and wait condition never occurs in the system, it must be
ensured that :
a) whenever a resource is requested by a process, it is not holding any other resources
b) each process must request and be allocated all its resources before it begins its
execution
c) a process can request resources only when it has none
d) All of these
21) The disadvantage of a process being allocated all its resources before beginning
its execution is :
a) Low CPU utilization
b) Low resource utilization
c) Very high resource utilization
d) None of these
22) To ensure no preemption, if a process is holding some resources and requests
another resource that cannot be immediately allocated to it :
a) then the process waits for the resources be allocated to it
b) the process keeps sending requests until the resource is allocated to it
c) the process resumes execution without the resource being allocated to it
d) then all resources currently being held are preempted
23) One way to ensure that the circular wait condition never holds is to :
a) impose a total ordering of all resource types and to determine whether one
precedes another in the ordering
b) to never let a process acquire resources that are held by other processes
c) to let a process wait for only one resource at a time
d) All of these
24) Each request requires that the system consider the __________, _____________,
____________ to decide whether the current request can be satisfied or must wait to
avoid a future possible deadlock. (choose three)
a) resources currently available
b) processes that have previously been in the system
c) resources currently allocated to each process
d) future requests and releases of each process
25) Given a priori information about the ________ number of resources of each type
that maybe requested for each process, it is possible to construct an algorithm that
ensures that the system will never enter a deadlock state.
a) minimum
b) average
c) maximum
d) approximate
30) A system has 12 magnetic tape drives and 3 processes : P0, P1, and P2. Process
P0 requires 10 tape drives, P1 requires 4 and P2 requires 9 tape drives.
Process
P0
P1
P2
Maximum needs (process-wise : P0 through P2 top to bottom)
10
4
9
Currently allocated (process-wise)
5
2
2
Which of the following sequence is a safe sequence ?
a) P0, P1, P2
b) P1, P2, P0
c) P2, P0, P1
d) P1, P0, P2
32) The resource allocation graph is not applicable to a resource allocation system :
a) with multiple instances of each resource type
b) with a single instance of each resource type
c) Both a and b
33) The Banker’s algorithm is _____________ than the resource allocation graph
algorithm.
a) less efficient
b) more efficient
c) None of these
34) The data structures available in the Banker’s algorithm are : (choose all that
apply)
a) Available
b) Need
c) Allocation
d) Maximum
e) Minimum
f) All of these
37) The wait-for graph is a deadlock detection algorithm that is applicable when :
a) all resources have a single instance
b) all resources have multiple instances
c) both a and b
41) The disadvantage of invoking the detection algorithm for every request is :
a) overhead of the detection algorithm due to consumption of memory
b) excessive time consumed in the request to be allocated memory
c) considerable overhead in computation time
d) All of these
42) A deadlock eventually cripples system throughput and will cause the CPU
utilization to ______.
a) increase
b) drop
c) stay still
d) None of these
43) Every time a request for allocation cannot be granted immediately, the detection
algorithm is invoked. This will help identify : (choose all that apply)
a) the set of processes that have been deadlocked
b) the set of processes in the deadlock queue
c) the specific process that caused the deadlock
d) All of these
44) A computer system has 6 tape drives, with ‘n’ processes competing for them.
Each process may need 3 tape drives. The maximum value of ‘n’ for which the
system is guaranteed to be deadlock free is :
a) 2
b) 3
c) 4
d) 1
45) A system has 3 processes sharing 4 resources. If each process needs a maximum
of 2 units then, deadlock :
a) can never occur
b) may occur
c) has to occur
d) None of these
46) ‘m’ processes share ‘n’ resources of the same type. The maximum need of each
process doesn’t exceed ‘n’ and the sum of all their maximum needs is always less
than m+n. In this setup, deadlock :
a) can never occur
b) may occur
c) has to occur
d) None of these
47) A deadlock can be broken by : (choose all that apply)
a) abort one or more processes to break the circular wait
b) abort all the process in the system
c) preempt all resources from all processes
d) to preempt some resources from one or more of the deadlocked processes
48) The two ways of aborting processes and eliminating deadlocks are : (choose all
that apply)
a) Abort all deadlocked processes
b) Abort all processes
c) Abort one process at a time until the deadlock cycle is eliminated
d) All of these
50) The process to be aborted is chosen on the basis of the following factors : (choose
all that apply)
a) priority of the process
b) process is interactive or batch
c) how long the process has computed
d) how much more long before its completion
e) how many more resources the process needs before its completion
f) how many and what type of resources the process has used
g) how many resources are available in the system
h) All of these
51) Cost factors of process termination include : (choose all that apply)
a) number of resources the deadlock process is holding
b) CPU utilization at the time of deadlock
c) amount of time a deadlocked process has thus far consumed during its
execution
d) All of the above
52) If we preempt a resource from a process, the process cannot continue with its
normal execution and it must be :
a) aborted
b) rolled back
c) terminated
d) queued
53) To _______ to a safe state, the system needs to keep more information about the
states of processes.
a) abort the process
b) roll back the process
c) queue the process
d) None of these
54) If the resources are always preempted from the same process, __________ can
occur.
a) deadlock
b) system crash
c) aging
d) starvation
3) If the process can be moved during its execution from one memory segment to
another, then binding must be :
a) delayed until run time
b) preponed to compile time
c) preponed to load time
d) None of these
4) Dynamic loading is :
a) loading multiple routines dynamically
b) loading a routine only when it is called
c) loading multiple routines randomly
d) None of these
9) If a higher priority process arrives and wants service, the memory manager can
swap out the lower priority process to execute the higher priority process. When the
higher priority process finishes, the lower priority process is swapped back in and
continues execution. This variant of swapping is sometimes called :
a) priority swapping
b) pull out, push in
c) roll out, roll in
d) None of these
10) If binding is done at assembly or load time, then the process _____ be moved to
different locations after being swapped out and in again.
a) can
b) must
c) can never
d) may
11) In a system that does not support swapping,
a) the compiler normally binds symbolic addresses (variables) to relocatable
addresses
b) the compiler normally binds symbolic addresses to physical addresses
c) the loader binds relocatable addresses to physical addresses
d) binding of symbolic addresses to physical addresses normally takes place during
execution
14) The address loaded into the memory address register of the memory is referred to
as :
a) physical address
b) logical address
c) Neither a nor b
15) The run time mapping from virtual to physical addresses is done by a hardware
device called the :
a) Virtual to physical mapper
b) memory management unit
c) memory mapping unit
d) None of these
18) If execution time binding is being used, then a process ______ be swapped to a
different memory space.
a) has to be
b) can never
c) must
d) may
21) The ________ consists of all processes whose memory images are in the backing
store or in memory and are ready to run.
a) wait queue
b) ready queue
c) CPU
d) secondary storage
22) The _________ time in a swap out of a running process and swap in of a new
process into the memory is very high.
a) context – switch
b) waiting
c) execution
d) All of these
24) Swapping _______ be done when a process has pending I/O, or has to execute
I/O operations only into operating system buffers.
a) must
b) can
c) must never
d) maybe
26. CPU fetches the instruction from memory according to the value of
a) program counter
b) status register
c) instruction register
d) program status word
30. Memory management technique in which system stores and retrieves data from
secondary storage for use in main memory is called
a) fragmentation
b) paging
c) mapping
d) none of the mentioned
40. With relocation and limit registers, each logical address must be _______ the
limit register.
a) less than
b) equal to
c) greater than
d) None of these
41. The operating system and the other processes are protected from being modified
by an already running process because :
a) they are in different memory spaces
b) they are in different logical addresses
c) they have a protection algorithm
d) every address generated by the CPU is being checked against the relocation
and limit registers
46. Using transient code, _______ the size of the operating system during program
execution.
a) increases
b) decreases
c) changes
d) maintains
47. When memory is divided into several fixed sized partitions, each partition may
contain ________.
a) exactly one process
b) atleast one process
c) multiple processes at once
d) None of these
49. The first fit, best fit and worst fit are strategies to select a ______.
a) process from a queue to put in memory
b) processor to run the next process
c) free hole from a set of available holes
d) All of these
50. In internal fragmentation, memory is internal to a partition and :
a) is being used
b) is not being used
c) is always used
d) None of these
51. A solution to the problem of external fragmentation is :
a) compaction
b) larger memory space
c) smaller memory space
d) None of these
54. The disadvantage of moving all process to one end of memory and all holes to the
other direction, producing one large hole of available memory is :
a) the cost incurred
b) the memory used
c) the CPU used
d) All of these
55. __________ is generally faster than _________ and _________.
a) first fit, best fit, worst fit
b) best fit, first fit, worst fit
c) worst fit, best fit, first fit
d) None of these
59. When the memory allocated to a process is slightly larger than the process, then :
a) internal fragmentation occurs
b) external fragmentation occurs
c) both a and b
d) neither a nor b
61. Logical memory is broken into blocks of the same size called _________.
a) frames
b) pages
c) backing store
d) None of these
62. Every address generated by the CPU is divided into two parts : (choose two)
a) frame bit
b) page number
c) page offset
d) frame offset
64. The _____ table contains the base address of each page in physical memory.
a) process
b) memory
c) page
d) frame
66. If the size of logical address space is 2 to the power of m, and a page size is 2 to
the power of n addressing units, then the high order _____ bits of a logical address
designate the page number, and the ____ low order bits designate the page offset.
a) m, n
b) n, m
c) m – n, m
d) m – n, n
68. The operating system maintains a ______ table that keeps track of how many
frames have been allocated, how many are there, and how many are available.
a) page
b) mapping
c) frame
d) memory
72. For larger page tables, they are kept in main memory and a __________ points to
the page table.
a) page table base register
b) page table base pointer
c) page table register pointer
d) page table base
78. The percentage of times a page number is found in the TLB is known as :
a) miss ratio
b) hit ratio
c) miss percent
d) None of these
80. When the valid – invalid bit is set to valid, it means that the associated page :
a) is in the TLB
b) has data in it
c) is in the process’s logical address space
d) is the system’s physical address space
82.When there is a large logical address space, the best way of paging would be :
a) not to page
b) a two level paging algorithm
c) to page the page table itself
d) All of these
83. In a paged memory, the page hit ratio is 0.35. The required to access a page in
secondary memory is equal to 100 ns. The time required to access a page in primary
memory is 10 ns. The average time required to access a page is :
a) 3.0 ns
b) 68.0 ns
c) 68.5 ns
d) 78.5 ns
84. To obtain better memory utilization, dynamic loading is used. With dynamic
loading, a routine is not loaded until it is called. For implementing dynamic loading,
a) special support from hardware is required
b) special support from operating system is essential
c) special support from both hardware and operating system is essential
d) user programs can implement dynamic loading without any special support
from hardware or operating system
85. In paged memory systems, if the page size is increased, then the internal
fragmentation generally :
a) becomes less
b) becomes more
c) remains constant
d) None of these
86. In segmentation, each address is specified by :
a) a segment number
b) an offset
c) a value
d) a key
87. In paging the user provides only ________, which is partitioned by the hardware
into ________ and ______.
a) one address, page number, offset
b) one offset, page number, address
c) page number, offset, address
d) None of these
88. Each entry in a segment table has a :
a) segment base
b) segment peak
c) segment limit
d) segment value
93. When the entries in the segment tables of two different processes point to the
same physical location :
a) the segments are invalid
b) the processes get blocked
c) segments are shared
d) All of these
94. The protection bit is 0/1 based on : (choose all that apply)
a) write only
b) read only
c) read – write
d) None of these
95. If there are 32 segments, each of size 1Kb, then the logical address should have :
a) 13 bits
b) 14 bits
c) 15 bits
d) 16 bits
96. Consider a computer with 8 Mbytes of main memory and a 128 K cache. The
cache block size is 4 K. It uses a direct mapping scheme for cache management. How
many different main memory blocks can map onto a given physical cache block ?
a) 2048
b) 256
c) 64
d) 8
97. A multilevel page table is preferred in comparison to a single level page table for
translating virtual address to physical address because :
a) it reduces the memory access time to read or write a memory location
b) it helps to reduce the size of page table needed to implement the virtual
address space of a process
c) it is required by the translation look aside buffer
d) it helps to reduce the number of page faults in page replacement algorithms
Chapter 7
VIRTUAL MEMORY
2. _____ is the concept in which a process is copied into main memory from the
secondary memory according to the requirement.
a) Paging
b) Demand paging
c) Segmentation
d) Swapping
3. The pager concerns with the
a) individual page of a process
b) entire process
c) entire thread
d) first page of a process
8. Which algorithm chooses the page that has not been used for the longest period of
time whenever the page required to be replaced?
a) first in first out algorithm
b) additional reference bit algorithm
c) least recently used algorithm
d) counting based page replacement algorithm
9. A process is thrashing if
a) it is spending more time paging than executing
b) it is spending less time paging than executing
c) page fault occurs
d) swapping can not take place
10. Working set model for page replacement is based on the assumption of
a) modularity
b) locality
c) globalization
d) random access
15. When a program tries to access a page that is mapped in address space but not
loaded in physical memory, then
a) segmentation fault occurs
b) fatal error occurs
c) page fault occurs
d) no error occurs
18. Which algorithm chooses the page that has not been used for the longest period of
time whenever the page required to be replaced?
a) first in first out algorithm
b) additional reference bit algorithm
c) least recently used algorithm
d) counting based page replacement algorithm
20. Working set model for page replacement is based on the assumption of
a) modularity
b) locality
c) globalization
d) random access
26. In question 2, if the number of page frames is increased to 4, then the number of
page transfers :
a) decreases
b) increases
c) remains the same
d) None of these
27. A memory page containing a heavily used variable that was initialized very early
and is in constant use is removed, then the page replacement algorithm used is :
a) LRU
b) LFU
c) FIFO
d) None of these
28. A virtual memory system uses First In First Out (FIFO) page replacement policy
and allocates a fixed number of frames to a process. Consider the following
statements :
P : Increasing the number of page frames allocated to a process sometimes increases
the page fault rate
Q : Some programs do not exhibit locality of reference
Which of the following is TRUE?
a) Both P and Q are true, and Q is the reason for P
b) Both P and Q are true, but Q is not the reason for P
c) P is false but Q is true
d) Both P and Q are false
29. Users _______ that their processes are running on a paged system.
a) are aware
b) are unaware
c) None of these
31. When a page is selected for replacement, and its modify bit is set :
a) the page is clean
b) the page has been modified since it was read in from the disk
c) the page is dirty
d) a and b
33. A FIFO replacement algorithm associates with each page the _______
a) time it was brought into memory
b) size of the page in memory
c) page after and before it
d) All of these
36. LRU page – replacement algorithm associates with each page the ______
a) time it was brought into memory
b) the time of that page’s last use
c) page after and before it
d) All of these
ii) How many page faults does the FIFO page replacement algorithm produce ?
a) 10
b) 15
c) 11
d) 12
15) The two methods how LRU page replacement policy can be implemented in
hardware are : (choose two)
a) Counters
b) RAM
c) Stack
d) Registers
38. When using counters to implement LRU, we replace the page with the :
a) smallest time value
b) largest time value
c) greatest size
d) None of the mentioned
39. In the stack implementation of the LRU algorithm, a stack can be maintained in a
manner :
a) whenever a page is used, it is removed from the stack and put on top
b) the bottom of the stack is the LRU page
c) the top of the stack contains the LRU page and all new pages are added to the top
d) None of the mentioned
40. There is a set of page replacement algorithms that can never exhibit Belady’s
Anomaly, called :
a) queue algorithms
b) stack algorithms
c) string algorithms
d) None of the mentioned
41. Applying the LRU page replacement to the following reference string :
12452124
The main memory can accommodate 3 pages and it already has pages 1 and 2. Page 1
came in before page 2.
How many page faults will occur ?
a) 2
b) 3
c) 4
d) 5
45. The reason for using the LFU page replacement algorithm is :
a) an actively used page should have a large reference count
b) a less used page has more chances to be used again
c) it is extremely efficient and optimal
d) All of the mentioned
46. The reason for using the MFU page replacement algorithm is :
a) an actively used page should have a large reference count
b) a less used page has more chances to be used again
c) it is extremely efficient and optimal
d) All of the mentioned
47. The implementation of the LFU and the MFU algorithm is very uncommon
because :
a) they are too complicated
b) they are optimal
c) they are expensive
d) All of the mentioned
48. The minimum number of frames to be allocated to a process is decided by the :
a) the amount of available physical memory
b) Operating System
c) instruction set architecture
d) None of the mentioned
49. When a page fault occurs before an executing instruction is complete :
a) the instruction must be restarted
b) the instruction must be ignored
c) the instruction must be completed ignoring the page fault
d) None of the mentioned
50. Consider a machine in which all memory reference instructions have only one
memory address, for them we need atleast _____ frame(s).
a) one
b) two
c) three
d) None of the mentioned
52. The algorithm in which we split m frames among n processes, to give everyone
an equal share, m/n frames is known as :
a) proportional allocation algorithm
b) equal allocation algorithm
c) split allocation algorithm
d) None of the mentioned
53. The algorithm in which we allocate memory to each process according to its size
is known as :
a) proportional allocation algorithm
b) equal allocation algorithm
c) split allocation algorithm
d) None of the mentioned
54. _________ replacement allows a process to select a replacement frame from the
set of all frames, even if the frame is currently allocated to some other process.
a) Local
b) Universal
c) Global
d) Public
55. _________ replacement allows each process to only select from its own set of
allocated frames.
a) Local
b) Universal
c) Global
d) Public
60. A locality is :
a) a set of pages that are actively used together
b) a space in memory
c) an area near a set of processes
d) None of these
67. If the sum of the working – set sizes increases, exceeding the total number of
available frames :
a) then the process crashes
b) the memory overflows
c) the system crashes
d) the operating system selects a process to suspend
ii) For LRU page replacement algorithm with 5 frames, the number of page faults is :
a) 10
b) 14
c) 8
d) 11
iii) For FIFO page replacement algorithms with 3 frames, the number of page faults is
:
a) 16
b) 15
c) 14
d) 11
iv) For FIFO page replacement algorithms with 4 frames, the number of page faults is
:
a) 16
b) 15
c) 14
d) 11
v) For Optimal page replacement algorithms with 3 frames, the number of page faults
is :
a) 16
b) 15
c) 14
d) 11
vi) For Optimal page replacement algorithms with 5 frames, the number of page
faults is :
a) 6
b) 7
c) 10
d) 9
Chapter 8
I/O SYSTEMS
1) If one or more devices use a common set of wires to communicate with the
computer system, the connection is called ______.
a) CPU
b) Monitor
c) wirefull
d) bus
2) A ____ a set of wires and a rigidly defined protocol that specifies a set of messages
that can be sent on the wires.
a) port
b) node
c) bus
d) None of these
3) When device A has a cable that plugs into device B, and device B has a cable that
plugs into device C and device C plugs into a port on the computer, this arrangement
is called a _________.
a) port
b) daisy chain
c) bus
d) cable
6) An I/O port typically consists of four registers status, control, ________ and
________ registers.
a) system in, system out
b) data in, data out
c) flow in, flow out
d) input, output
9) The hardware mechanism that allows a device to notify the CPU is called
_______.
a) polling
b) interrupt
c) driver
d) controlling
10) The CPU hardware has a wire called __________ that the CPU senses after
executing every instruction.
a) interrupt request line
b) interrupt bus
c) interrupt receive line
d) interrupt sense line
11) The _________ determines the cause of the interrupt, performs the necessary
processing and executes a return from the interrupt instruction to return the CPU to
the execution state prior to the interrupt.
a) interrupt request line
b) device driver
c) interrupt handler
d) All of these
13) The _________ are reserved for events such as unrecoverable memory errors.
a) nonmaskable interrupts
b) blocked interrupts
c) maskable interrupts
d) None of these
1) The ________ can be turned off by the CPU before the execution of critical
instruction sequences that must not be interrupted.
a) nonmaskable interrupt
b) blocked interrupt
c) maskable interrupt
d) None of these
10) In polling :
a) busy – wait cycles wait for I/O from device
b) interrupt handler receives interrupts
c) interrupt-request line is triggered by I/O device
d) All of these
5) The ________ keeps state information about the use of I/O components.
a) CPU
b) OS
c) kernel
d) shell
8) A ________ is a full duplex connection between a device driver and a user level
process.
a) bus
b) I/O operation
c) stream
d) flow
10) If the number of cycles spent busy – waiting is not excessive, then :
a) interrupt driven I/O is more efficient than programmed I/O
b) programmed I/O is more efficient than interrupt driven I/O
c) Both programmed and interrupt driven I/O are equally efficient
d) None of these
Operating System Concepts
UNIT-1 (Introduction)
2. When a computer is first turned on or restarted, a special type of absolute loader called is executed
a) Compile and Go loader b) Boot loader
c) Bootstrap loader d) Relating loader
4. Which one of the following error will be handling by the operating system?
a) Power failure b) lack of paper in printer
c) connection failure in the network d) all of the mentioned
7. In a time-sharing operating system, when the time slot given to a process is completed, the process goes from
the running state to the :
a) Blocked state b) Ready state
c) Suspended state d) Terminated state
UNIT-2 (Process)
1. The systems which allows only one process execution at a time, are called
a) uniprogramming systems b) uniprocessing systems
c) unitasking systems d) none of the mentioned
8. The address of the next instruction to be executed by the current process is provided by the
a) CPU registers b) Program counter
c) Process stack d) Pipe
UNIT-3 (Process Scheduling)
6. The only state transition that is initiated by the user process itself is :
a) block b) wakeup
c) dispatch d) none of the mentioned
7. In a multiprogramming environment :
a) the processor executes more than one process at a time
b) the programs are developed by more than one person
c) more than one process resides in the memory
d) a single user can execute many programs at the same time
8. Suppose that a process is in “Blocked” state waiting for some I/O service. When the service is
completed, it goes to the :
a) Running state b) Ready state
c) Suspended state d) Terminated state
UNIT-4 (Inter-process synchronization)
2. When several processes access the same data concurrently and the outcome of the execution
depends on the particular order in which the access takes place, is called
a) dynamic condition b) race condition
c) essential condition d) critical condition
3. If a process is executing in its critical section, then no other processes can be executing in their
critical section. This condition is called
a) mutual exclusion b) critical exclusion
c) synchronous exclusion d) asynchronous exclusion
6. Which one of the following is a visual (mathematical) way to determine the deadlock occurrence?
a) resource allocation graph b) starvation graph
c) inversion graph d) none of the mentioned
7. To avoid deadlock
a) there must be a fixed number of resources to allocate
b) resource allocation must be done only once
c) all deadlocked processes must be aborted
d) inversion technique can be used
5. Memory management technique in which system stores and retrieves data from secondary storage for
use in main memory is called
a) fragmentation b) paging
c) mapping d) none of the mentioned
9. What is compaction?
a) a technique for overcoming internal fragmentation
b) a paging technique
c) a technique for overcoming external fragmentation
d) a technique for overcoming fatal error
UNIT-7 (Virtual Memory)
2. is the concept in which a process is copied into main memory from the secondary memory
according to the requirement.
a) Paging b) Demand paging
c) Segmentation d) Swapping
5. When a program tries to access a page that is mapped in address space but not loaded in physical
memory, then
a) segmentation fault occurs b) fatal error occurs
c) page fault occurs d) no error occurs
8. A process is thrashing if
a) it is spending more time paging than executing
b) it is spending less time paging than executing
c) page fault occurs
d) swapping cannot take place
1. If one or more devices use a common set of wires to communicate with the computer system, the
connection is called
a) CPU b) Monitor
c) Wirefull d) Bus
2. A a set of wires and a rigidly defined protocol that specifies a set of messages that can be sent on
the wires.
a) port b) node
c) bus d) none of the mentioned
3. The present a uniform device-access interface to the I/O subsystem, much as system calls
provide a standard interface between the application and the operating system.
a) Devices b) Buses
c) Device drivers d) I/O systems
5. An I/O port typically consists of four registers status, control, and registers.
a) system in, system out b) data in, data out
c) flow in, flow out d) input, output
7. The hardware mechanism that allows a device to notify the CPU is called
a) polling b) interrupt
c) driver d) controlling
8. The CPU hardware has a wire called that the CPU senses after executing every
instruction.
a) interrupt request line b) interrupt bus
c) interrupt receive line d) interrupt sense line
GATE QUESTIONS (LOW LEVEL)
3. A graphics card has on board memory of 1 M(B) Which of the following modes can the card
not support?
(a) 1600 x 400 resolution with 256 colours on a 17 inch monitor
(b) 1600 x 400 resolution with 16 million colours on a 14 inch monitor
(c) 800 x 400 resolution with 16 million colours on a 17 inch monitor
(d) 800 x 800 resolution with 256 colours on a 14 inch monitor
4. Consider a virtual memory system with FIFO page replacement policy. For an arbitrary page
access pattern, increasing the number of page frames in main memory will
a) Always decrease the number of page faults
b) Always increase the number of page faults
c) Sometimes increase the number of page faults
d) Never affect the number of page faults
6. Consider a machine with 64 MB physical memory and a 32-bit virtual address space. If the
page size is 4KB, what is the approximate size of the page table?
(a) 16 MB
(b) 8 MB
(c) 2 MB
(d) 24 MB
7. Consider Peterson’s algorithm for mutual exclusion between two concurrent processes i
and j. The program executed by process is shown below.
repeat
flag [i] = true;
turn = j;
While (P) do no-op;
Enter critical section, perform actions, then exit critical section
flag [ i ] = false;
Perform other non-critical section actions.
until false;
For the program to guarantee mutual exclusion, the predicate P in the while loop should be
a) flag [j] = true and turn = i
b) flag [j] = true and turn = j
c) flag [i] = true and turn = j
d) flag [i] = true and turn = i
8. More than one word are put in one cache block to
(a) exploit the temporal locality of reference in a program
(b) exploit the spatial locality of reference in a program
(c) reduce the miss penalty
(d) none of the above
10. Consider a set of n tasks with known runtimes r1, r2, … rn to be run on a uniprocessor
machine. Which of the following processor scheduling algorithms will result in the
maximum throughput? (GATE 2001)
(a) Round-Robin
(b) Shortest-Job-First
(c) Highest-Response-Ratio-Next
(d) First-Come-First-Served
11. Suppose the time to service a page fault is on the average 10 milliseconds, while a memory
access takes 1 microsecond. Then a 99.99% hit ratio results in average memory access time
of
(a) 1.9999 milliseconds
(b) 1 millisecond
(c) 9.999 microseconds
(d) 1.9999 microseconds
12. Which of the following need not necessarily be saved on a context switch between
processes?
(a) General purpose registers
(b) Translation look-aside buffer
(c) Program counter
(d) All of the above
16. Using a larger block size in a fixed block size file system leads to
a) better disk throughput but poorer disk space utilization
b) better disk throughput and better disk space utilization
c) poorer disk throughput but better disk space utilization
d) poorer disk throughput and poorer disk space utilization
17. Consider the following statements with respect to user-level threads and kernel supported
threads
i. context switch is faster with kernel-supported threads
ii. for user-level threads, a system call can block the entire process
iii. Kernel supported threads can be scheduled independently
iv. User level threads are transparent to the kernel
which of the above statements are true?
a) (ii), (iii) and (iv) only
b) (ii) and (iii) only
c) (i) and (iii) only
d) (i) and (ii) only
18. The minimum number of page frames that must be allocated to a running process in a
virtual memory environment is determined by
a) the instruction set architecture
b) page size
c) physical memory size
d) number of processes in memory
19. In a system with 32 bit virtual addresses and 1 KB page size, use of one-level page tables for
virtual to physical address translation is not practical because of
a) the large amount of internal fragmentation
b) the large amount of external fragmentation
c) the large memory overhead in maintaining page tables
d) the large computation overhead in the translation process
23. A file system with 300 GByte uses a file descriptor with 8 direct block address. 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
(A) 3 Kbytes
(B) 35 Kbytes
(C) 280 Bytes
(D) Dependent on the size of the disk
24. A thread is usually defined as a ‘light weight process’ because an operating system (OS)
maintains smaller data structures for a thread than for a process. In relation to this, which of
the followings is TRUE?
(A) On per-thread basis, the OS maintains only CPU register state
(B) The OS does not maintain a separate stack for each thread
(C) On per-thread basis, the OS does not maintain virtual memory state
(D) On per thread basis, the OS maintains only scheduling and accounting information.
25. Let the page fault service time be 10ms in a computer with average memory access time
being 20ns. If one page fault is generated for every 10^6 memory accesses, what is the
effective access time for the memory?
(A) 21ns
(B) 30ns
(C) 23ns
(D) 35ns
GATE QUESTIONS (MEDIUM LEVEL)
1. An application loads 100 libraries at startup. Loading each library requires exactly one disk
access. The seek time of the disk to a random location is given as 10ms. Rotational speed of
disk is 6000rpm. 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)
(A) 0.50s
(B) 1.50s
(C) 1.25s
(D) 1.00s
2. Consider the following table of arrival time and burst time for three processes P0, P1 and
P2.
Process Arrival time Burst Time
P0 0 ms 9 ms
P1 1 ms 4 ms
P2 2 ms 9 ms
The pre-emptive shortest job first scheduling algorithm is use(D) Scheduling is carried out
only at arrival or completion of processes. What is the average waiting time for the three
processes?
(A) 5.0 ms
(B) 4.33 ms
(C) 6.33 ms
(D) 7.33 ms
3. Let the time taken to switch between user and kernel modes of execution be t1 while the
time taken to switch between two processes be t2. Which of the following is TRUE?
(A) t1 > t2
(B) t1 = t2
(C) t1 < t2
(D) Nothing can be said about the relation between t1 and t2
4. A system uses FIFO policy for page replacement. It has 4 page frames with no pages loaded
to begin with. The system first accesses 100 distinct pages in some order and then access
the same 100 pages but now in the reverse order. How many page faults will occur?
(A) 196
(B) 192
(C) 197
(D) 195
6. Consider the methods used by processes P1 and P2 for accessing their critical sections
whenever needed, as given below. The initial values of shared boolean variables S1 and S2
are randomly assigne(D)
Method Used by P1
while (S1 == S2) ;
Critica1 Section
S1 = S2;
Method Used by P2
while (S1 != S2) ;
Critica1 Section
S2 = not (S1);
Which one of the following statements describes the properties achieved? (GATE CS 2010)
(A) Mutual exclusion but not progress
(B) Progress but not mutual exclusion
(C) Neither mutual exclusion nor progress
(D) Both mutual exclusion and progress
7. In which one of the following page replacement policies, Belady’s anomaly may occur?
(A) FIFO
(B) Optimal
(C) LRU
(D) MRU
Process P2:
t=0: requests 2 units of R3
t=2: requests 1 unit of R4
t=4: requests 1 unit of R1
t=6: releases 1 unit of R3
t=8: Finishes
Process P3:
t=0: requests 1 unit of R4
t=2: requests 2 units of R1
t=5: releases 2 units of R1
t=7: requests 1 unit of R2
t=8: requests 1 unit of R3
t=9: Finishes
Which one of the following statements is TRUE if all three processes run concurrently
starting at time t=0?
(A) All processes will finish without any deadlock
(B) Only P1 and P2 will be in deadlock.
(C) Only P1 and P3 will be in a deadlock.
(D) All three processes will be in deadlock
10. Consider a disk system with 100 cylinders. The requests to access the cylinders occur in
following sequence: 4, 34, 10, 7, 19, 73, 2, 15, 6, 20
Assuming that the head is currently at cylinder 50, what is the time taken to satisfy all
requests if it takes 1ms to move from one cylinder to adjacent one and shortest seek time
first policy is used?
(A) 95ms
(B) 119ms
(C) 233ms
(D) 276ms
11. The enter_CS() and leave_CS() functions to implement critical section of a process are
realized using test-and-set instruction as follows:
void enter_CS(X)
{
while test-and-set(X) ;
}
void leave_CS(X)
{
X = 0;
}
In the above solution, X is a memory location associated with the CS and is initialized to 0.
Now consider the following statements:
I. The above solution to CS problem is deadlock-free
II. The solution is starvation free.
III. The processes enter CS in FIFO order.
IV More than one process can enter CS at the same time.
Which of the above statements is TRUE?
(A) I only
(B) I and II
(C) II and III
(D) IV only
12. A multilevel page table is preferred in comparison to a single level page table for translating
virtual address to physical address because
(A) It reduces the memory access time to read or write a memory location.
(B) It helps to reduce the size of page table needed to implement the virtual address space
of a process.
(C) It is required by the translation lookaside buffer.
(D) It helps to reduce the number of page faults in page replacement algorithms.
13. The data blocks of a very large file in the Unix file system are allocated using
(A) contiguous allocation
(B) linked allocation
(C) indexed allocation
(D) an extension of indexed allocation
14. The P and V operations on counting semaphores, where s is a counting semaphore, are
defined as follows:
P(s) : s = s - 1;
if (s < 0) then wait;
V(s) : s = s + 1;
if (s <= 0) then wakeup a process waiting on s;
Assume that Pb and Vb the wait and signal operations on binary semaphores are provide(D)
Two binary semaphores Xb and Yb are used to implement the semaphore operations P(s)
and V(s) as follows:
P(s): Pb (Xb);
s = s - 1;
if (s < 0) {
Vb (Xb);
Pb (Yb) ;
}
else Vb(Xb);
V(s): Pb (Xb) ;
s = s + 1;
if (s <= 0) Vb(Yb) ;
Vb (Xb) ;
The initial values of Xb and Yb are respectively
(A) 0 and 0
(B) 0 and 1
(C) 1 and 0
(D) 1 and 1
15. Which of the following statements about synchronous and asynchronous I/O is NOT true?
(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
17. Which of the following is NOT true of deadlock prevention and deadlock avoidance
schemes?
(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
18. 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
(A) 20, 20 and 20
(B) 24, 24 and 24
(C) 24, 24 and 20
(D) 25, 25 and 24
19. 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 bits
20. Group 1 contains some CPU scheduling algorithms and Group 2 contains some applications.
Match entries in Group 1 to entries in Group 2.
Group I Group II
(P) Gang Scheduling (1) Guaranteed Scheduling
(Q) Rate Monotonic Scheduling (2) Real-time Scheduling
(R) Fair Share Scheduling (3) Thread Scheduling
(A) P – 3 Q – 2 R – 1
(B) P – 1 Q – 2 R – 3
(C) P – 2 Q – 3 R – 1
(D) P – 1 Q – 3 R – 2
21. An operating system uses Shortest Remaining Time first (SRT) process scheduling
algorithm. Consider the arrival times and execution times for the following processes:
Process Execution time Arrival time
P1 20 0
P2 25 15
P3 10 30
P4 15 45
What is the total waiting time for process P2?
(A) 5
(B) 15
(C) 40
(D) 55
22. A virtual memory system uses First In First Out (FIFO) page replacement policy and
allocates a fixed number of frames to a process. Consider the following statements:
P: Increasing the number of page frames allocated to a process sometimes increases the
page fault rate.
Q: Some programs do not exhibit locality of reference. Which one of the following is TRUE?
(A) Both P and Q are true, and Q is the reason for P
(B) Both P and Q are true, but Q is not the reason for P.
(C) P is false, but Q is true
(D) Both P and Q are false.
23. A single processor system has three resource types X, Y and Z, which are shared by three
processes. There are 5 units of each resource type. Consider the following scenario, where
the column alloc denotes the number of units of each resource type allocated to each
process, and the column request denotes the number of units of each resource type
requested by a process in order to complete execution. Which of these processes will finish
LAST?
alloc request X Y Z X Y Z P0 1 2 1 1 0 3 P1 2 0 1 0 1 2 P2 2 2 1 1 2 0
(A) P0
(B) P1
(C) P2
(D) None of the above, since the system is in a deadlock
24. Two processes, P1 and P2, need to access a critical section of code. Consider the following
synchronization construct used by the processes: Here, wants1 and wants2 are shared
variables, which are initialized to false. Which one of the following statements is TRUE
about the above construct?
/* P1 */
While (true)
{
wants1 = true; while (wants2 == true);
/* Critical Section */
wants1=false;
/* Remainder section */
/* P2 */
while (true)
{
wants2 = true; while (wants1==true);
/* Critical Section */
wants2 = false;
}
/* Remainder section */
(A) It does not ensure mutual exclusion.
(B) It does not ensure bounded waiting.
(C) It requires that processes enter the critical section in strict alternation.
(D) It does not prevent deadlocks, but ensures mutual exclusion.
GATE QUESTIONS (HIGH LEVEL)
5. Some computer systems support dual mode operation—the user mode and the supervisor or
monitor mode. These refer to the modes
(A) by which user programs handle their data
(B) by which the operating system executes user programs
(C) in which the processor and the associated hardware operate.
(D) of memory access
7. A computer system has 6 tape drives, with 'n' processes competing for them. Each process may need
3 drives. The maximum value of 'n' for which the system is guaranteed to be deadlock free is
(A) 2
(B)3
(C)4
(D)1
10. Which of the following is a service not supported by the operating system?
(A) Protection
(B) Accounting
(C) Compilation
(D) I/O operation
13. Consider a virtual memory system with FIFO page replacement policy. For an arbitrary page access
pattern, increasing the number of page frames in main memory will.
(A) Always decrease the number of page faults
(B) Always increase the number of page faults
(C) Sometimes increase the number of page faults
(D) Never affect the number of page faults
14. Consider a machine with 64 MB physical memory and a 32-bit virtual address space. If the page size
is 4 KB, what is the approximate size of the page table?
(A) 16 MB
(B) 8 MB
(C) 2 MB
(D) 24 MB
16. The optimal page replacement algorithm will select the page that
(A) Has not been used for the longest time in the past.
(B) Will not be used for the longest time in the future.
(C) Has been used least number of times.
(D) Has been used most number of times
17. Which combination of the following features will suffice to characterize an OS as a multi-
programmed OS?
(A) More than one program may be loaded into main memory at the same time for execution.
(B) If a program waits for certain events such as I/O, another program is immediately scheduled for
execution.
(C) If the execution of a program terminates, another program is immediately scheduled for
execution.
(A) A
(B) A and B
(C) A and C
(D) A, B and C
18. In the index allocation scheme of blocks to a file, the maximum possible size of the file depends on
(A) The size of the blocks, and the size of the address of the blocks
(B) The number of blocks used for the index, and the size of the blocks.
(C) The size of the blocks, the number of blocks used for the index, and the size of the address of
the blocks.
(D) None of the above.
19. Using a larger block size in a fixed block size file system leads to
(A) Better disk throughput but poorer disk space utilization
(B) Better disk throughput and better disk space utilization
(C) Poorer disk throughput but better disk space utilization
(D) Poorer disk throughput and poorer disk space utilization
20. In a system with 32 bit virtual addresses and 1 KB page size, use of one-level page tables for virtual
to physical address translation is not practical because of
(A) The large amount of internal fragmentation
(B) The large amount of external fragmentation
(C) The large memory overhead in maintaining page tables
(D) The large computation overhead in the translation process
21. The minimum number of page frames that must be allocated to a running process in a virtual
memory environment is determined by
(A) The instruction set architecture
(B) Page size
(C) Physical memory size
(D) number of processes in memory
22. Consider a system with a two-level paging scheme in which a regular memory access takes 150
nanoseconds, and servicing a page fault takes 8 milliseconds. An average instruction takes 100
nanoseconds of CPU time, and two memory accesses. The TLB hit ratio is 99%, and the page fault
rate is one in every 10,000 instructions. What is the effective average instruction execution time?
(A) 645 nanoseconds
(B) 1050 nanoseconds
(C) 1215 nanoseconds
(D) 1230 nanoseconds
23. A Unix-style I-node has 10 direct pointers and one single, one double and one triple indirect pointer.
Disk block size is 1 Kbyte, disk block address is 32 bits, and 48-bit integers are used. What is the
maximum possible file size?
(A) 224 bytes
(B) 232 bytes
(C) 234 bytes
(D) 248 bytes
24. Consider three CPU-intensive processes, which require 10,20 and 30 time units and arrive at times
0,2, and 6, respectively. How many context switches are needed if the operating system implements
a shortest remaining time first scheduling algorithm? Do not count the context switches at time zero
and at the end
(A) 1
(B) 2
(C) 3
(D) 4
25. A CPU generates 32-bit virtual addresses. The page size is 4 KB. The processor has a translation
look-aside buffer (TLB) which can hold a total of 128 page table entries and is 4-way set associative.
The minimum size of the TLB tag is
(A) 11 bits
(B) 13 bits
(C) 15 bits
(D) 20 bits