KEMBAR78
Sanfoundry OS | PDF | Scheduling (Computing) | Process (Computing)
0% found this document useful (0 votes)
72 views96 pages

Sanfoundry OS

The document provides a comprehensive overview of operating systems, including definitions, functions, and various concepts such as process management, scheduling, and inter-process communication. It includes multiple-choice questions and answers related to operating system principles, covering topics like kernel functions, process states, and synchronization tools. The content is structured as a quiz format, testing knowledge on operating system fundamentals.

Uploaded by

saleemaafsar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views96 pages

Sanfoundry OS

The document provides a comprehensive overview of operating systems, including definitions, functions, and various concepts such as process management, scheduling, and inter-process communication. It includes multiple-choice questions and answers related to operating system principles, covering topics like kernel functions, process states, and synchronization tools. The content is structured as a quiz format, testing knowledge on operating system fundamentals.

Uploaded by

saleemaafsar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 96

d) none of the mentioned

BASIC OVERVIEW OF OPERATING SYSTEM.


Answer:c
1.What is operating system?
a) collection of programs that manages hardware resources 7. If a process fails, most operating system write the error
b) system service provider to the application programs information to a
c) link to interface the hardware and application programs a) log file
d) all of the mentioned b) another running process
c) new file
Answer:d d) none of the mentioned

2. To access the services of operating system, the interface Answer:a


is provided by the
a) system calls 8. Which facility dynamically adds probes to a running
b) API system, both in user processes and in the kernel?
c) library a) DTrace
d) assembly instructions b) DLocate
c) DMap
Answer:a d) DAdd

3. Which one of the following is not true? Answer:a


a) kernel is the program that constitutes the central core of
the operating system 9. Which one of the following is not a real time operating
b) kernel is the first part of operating system to load into system?
memory during booting a) VxWorks
c) kernel is made of various modules which can not be b) Windows CE
loaded in running operating system c) RTLinux
d) kernel remains in the memory during the entire d) Palm OS
computer session

Answer:c Answer:d

4. Which one of the following error will be handle by the 10. The OS X has
operating system? a) monolithic kernel
a) power failure b) hybrid kernel
b) lack of paper in printer c) microkernel
c) connection failure in the network d) monolithic kernel with modules
d) all of the mentioned
Answer:b
Answer:d

5. The main function of the command interpreter is Process Management


a) to get and execute the next user-specified command processes in Operating System.
b) to provide the interface between the API and application 1. The systems which allows only one process execution at
program a time, are called
c) to handle the files in operating system a) uniprogramming systems
d) none of the mentioned b) uniprocessing systems
c) unitasking systems
d) none of the mentioned
Answer:a
Answer:a
6. By operating system, the resource management can be Explanation:Those systems which allows more than one
done via process execution at a time, are called multiprogramming
a) time division multiplexing systems. Uniprocessing means only one processor.
b) space division multiplexing 2. In operating system, each process has its own
c) both (a) and (b) a) address space and global variables
1
b) open files Answer:d
c) pending alarms, signals and signal handlers
d) all of the mentioned 9. Which system call returns the process identifier of a
terminated child?
Answer:d a) wait
b) exit
3. In Unix, Which system call creates the new process? c) fork
a) fork d) get
b) create
c) new
d) none of the mentioned Answer:a

Answer:a 10. The address of the next instruction to be executed by


the current process is provided by the
4. A process can be terminated due to a) CPU registers
a) normal exit b) program counter
b) fatal error c) process stack
c) killed by another process d) pipe
d) all of the mentioned
Answer:b
Answer:d

5. What is the ready state of a process? Process Control Block -


a) when process is scheduled to run after some execution “Process Control Block”
b) when process is unable to run until some task has been 1) A Process Control Block(PCB) does not contain which
completed of the following :
c) when process is using the CPU a) Code
d) none of the mentioned b) Stack
c) Heap
d) Data
Answer:a e) Program Counter
Explanation:When process is unable to run until some task f) Process State
has been completed, the process is in blocked state and if g) I/O status information
process is using the CPU, it is in running state. h) bootstrap program
6. What is interprocess communication?
a) communication within the process Answer: h
b) communication between two process
c) communication between two threads of same process 2) The number of processes completed per unit time is
d) none of the mentioned known as __________.
a) Output
Answer:b b) Throughput
c) Efficiency
7. A set of processes is deadlock if d) Capacity
a) each process is blocked and will remain so forever
b) each process is terminated Answer: b
c) all processes are trying to kill each other
d) none of the mentioned 3) The state of a process is defined by :
a) the final activity of the process
Answer:a b) the activity just executed by the process
c) the activity to next be executed by the process
8. A process stack does not contain d) the current activity of the process
a) function parameters
b) local variables Answer: d
c) return addresses
d) PID of child process 4) Which of the following is not the state of a process ?
a) New
2
b) Old c) Device Queue
c) Waiting d) Ready Queue
d) Running
e) Ready Answer: b
f) Terminated
2) When the process issues an I/O request :
a) It is placed in an I/O queue
Answer: b b) It is placed in a waiting queue
c) It is placed in the ready queue
5) The Process Control Block is : d) It is placed in the Job queue
a) Process type variable
b) Data Structure Answer: a
c) a secondary storage section
d) a Block in memory 3) When a process terminates : (Choose Two)
a) It is removed from all queues
Answer: b b) It is removed from all, but the job queue
c) Its process control block is de-allocated
6) The entry of all the PCBs of the current processes is in : d) Its process control block is never de-allocated
a) Process Register
b) Program Counter Answer: a and c
c) Process Table
d) Process Unit 4) What is a long-term scheduler ?
a) It selects which process has to be brought into the ready
Answer: c queue
b) It selects which process has to be executed next and
7) The degree of multi-programming is : allocates CPU
a) the number of processes executed per unit time c) It selects which process to remove from memory by
b) the number of processes in the ready queue swapping
c) the number of processes in the I/O queue d) None of these
d) the number of processes in memory
Answer: a
Answer: d
5) If all processes I/O bound, the ready queue will almost
8) A single thread of control allows the process to always be ______, and the Short term Scheduler will have
perform : a ______ to do.
a) only one task at a time a) full,little
b) multiple tasks at a time b) full,lot
c) All of these c) empty,little
d) empty,lot

Answer: a Answer: c

9) The objective of multi-programming is to : (choose two) 6) What is a medium-term scheduler ?


a) Have some process running at all times a) It selects which process has to be brought into the ready
b) Have multiple programs waiting in a queue ready to run queue
c) To minimize CPU utilization b) It selects which process has to be executed next and
d) To maximize CPU utilization allocates CPU
c) It selects which process to remove from memory by
Answer: a and d swapping
d) None of these

“Process Scheduling Queues” Answer: c


1) Which of the following do not belong to queues for
processes ? 7) What is a short-term scheduler ?
a) Job Queue a) It selects which process has to be brought into the ready
b) PCB queue queue
3
b) It selects which process has to be executed next and 13) The context of a process in the PCB of a process does
allocates CPU not contain :
c) It selects which process to remove from memory by a) the value of the CPU registers
swapping b) the process state
d) None of these c) memory-management information
d) context switch time

Answer: b Answer: d

8) The primary distinction between the short term 14) Which of the following need not necessarily be saved
scheduler and the long term scheduler is : on a context switch between processes ? (GATE CS 2000)
a) The length of their queues a) General purpose registers
b) The type of processes they schedule b) Translation look-aside buffer
c) The frequency of their execution c) Program counter
d) None of these d) All of these

Answer: c
Answer: b
9) The only state transition that is initiated by the user
process itself is : 14) Which of the following does not interrupt a running
a) block process ? (GATE CS 2001)
b) wakeup a) A device
c) dispatch b) Timer
d) None of these c) Scheduler process
d) Power failure
Answer: a
Answer: c
10) In a time-sharing operating system, when the time slot
given to a process is completed, the process goes from the 15) Several processes access and manipulate the same data
running state to the : concurrently and the outcome of the execution depends on
a) Blocked state the particular order in which the access takes place, is
b) Ready state called a(n) ____.
c) Suspended state a) Shared Memory Segments
d) Terminated state b) Entry Section
c) Race condition
Answer: b d) Process Synchronization

11) In a multi-programming environment : Answer: c


a) the processor executes more than one process at a time
b) the programs are developed by more than one person 16) Which of the following state transitions is not
c) more than one process resides in the memory possible ?
d) a single user can execute many programs at the same a) blocked to running
time b) ready to running
c) blocked to ready
Answer: c d) running to blocked

12) Suppose that a process is in “Blocked” state waiting Answer: a


for some I/O service. When the service is completed, it
goes to the :
a) Running state Process Synchronization
b) Ready state process synchronization in Operating System.
c) Suspended state 1. Which process can be affected by other processes
d) Terminated state executing in the system?
a) cooperating process
Answer: b b) child process
c) parent process
4
d) init process c) priority exchange
d) priority modification
Answer:a
Answer:a
2. When several processes access the same data
concurrently and the outcome of the execution depends on 8. Process synchronization can be done on
the particular order in which the access takes place, is a) hardware level
called b) software level
a) dynamic condition c) both (a) and (b)
b) race condition d) none of the mentioned
c) essential condition
d) critical condition Answer:c

Answer:b 9. A monitor is a module that encapsulates


a) shared data structures
3. If a process is executing in its critical section, then no b) procedures that operate on shared data structure
other processes can be executing in their critical section. c) synchronization between concurrent procedure
This condition is called invocation
a) mutual exclusion d) all of the mentioned
b) critical exclusion
c) synchronous exclusion
d) asynchronous exclusion Answer:d

Answer:a 10. To enable a process to wait within the monitor,


a) a condition variable must be declared as condition
4. Which one of the following is a synchronization tool? b) condition variables must be used as boolean objects
a) thread c) semaphore must be used
b) pipe d) all of the mentioned
c) semaphore
d) socket Answer:a

Answer:c
“Process Creation” and will also be useful for interview
5. A semaphore is a shared integer variable preparations.
a) that can not drop below zero 1) Restricting the child process to a subset of the parent’s
b) that can not be more than zero resources prevents any process from :
c) that can not drop below one a) overloading the system by using a lot of secondary
d) that can not be more than one storage
b) under-loading the system by very less CPU utilization
c) overloading the system by creating a lot of sub-
Answer:a processes
d) crashing the system by utilizing multiple resources
6. Mutual exclusion can be provided by the
a) mutex locks Answer: c
b) binary semaphores
c) both (a) and (b) 2) A parent process calling _____ system call will be
d) none of the mentioned suspended until children processes terminate.
a) wait
Answer:c b) fork
Explanation:Binary Semaphores are known as mutex c) exit
locks. d) exec
7. When high priority task is indirectly preempted by
medium priority task effectively inverting the relative Answer: a
priority of the two tasks, the scenario is called
a) priority inversion 3) Cascading termination refers to termination of all child
b) priority removal processes before the parent terminates ______.
5
a) Normally Inter Process Communication -
b) Abnormally “Inter Process Communication”
c) Normally or abnormally 1) Inter process communication :
d) None of these a) allows processes to communicate and synchronize their
actions when using the same address space.
Answer: a b) allows processes to communicate and synchronize their
actions without using the same address space.
4) With ……………. only one process can execute at a c) allows the processes to only synchronize their actions
time; meanwhile all other process are waiting for the without communication.
processor. With ………….. more than one process can be d) None of these
running simultaneously each on a different processor.
a) Multiprocessing, Multiprogramming Answer: b
b) Multiprogramming, Uniprocessing
c) Multiprogramming, Multiprocessing 2) Message passing system allows processes to :
d) Uniprogramming, Multiprocessing a) communicate with one another without resorting to
shared data.
b) communicate with one another by resorting to shared
Answer: d data.
c) share data
5) In UNIX, each process is identified by its : d) name the recipient or sender of the message
a) Process Control Block
b) Device Queue Answer: a
c) Process Identifier
d) None of these 3) An IPC facility provides atleast two operations :
(choose two)
Answer: c a) write message
b) delete message
6) In UNIX, the return value for the fork system call is c) send message
_____ for the child process and _____ for the parent d) receive message
process.
a) A Negative integer, Zero Answer: c and d
b) Zero, A Negative integer
c) Zero, A nonzero integer 4) Messages sent by a process :
d) A nonzero integer, Zero a) have to be of a fixed size
b) have to be a variable size
Answer: c c) can be fixed or variable sized
d) None of these
7) The child process can : (choose two)
a) be a duplicate of the parent process Answer: c
b) never be a duplicate of the parent process
c) have another program loaded into it 5) The link between two processes P and Q to send and
d) never have another program loaded into it receive messages is called :
a) communication link
Answer: a and c b) message-passing link
c) synchronization link
8) The child process completes execution,but the parent d) All of these
keeps executing, then the child process is known as :
a) Orphan
b) Zombie Answer: a
c) Body
d) Dead 6) Which of the following are TRUE for direct
communication :(choose two)
a) A communication link can be associated with N number
Answer: b of process(N = max. number of processes supported by
system)
b) A communication link can be associated with exactly
6
two processes Answer: b
c) Exactly N/2 links exist between each pair of
processes(N = max. number of processes supported by
system) Remote Procedure Calls -
d) Exactly one link exists between each pair of processes “Remote Procedure Calls”
1) Remote Procedure Calls are used :
Answer: b and d a) for communication between two processes remotely
different from each other on the same system
7) In indirect communication between processes P and Q : b) for communication between two processes on the same
a) there is another process R to handle and pass on the system
messages between P and Q c) for communication between two processes on separate
b) there is another machine between the two processes to systems
help communication d) None of these
c) there is a mailbox to help communication between P and
Q Answer: c
d) None of these
2) To differentiate the many network services a system
Answer: c supports ______ are used.
a) Variables
8) In the non blocking send : b) Sockets
a) the sending process keeps sending until the message is c) Ports
received d) Service names
b) the sending process sends the message and resumes
operation Answer: c
c) the sending process keeps sending until it receives a
message 3) RPC provides a(an) _____ on the client side, a separate
d) None of these one for each remote procedure.
a) stub
Answer: b b) identifier
c) name
9) In the Zero capacity queue : (choose two) d) process identifier
a) the queue has zero capacity
b) the sender blocks until the receiver receives the message Answer: a
c) the sender keeps sending and the messages dont wait in
the queue 4) The stub :
d) the queue can store atleast one message a) transmits the message to the server where the server side
stub receives the message and invokes procedure on the
Answer: a and b server side
b) packs the parameters into a form transmittable over the
10) The Zero Capacity queue : network
a) is referred to as a message system with buffering c) locates the port on the server
b) is referred to as a message system with no buffering d) All of these
c) is referred to as a link
d) None of these
Answer: d

Answer: b 5) To resolve the problem of data representation on


different systems RPCs define ______________.
11) Bounded capacity and Unbounded capacity queues are a) machine dependent representation of data
referred to as : b) machine representation of data
a) Programmed buffering c) machine-independent representation of data
b) Automatic buffering d) None of these
c) User defined buffering
d) No buffering Answer: c

7
6) The full form of RMI : 4) What is an ISR ?
a) Remote Memory Installation a) Information Service Request
b) Remote Memory Invocation b) Interrupt Service Request
c) Remote Method Installation c) Interrupt Service Routine
d) Remote Method Invocation d) Information Service Routine

Answer: d Answer: c

7) The remote method invocation : 5) An interrupt vector


a) allows a process to invoke memory on a remote object a) is an address that is indexed to an interrupt handler
b) allows a thread to invoke a method on a remote object b) is a unique device number that is indexed by an address
c) allows a thread to invoke memory on a remote object c) is a unique identity given to an interrupt
d) allows a process to invoke a method on a remote object d) None of these

Answer: b
Answer: a
8) A process that is based on IPC mechanism which
executes on different systems and can communicate with 6) DMA is used for : (choose two)
other processes using message based communication, is a) High speed devices(disks and communications network)
called ________. b) Low speed devices
a) Local Procedure Call c) Saving CPU cycles
b) Inter Process Communication d) Utilizing CPU cycles
c) Remote Procedure Call
d) Remote Machine Invocation Answer: a and c

Answer: c 7) In a memory mapped input/output :


a) the CPU uses polling to watch the control bit constantly,
Structures - looping to see if device is ready
“Structures” b) the CPU writes one data byte to the data register and
1) The initial program that is run when the computer is sets a bit in control register to show that a byte is available
powered up is called : c) the CPU receives an interrupt when the device is ready
a) boot program for the next byte
b) bootloader d) the CPU runs a user written code and does accordingly
c) initializer
d) bootstrap program Answer: b

Answer: d 8) In a programmed input/output(PIO) :


a) the CPU uses polling to watch the control bit constantly,
2) How does the software trigger an interrupt ? looping to see if device is ready
a) Sending signals to CPU through bus b) the CPU writes one data byte to the data register and
b) Executing a special operation called system call sets a bit in control register to show that a byte is available
c) Executing a special program called system program c) the CPU receives an interrupt when the device is ready
d) Executing a special program calle interrupt trigger for the next byte
program d) the CPU runs a user written code and does accordingly

Answer: b Answer: a

3) What is a trap/exception ? 9) In an interrupt driven input/output :


a) hardware generated interrupt caused by an error a) the CPU uses polling to watch the control bit constantly,
b) software generated interrupt caused by an error looping to see if device is ready
c) user generated interrupt caused by an error b) the CPU writes one data byte to the data register and
d) None of these sets a bit in control register to show that a byte is available
c) the CPU receives an interrupt when the device is ready
Answer: b for the next byte
d) the CPU runs a user written code and does accordingly

8
Answer: c d) throughput

10) In the layered approach of Operating Systems : Answer:b


(choose two)
a) Bottom Layer(0) is the User interface 4. Which scheduling algorithm allocates the CPU first to
b) Highest Layer(N) is the User interface the process that requests the CPU first?
c) Bottom Layer(0) is the hardware a) first-come, first-served scheduling
d) Highest Layer(N) is the hardware b) shortest job scheduling
c) priority scheduling
d) none of the mentioned
Answer: b and c
Answer:a
11) How does the Hardware trigger an interrupt ?
a) Sending signals to CPU through system bus 5. In priority scheduling algorithm
b) Executing a special program called interrupt program a) CPU is allocated to the process with highest priority
c) Executing a special program called system program b) CPU is allocated to the process with lowest priority
d) Executing a special operation called system call c) equal priority processes can not be scheduled
d) none of the mentioned
Answer: a

12) Which operation is performed by an interrupt handler ? Answer:a


a) Saving the current state of the system
b) Loading the interrupt handling code and executing it 6. In priority scheduling algorithm, when a process arrives
c) Once done handling, bringing back the system to the at the ready queue, its priority is compared with the
original state it was before the interrupt occurred priority of
d) All of these a) all process
b) currently running process
Answer: d c) parent process
d) init process

CPU Scheduling Answer:b


cpu scheduling in Operating System.
1. Which module gives control of the CPU to the process 7. Time quantum is defined in
selected by the short-term scheduler? a) shortest job scheduling algorithm
a) dispatcher b) round robin scheduling algorithm
b) interrupt c) priority scheduling algorithm
c) scheduler d) multilevel queue scheduling algorithm
d) none of the mentioned
Answer:b
Answer:a
8. Process are classified into different groups in
2. The processes that are residing in main memory and are a) shortest job scheduling algorithm
ready and waiting to execute are kept on a list called b) round robin scheduling algorithm
a) job queue c) priority scheduling algorithm
b) ready queue d) multilevel queue scheduling algorithm
c) execution queue
d) process queue Answer:d

Answer:b 9. In multilevel feedback scheduling algorithm


a) a process can move to a different classified ready queue
3. The interval from the time of submission of a process to b) classification of ready queue is permanent
the time of completion is termed as c) processes are not classified into groups
a) waiting time d) none of the mentioned
b) turnaround time
c) response time

9
Answer:a 6) In the following cases non – preemptive scheduling
occurs : (Choose two)
10. Which one of the following can not be scheduled by a) When a process switches from the running state to the
the kernel? ready state
a) kernel level thread b) When a process goes from the running state to the
b) user level thread waiting state
c) process c) When a process switches from the waiting state to the
d) none of the mentioned ready state
d) When a process terminates
Answer:b
Explanation:User level threads are managed by thread
library and the kernel in unaware of them. Answer: b and d
Explanation: There is no other choice.
CPU Scheduling Benefits - 7) The switching of the CPU from one process or thread to
“CPU Scheduling Benefits” another is called :
1) CPU scheduling is the basis of ____________. a) process switch
a) multiprocessor systems b) task switch
b) multiprogramming operating systems c) context switch
c) larger memory sized systems d) All of these
d) None of these
Answer: d
Answer: b
8) Dispatch latency is :
2) With multiprogramming, ______ is used productively. a) the speed of dispatching a process from running to the
a) time ready state
b) space b) the time of dispatching a process from running to ready
c) money state and keeping the CPU idle
d) All of these c) the time to stop one process and start running another
one
Answer: a d) None of these

3) The two steps of a process execution are : (choose two) Answer: c


a) I/O Burst
b) CPU Burst 9) Scheduling is done so as to :
c) Memory Burst a) increase CPU utilization
d) OS Burst b) decrease CPU utilization
c) keep the CPU more idle
Answer: a and b d) None of these

4) An I/O bound program will typically have : Answer: a


a) a few very short CPU bursts
b) many very short I/O bursts 10) Scheduling is done so as to :
c) many very short CPU bursts a) increase the throughput
d) a few very short I/O bursts b) decrease the throughput
c) increase the duration of a specific amount of work
Answer: c d) None of these

5) A process is selected from the ______ queue by the Answer: a


________ scheduler, to be executed.
a) blocked, short term 11) Turnaround time is :
b) wait, long term a) the total waiting time for a process to finish execution
c) ready, short term b) the total time spent in the ready queue
d) ready, long term c) the total time spent in the running queue
d) the total time from the completion till the submission of
Answer: c a process

10
Answer: d Answer: b

12) Scheduling is done so as to : 2) With round robin scheduling algorithm in a time shared
a) increase the turnaround time system,
b) decrease the turnaround time a) using very large time slices converts it into First come
c) keep the turnaround time same First served scheduling algorithm
d) there is no relation between scheduling and turnaround b) using very small time slices converts it into First come
time First served scheduling algorithm
c) using extremely small time slices increases performance
Answer: b d) using very small time slices converts it into Shortest Job
First algorithm
13) Waiting time is :
a) the total time in the blocked and waiting queues Answer: a
b) the total time spent in the ready queue Explanation: All the processes will be able to get
c) the total time spent in the running queue completed.
d) the total time from the completion till the submission of 3) The portion of the process scheduler in an operating
a process system that dispatches processes is concerned with :
a) assigning ready processes to CPU
b) assigning ready processes to waiting queue
Answer: b c) assigning running processes to blocked queue
d) All of these
14) Scheduling is done so as to :
a) increase the waiting time Answer: a
b) keep the waiting time the same
c) decrease the waiting time 4) Complex scheduling algorithms :
d) None of these a) are very appropriate for very large computers
b) use minimal resources
Answer: c c) use many resources
d) All of these
14) Response time is :
a) the total time taken from the submission time till the Answer: a
completion time Explanation: Large computers are overloaded with greater
b) the total time taken from the submission time till the number of processes.
first response is produced 5) The FIFO algorithm :
c) the total time taken from submission time till the a) first executes the job that came in last in the queue
response is output b) first executes the job that came in first in the queue
d) None of these c) first executes the job that needs minimal processor
d) first executes the job that has maximum processor needs
Answer: b

15) Scheduling is done so as to : Answer: b


a) increase the response time
b) keep the response time the same 6) The strategy of making processes that are logically
c) decrease the response time runnable to be temporarily suspended is called :
d) None of these a) Non preemptive scheduling
b) Preemptive scheduling
Answer: c c) Shortest job first
d) First come First served

CPU Scheduling Algorithms - 1 - Answer: b


“CPU Scheduling Algorithms”
1) Round robin scheduling falls under the category of : 7) Scheduling is :
a) Non preemptive scheduling a) allowing a job to use the processor
b) Preemptive scheduling b) making proper use of processor
c) None of these c) Both a and b

11
d) None of these Answer: b

Answer: c 11) Under multiprogramming, turnaround time for short


jobs is usually ________ and that for long jobs is slightly
8) There are 10 different processes running on a ___________.
workstation. Idle processes are waiting for an input event a) Lengthened; Shortened
in the input queue. Busy processes are scheduled with the b) Shortened; Lengthened
Round-Robin timesharing method. Which out of the c) Shortened; Shortened
following quantum times is the best value for small d) Shortened; Unchanged
response times, if the processes have a short runtime, e.g.
less than 10ms ? Answer: b
a) tQ = 15ms
b) tQ = 40ms 12) Which of the following statements are true ? (GATE
c) tQ = 45ms 2010)
d) tQ = 50ms I. Shortest remaining time first scheduling may cause
starvation
Answer: a II. Preemptive scheduling may cause starvation
III. Round robin is better than FCFS in terms of response
9) Orders are processed in the sequence they arrive if time
_______ rule sequences the jobs. a) I only
a) earliest due date b) I and III only
b) slack time remaining c) II and III only
c) first come, first served d) I, II and III
d) critical ratio
Answer: d
Answer: c Explanation:
I) Shortest remaining time first scheduling is a preemptive
10) Which of the following algorithms tends to minimize version of shortest job scheduling. It may cause starvation
the process flow time ? as shorter processes may keep coming and a long CPU
a) First come First served burst process never gets CPU.
b) Shortest Job First II) Preemption may cause starvation. If priority based
c) Earliest Deadline First scheduling with preemption is used, then a low priority
d) Longest Job First process may never get CPU.
III) Round Robin Scheduling improves response time as
all processes get CPU after a specified time.

“CPU Scheduling Algorithms” and will also be useful for 3) The FCFS algorithm is particularly troublesome for
interview preparations for freshers. ____________.
1) The most optimal scheduling algorithm is : a) time sharing systems
a) FCFS – First come First served b) multiprogramming systems
b) SJF – Shortest Job First c) multiprocessor systems
c) RR – Round Robin d) Operating systems
d) None of these
Answer: b
Answer: b Explanation: In a time sharing system, each user needs to
get a share of the CPU at regular intervals.
2) The real difficulty with SJF in short term scheduling is : 4) Consider the following set of processes, the length of
a) it is too good an algorithm the CPU burst time given in milliseconds :
b) knowing the length of the next CPU request Process Burst time
c) it is too complex to understand P1 6
d) None of these P2 8
P3 7
Answer: b P4 3
i) Assuming the above process being scheduled with the
SJF scheduling algorithm :
12
a) The waiting time for process P1 is 3ms. a) it schedules in a very complex manner
b) The waiting time for process P1 is 0ms. b) its scheduling takes up a lot of time
c) The waiting time for process P1 is 16ms. c) it can lead to some low priority process waiting
d) The waiting time for process P1 is 9ms. indefinitely for the CPU
d) None of these
Answer: a
Answer: c
ii) Assuming the above process being scheduled with the
SJF scheduling algorithm : 8) ‘Aging’ is :
a) The waiting time for process P2 is 3ms. a) keeping track of cache contents
b) The waiting time for process P2 is 0ms. b) keeping track of what pages are currently residing in
c) The waiting time for process P2 is 16ms. memory
d) The waiting time for process P2 is 9ms. c) keeping track of how many times a given page is
referenced
d) increasing the priority of jobs to ensure termination in a
Answer: c finite time

iii) Assuming the above process being scheduled with the Answer: d
SJF scheduling algorithm :
a) The waiting time for process P4 is 3ms. 9) A solution to the problem of indefinite blockage of low
b) The waiting time for process P4 is 0ms. – priority processes is :
c) The waiting time for process P4 is 16ms. a) Starvation
d) The waiting time for process P4 is 9ms. b) Wait queue
c) Ready queue
Answer: b d) Aging

iv) Assuming the above process being scheduled with the


SJF scheduling algorithm : Answer: d
a) The waiting time for process P3 is 3ms.
b) The waiting time for process P3 is 0ms. 10) Which of the following statements are true ? (GATE
c) The waiting time for process P3 is 16ms. 2010)
d) The waiting time for process P3 is 9ms. i) Shortest remaining time first scheduling may cause
starvation
Answer: d ii) Preemptive scheduling may cause starvation
iii) Round robin is better than FCFS in terns of response
5) Preemptive Shortest Job First scheduling is sometimes time
called : a) i only
a) Fast SJF scheduling b) i and iii only
b) EDF scheduling – Earliest Deadline First c) ii and iii only
c) HRRN scheduling – Highest Response Ratio Next d) i, ii and iii
d) SRTN scheduling – Shortest Remaining Time Next
Answer: d
Answer: d
11) Which of the following scheduling algorithms gives
6) An SJF algorithm is simply a priority algorithm where minimum average waiting time ?
the priority is : a) FCFS
a) the predicted next CPU burst b) SJF
b) the inverse of the predicted next CPU burst c) Round – robin
c) the current CPU burst d) Priority
d) anything the user wants
Answer: b
Answer: a
Explanation: The larger the CPU burst, the lower the
priority. The Critical Section (CS) Problem and Solutions -
7) One of the disadvantages of the priority scheduling “The Critical Section (CS) Problem and Solutions”
algorithm is that :
13
1) Concurrent access to shared data may result in : section and before the request is granted
a) data consistency b) when another process is in its critical section
b) data insecurity c) before a process has made a request to enter its critical
c) data inconsistency section
d) None of these d) None of these

Answer: c Answer: a

2) A situation where several processes access and 7) A minimum of _____ variable(s) is/are required to be
manipulate the same data concurrently and the outcome of shared between processes to solve the critical section
the execution depends on the particular order in which problem.
access takes place is called : a) one
a) data consistency b) two
b) race condition c) three
c) aging d) four
d) starvation
Answer: b
Answer: b
8) In the bakery algorithm to solve the critical section
3) The segment of code in which the process may change problem :
common variables, update tables, write into files is known a) each process is put into a queue and picked up in an
as : ordered manner
a) program b) each process receives a number (may or may not be
b) critical section unique) and the one with the lowest number is served next
c) non – critical section c) each process gets a unique number and the one with the
d) synchronizing highest number is served next
d) each process gets a unique number and the one with the
Answer: b lowest number is served next

4) The following three conditions must be satisfied to


solve the critical section problem : (choose three) Answer: b
a) Aging
b) Mutual Exclusion
c) Deadlock Semaphores - 1 -
d) Progress “Semaphores”
e) Bounded Waiting 1) An un-interruptible unit is known as :
a) single
b) atomic
Answer: b,d and e c) static
d) None of these
5) Mutual exclusion implies that :
a) if a process is executing in its critical section, then no Answer: b
other process must be executing in their critical sections
b) if a process is executing in its critical section, then other 2) The TestAndSet instruction is executed :
processes must be executing in their critical sections a) after a particular process
c) if a process is executing in its critical section, then all b) periodically
the resources of the system must be blocked until it c) atomically
finishes execution d) None of these
d) None of these
Answer: c
Answer: a
3) Semaphore is a/an _______ to solve the critical section
6) Bounded waiting implies that there exists a bound on problem.
the number of times a process is allowed to enter its a) hardware for a system
critical section : b) special program for a system
a) after a process has made a request to enter its critical c) integer variable
14
d) None of these d) None of these

Answer: c Answer: a

4) The two atomic operations permissible on semaphores 10) The code that changes the value of the semaphore is :
are : (choose two) a) remainder section code
a) wait b) non – critical section code
b) stop c) critical section code
c) hold d) None of these
d) signal
Answer: c
Answer: a and d
11) The following program consists of 3 concurrent
5) Spinlocks are : processes and 3 binary semaphores. The semaphores are
a) CPU cycles wasting locks over critical sections of initialized as S0 = 1, S1 = 0, S2 = 0.
programs Process P0
b) locks that avoid time wastage in context switches while(true)
c) locks that work better on multiprocessor systems {
d) All of these wait(S0);
print ‘0’;
Answer: d release(S1);
release(S2);
6) The main disadvantage of spinlocks is that : }
a) they are not sufficient for many process Process P1
b) they require busy waiting wait(S1);
c) they are unreliable sometimes release(S0);
d) they are too complex for programmers Process P2
wait(S2);
Answer: b release(S0);
How many times will P0 print ‘0’ ?
7) The wait operation of the semaphore basically works on a) At least twice
the basic _______ system call. b) Exactly twice
a) stop() c) Exactly thrice
b) block() d) Exactly once
c) hold()
d) wait()
Answer: a

Answer: b 12) Each process Pi, i = 0,1,2,3,……,9 is coded as


follows :
8) The signal operation of the semaphore basically works repeat
on the basic _______ system call. P(mutex)
a) continue() {Critical Section}
b) wakeup() V(mutex)
c) getup() forever
d) start() The code for P10 is identical except that it uses V(mutex)
instead of P(mutex). What is the largest number of
Answer: b processes that can be inside the critical section at any
moment (the mutex being initialized to 1)?
9) If the semaphore value is negative : a) 1
a) its magnitude is the number of processes waiting on that b) 2
semaphore c) 3
b) it is invalid d) None of these
c) no operation can be further performed on it until the
signal operation is performed on it Answer: c
Explanation: Any one of the 9 processes can get into
15
critical section after executing P(mutex) which decrements 2) A semaphore :
the mutex value to 0. At this time P10 can enter critical a) is a binary mutex
section by incrementing the value to 1. Now any of the 9 b) must be accessed from only one process
processes can enter the critical section by again c) can be accessed from multiple processes
decrementing the mutex value to 0. None of the remaining d) None of these
processes can get into their critical sections.
13) Two processes, P1 and P2, need to access a critical Answer: c
section of code. Consider the following synchronization
construct used by the processes : 3) The two kinds of semaphores are : (choose two)
Process P1 : a) mutex
while(true) b) binary
{ c) counting
w1 = true; d) decimal
while(w2 == true);
Critical section Answer: b and c
w1 = false;
} 4) A mutex :
Remainder Section a) is a binary mutex
Process P2 : b) must be accessed from only one process
while(true) c) can be accessed from multiple processes
{ d) None of these
w2 = true;
while(w1 == true); Answer: b
Critical section
w2 = false; 5) At a particular time of computation the value of a
} counting semaphore is 7.Then 20 P operations and 15 V
Remainder Section operations were completed on this semaphore.The
Here, w1 and w2 are shared variables, which are initialized resulting value of the semaphore is : (GATE 1987)
to false. Which one of the following statements is TRUE a) 42
about the above construct? b) 2
a) It does not ensure mutual exclusion c) 7
b) It does not ensure bounded waiting d) 12
c) It requires that processes enter the critical section in
strict alternation Answer: b
d) It does not prevent deadlocks, but ensures mutual Explanation: P represents Wait and V represents Signal. P
exclusion operation will decrease the value by 1 everytime and V
operation will increase the value by 1 everytime.
Answer: d 6) A binary semaphore is a semaphore with integer
values : (choose two)
a) 1
Operating System Interview Questions and Answers b) -1
for Freshers | Sanfoundry c) 0
“Semaphores” and will also be useful for interview d) 0.5
preparations for freshers.
1) What will happen if a non-recursive mutex is locked
more than once ? Answer: a and c
a) Starvation
b) Deadlock 7) The following pair of processes share a common
c) Aging variable X :
d) Signaling Process A
int Y;
Answer: b A1: Y = X*2;
Explanation: If a thread which had already locked a mutex, A2: X = Y;
tries to lock the mutex again, it will enter into the waiting Process B
list of that mutex, which results in deadlock. It is because int Z;
no other thread can unlock the mutex.
16
B1: Z = X+1; Answer: b
B2: X = Z;
X is set to 5 before either process begins execution. As 9) Spinlocks are intended to provide __________ only.
usual, statements within a process are executed a) Mutual Exclusion
sequentially, but statements in process A may execute in b) Bounded Waiting
any order with respect to statements in process B. c) Aging
i) How many different values of X are possible after both d) Progress
processes finish executing ?
a) two Answer: b
b) three
c) four
d) eight Classic Synchronization Problems -
“The Classic Synchronization Problems”
Answer: c 1) The bounded buffer problem is also known as :
Explanation: Here are the possible ways in which a) Readers – Writers problem
statements from A and B can be interleaved. b) Dining – Philosophers problem
A1 A2 B1 B2: X = 11 c) Producer – Consumer problem
A1 B1 A2 B2: X = 6 d) None of these
A1 B1 B2 A2: X = 10
B1 A1 B2 A2: X = 10 Answer: c
B1 A1 A2 B2: X = 6
B1 B2 A1 A2: X = 12 2) In the bounded buffer problem, there are the empty and
ii) Suppose the programs are modified as follows to use a full semaphores that :
shared binary semaphore T : a) count the number of empty and full buffers
Process A b) count the number of empty and full memory spaces
int Y; c) count the number of empty and full queues
A1: Y = X*2; d) None of these
A2: X = Y;
signal(T); Answer: a
Process B
int Z; 3) In the bounded buffer problem :
B1: wait(T); a) there is only one buffer
B2: Z = X+1; b) there are n buffers ( n being greater than one but finite)
X = Z; c) there are infinite buffers
T is set to 0 before either process begins execution and, as d) the buffer size is bounded
before, X is set to 5.
Now, how many different values of X are possible after Answer: b
both processes finish executing ?
a) one 4) To ensure difficulties do not arise in the readers –
b) two writers problem, _______ are given exclusive access to the
c) three shared object.
d) four a) readers
b) writers
c) None of these
Answer: a
Explanation:The semaphore T ensures that all the Answer: b
statements from A finish execution before B begins. So
now there is only one way in which statements from A and 5) The dining – philosophers problem will occur in case of
B can be interleaved: :
A1 A2 B1 B2: X = 11. a) 5 philosophers and 5 chopsticks
8) Semaphores are mostly used to implement : b) 4 philosophers and 5 chopsticks
a) System calls c) 3 philosophers and 5 chopsticks
b) IPC mechanisms d) 6 philosophers and 5 chopsticks
c) System protection
d) None of these Answer: a

17
6) A deadlock free solution to the dining philosophers c) Neither mutual exclusion nor progress
problem : d) Both mutual exclusion and progress
a) necessarily eliminates the possibility of starvation
b) does not necessarily eliminate the possibility of Answer: d
starvation
c) eliminates any possibility of any kind of problem further
d) None of these Monitors -
“Monitors”
1) A monitor is a type of :
Answer: b a) semaphore
b) low level synchronization construct
7) All processes share a semaphore variable mutex, c) high level synchronization construct
initialized to 1. Each process must execute wait(mutex) d) None of these
before entering the critical section and signal(mutex)
afterward. Answer: c
i) Suppose a process executes in the following manner :
signal(mutex); 2) A monitor is characterized by :
….. a) a set of programmer defined operators
critical section b) an identifier
….. c) the number of variables in it
wait(mutex); d) All of these
In this situation :
a) a deadlock will occur Answer: a
b) processes will starve to enter critical section
c) several processes maybe executing in their critical 3) A procedure defined within a ________ can access only
section those variables declared locally within the _______ and its
d) All of these formal parameters.
a) process, semaphore
Answer: c b) process, monitor
c) semaphore, semaphore
ii) Suppose a process executes in the following manner d) monitor, monitor
(replacing signal with wait) :
a) a deadlock will occur
b) processes will starve to enter critical section Answer: d
c) several processes maybe executing in their critical
section 4) The monitor construct ensures that :
d) All of these a) only one process can be active at a time within the
monitor
Answer: a b) n number of processes can be active at a time within the
monitor (n being greater than 1)
8) Consider the methods used by processes P1 and P2 for c) the queue has only one process in it at a time
accessing their critical sections whenever needed, as given d) All of these
below. The initial values of shared boolean variables S1
and S2 are randomly assigned. (GATE 2010) Answer: a
Method used by P1 :
while(S1==S2); 5) The operations that can be invoked on a condition
Critical section variable are : (choose two)
S1 = S2; a) wait
Method used by P2 : b) hold
while(S1!=S2); c) signal
Critical section d) continue
S2 = not(S1);
Which of the following statements describes properties Answer: a and c
achieved ?
a) Mutual exclusion but not progress 6) The process invoking the wait operation is :
b) Progress but not mutual exclusion a) suspended until another process invokes the signal
18
operation d) All of these
b) waiting for another process to complete before it can
itself call the signal operation Answer: d
c) stopped until the next process in the queue finishes
execution 5) In the write ahead logging a _____ is maintained.
d) None of these a) a memory
b) a system
Answer: a c) a disk
d) a log record
7) If no process is suspended, the signal operation :
a) puts the system into a deadlock state Answer: d
b) suspends some default process’ execution
c) nothing happens 6) An actual update is not allowed to a data item :
d) the output is unpredictable a) before the corresponding log record is written out to
stable storage
b) after the corresponding log record is written out to
Answer: c stable storage
c) until the whole log record has been checked for
inconsistencies
Atomic Transactions - d) All of these
“Atomic Transactions”
1) A collection of instructions that performs a single
logical function is called : Answer: a
a) transaction
b) operation 7) The undo and redo operations must be _________ to
c) function guarantee correct behaviour, even if a failure occurs during
d) All of these recovery process.
a) idempotent
Answer: a b) easy
c) protected
2) A terminated transaction that has completed its d) All of these
execution successfully is ____________, otherwise it is
__________. Answer: a
a) committed, destroyed Explanation: Idempotent – Multiple executions of an
b) aborted, destroyed operation have the same result as does one execution.
c) committed, aborted 8) The system periodically performs checkpoints that
d) None of these consists of the following operation(s) :
a) Putting all the log records currently in main memory
Answer: c onto stable storage
b) putting all modified data residing in main memory onto
3) The state of the data accessed by an aborted transaction stable storage
must be restored to what it was just before the transaction c) putting a log record onto stable storage
started executing. This restoration is known as ________ d) All of these
of transaction.
a) safety Answer: d
b) protection
c) roll – back 9) Consider a transaction T1 that committed prior to
d) revert – back checkpoint. The record appears in the log before the
record. Any modifications made by T1 must have been
Answer: c written to the stable storage either with the checkpoint or
prior to it. Thus at recovery time : ( choose all that apply )
4) Write ahead logging is a way : a) There is a need to perform an undo operation on T1
a) to ensure atomicity b) There is a need to perform a redo operation on T1
b) to keep data consistent c) There is no need to perform an undo operation on T1
c) that records data on stable storage d) There is no need to perform a redo operation on T1

19
Answer: c and d a) I only
b) II only
10) Serializable schedules are ones where : c) Both I and II
a) concurrent execution of transactions is equivalent to the d) Neither I nor II
transactions executed serially
b) the transactions can be carried out one after the other Answer: b
c) a valid result occurs after execution transactions
d) None of these
Operating System Deadlock - Questions & Answers -
Answer: a Sanfoundry
deadlock in Operating System.
11) A locking protocol is one that : 1. What is the reusable resource?
a) governs how locks are acquired a) that can be used by one process at a time and is not
b) governs how locks are released depleted by that use
c) governs how locks are acquired and released b) that can be used by more than one process at a time
d) None of these c) that can be shared between various threads
d) none of the mentioned
Answer: c
Answer:a
12) The two phase locking protocol consists of : (choose
two) 2. Which of the following condition is required for
a) growing phase deadlock to be possible?
b) shrinking phase a) mutual exclusion
c) creation phase b) a process may hold allocated resources while awaiting
d) destruction phase assignment of other resources
c) no resource can be forcibly removed from a process
Answer: a and b holding it
d) all of the mentioned
13) The growing phase is a phase in which :
a) A transaction may obtain locks, but does not release any Answer:d
b) A transaction may obtain locks, and releases a few or all
of them 3. A system is in the safe state if
c) A transaction may release locks, but does not obtain any a) the system can allocate resources to each process in
new locks some order and still avoid a deadlock
d) A transaction may release locks, and does obtain new b) there exist a safe sequence
locks c) both (a) and (b)
d) none of the mentioned

Answer: a Answer:c

14) The shrinking phase is a phase in which : 4. The circular wait condition can be prevented by
a) A transaction may obtain locks, but does not release any a) defining a linear ordering of resource types
b) A transaction may obtain locks, and releases a few or all b) using thread
of them c) using pipes
c) A transaction may release locks, but does not obtain any d) all of the mentioned
new locks
d) A transaction may release locks, and does obtain new Answer:a
locks
5. Which one of the following is the deadlock avoidance
Answer: c algorithm?
a) banker’s algorithm
15) Which of the following concurrency control protocols b) round-robin algorithm
ensure both conflict serializability and freedom from c) elevator algorithm
deadlock ? d) karn’s algorithm
I) 2-phase locking
II) Time-stamp ordering
20
Answer:a in the system
d) must exceed the total number of resources available in
6. What is the drawback of banker’s algorithm? the system
a) in advance processes rarely know that how much
resource they will need Answer: c
b) the number of processes changes as time progresses
c) resource once available can disappear 2) The request and release of resources are ___________.
d) all of the mentioned a) command line statements
b) interrupts
Answer:d c) system calls
d) special programs
7. For effective operating system, when to check for
deadlock? Answer: c
a) every time a resource request is made
b) at fixed time intervals 3) Multithreaded programs are :
c) both (a) and (b) a) lesser prone to deadlocks
d) none of the mentioned b) more prone to deadlocks
c) not at all prone to deadlocks
Answer:c d) None of these

8. A problem encountered in multitasking when a process Answer: b


is perpetually denied necessary resources is called Explanation: Multiple threads can compete for shared
a) deadlock resources.
b) starvation 4) For a deadlock to arise, which of the following
c) inversion conditions must hold simultaneously ? ( choose all that
d) aging apply )
a) Mutual exclusion
Answer:b b) Starvation
c) Hold and wait
9. Which one of the following is a visual ( mathematical ) d) No preemption
way to determine the deadlock occurrence? e) Circular wait
a) resource allocation graph
b) starvation graph Answer: a, c, d and e
c) inversion graph
d) none of the mentioned 5) For Mutual exclusion to prevail in the system :
a) at least one resource must be held in a non sharable
mode
Answer:a b) the processor must be a uniprocessor rather than a
multiprocessor
10. To avoid deadlock c) there must be at least one resource in a sharable mode
a) there must be a fixed number of resources to allocate d) All of these
b) resource allocation must be done only once
c) all deadlocked processes must be aborted
d) inversion technique can be used Answer: a
Explanation: If another process requests that resource (non
Answer:a – shareable resource), the requesting process must be
delayed until the resource has been released.
6) For a Hold and wait condition to prevail :
Deadlock Prevention - a) A process must be not be holding a resource, but
“Deadlock Prevention” waiting for one to be freed, and then request to acquire it
1) The number of resources requested by a process : b) A process must be holding at least one resource and
a) must always be less than the total number of resources waiting to acquire additional resources that are being held
available in the system by other processes
b) must always be equal to the total number of resources c) A process must hold at least one resource and not be
available in the system waiting to acquire additional resources
c) must not exceed the total number of resources available
21
d) None of these 12) To ensure no preemption, if a process is holding some
resources and requests another resource that cannot be
Answer: b immediately allocated to it :
a) then the process waits for the resources be allocated to it
7) Deadlock prevention is a set of methods : b) the process keeps sending requests until the resource is
a) to ensure that at least one of the necessary conditions allocated to it
cannot hold c) the process resumes execution without the resource
b) to ensure that all of the necessary conditions do not hold being allocated to it
c) to decide if the requested resources for a process have to d) then all resources currently being held are preempted
be given or not
d) to recover from a deadlock Answer: d

Answer: a 13) One way to ensure that the circular wait condition
never holds is to :
8) For non sharable resources like a printer, mutual a) impose a total ordering of all resource types and to
exclusion : determine whether one precedes another in the ordering
a) must exist b) to never let a process acquire resources that are held by
b) must not exist other processes
c) may exist c) to let a process wait for only one resource at a time
d) None of these d) All of these

Answer: a Answer: a
Explanation: A printer cannot be simultaneously shared by
several processes.
9) For sharable resources, mutual exclusion : Deadlock Avoidance -
a) is required “Deadlock Avoidance”
b) is not required 1) Each request requires that the system consider the
c) None of these __________, _____________, ____________ to decide
whether the current request can be satisfied or must wait to
Answer: b avoid a future possible deadlock. (choose three)
Explanation: They do not require mutually exclusive a) resources currently available
access, and hence cannot be involved in a deadlock. b) processes that have previously been in the system
10) To ensure that the hold and wait condition never c) resources currently allocated to each process
occurs in the system, it must be ensured that : d) future requests and releases of each process
a) whenever a resource is requested by a process, it is not
holding any other resources Answer: a, c and d
b) each process must request and be allocated all its
resources before it begins its execution 2) Given a priori information about the ________ number
c) a process can request resources only when it has none of resources of each type that maybe requested for each
d) All of these process, it is possible to construct an algorithm that
ensures that the system will never enter a deadlock state.
Answer: d a) minimum
Explanation: c – A process may request some resources b) average
and use them. Before it can can request any additional c) maximum
resources, however it must release all the resources that it d) approximate
is currently allocated.
11) The disadvantage of a process being allocated all its Answer: c
resources before beginning its execution is :
a) Low CPU utilization 3) A deadlock avoidance algorithm dynamically examines
b) Low resource utilization the __________, to ensure that a circular wait condition
c) Very high resource utilization can never exist.
d) None of these a) resource allocation state
b) system storage state
c) operating system
Answer: b d) resources

22
Answer: a c) either a or b
Explanation: Resource allocation states are used to d) None of these
maintain the availability of the already and current
available resources. Answer: b
4) A state is safe, if :
a) the system does not crash due to deadlock occurrence 9) The resource allocation graph is not applicable to a
b) the system can allocate resources to each process in resource allocation system :
some order and still avoid a deadlock a) with multiple instances of each resource type
c) the state keeps the system protected and safe b) with a single instance of each resource type
d) All of these c) Both a and b

Answer: b Answer: a

5) A system is in a safe state only if there exists a : 10) The Banker’s algorithm is _____________ than the
a) safe allocation resource allocation graph algorithm.
b) safe resource a) less efficient
c) safe sequence b) more efficient
d) All of these c) None of these

Answer: c Answer: a

6) All unsafe states are : 11) The data structures available in the Banker’s algorithm
a) deadlocks are : (choose all that apply)
b) not deadlocks a) Available
c) fatal b) Need
d) None of these c) Allocation
d) Maximum
Answer: b e) Minimum
f) All of these
7) A system has 12 magnetic tape drives and 3 processes :
P0, P1, and P2. Process P0 requires 10 tape drives, P1 Answer: a,b,c,d
requires 4 and P2 requires 9 tape drives.
Process 12) The content of the matrix Need is :
P0 a) Allocation – Available
P1 b) Max – Available
P2 c) Max – Allocation
Maximum needs (process-wise : P0 through P2 top to d) Allocation – Max
bottom)
10
4 Answer: c
9
Currently allocated (process-wise) 13) A system with 5 processes P0 through P4 and three
5 resource types A, B, C has A with 10 instances, B with 5
2 instances, and C with 7 instances. At time t0, the following
2 snapshot has been taken :
Which of the following sequence is a safe sequence ? Process
a) P0, P1, P2 P0
b) P1, P2, P0 P1
c) P2, P0, P1 P2
d) P1, P0, P2 P3
P4
Answer: d Allocation (process-wise : P0 through P4 top to bottom)
ABC
8) If no cycle exists in the resource allocation graph : 010
a) then the system will not be in a safe state 200
b) then the system will be in a safe state 302
23
211 Answer: b
002
Max (process-wise : P0 through P4 top to bottom) 5) The disadvantage of invoking the detection algorithm
ABC for every request is :
753 a) overhead of the detection algorithm due to consumption
322 of memory
902 b) excessive time consumed in the request to be allocated
222 memory
433 c) considerable overhead in computation time
Available d) All of these
ABC
332 Answer: c
The sequence leads the system to :
a) an unsafe state 6) A deadlock eventually cripples system throughput and
b) a safe state will cause the CPU utilization to ______.
c) a protected state a) increase
d) a deadlock b) drop
c) stay still
Answer: b d) None of these

Answer: b
Deadlock Detection -
“Deadlock Detection” 7) Every time a request for allocation cannot be granted
1) The wait-for graph is a deadlock detection algorithm immediately, the detection algorithm is invoked. This will
that is applicable when : help identify : (choose all that apply)
a) all resources have a single instance a) the set of processes that have been deadlocked
b) all resources have multiple instances b) the set of processes in the deadlock queue
c) both a and b c) the specific process that caused the deadlock
d) All of these
Answer: a
Answer: a and c
2) An edge from process Pi to Pj in a wait for graph
indicates that : 8) A computer system has 6 tape drives, with ‘n’ processes
a) Pi is waiting for Pj to release a resource that Pi needs competing for them. Each process may need 3 tape drives.
b) Pj is waiting for Pi to release a resource that Pj needs The maximum value of ‘n’ for which the system is
c) Pi is waiting for Pj to leave the system guaranteed to be deadlock free is :
d) Pj is waiting for Pi to leave the system a) 2
b) 3
Answer: a c) 4
d) 1
3) If the wait for graph contains a cycle :
a) then a deadlock does not exist Answer: a
b) then a deadlock exists
c) then the system is in a safe state 9) A system has 3 processes sharing 4 resources. If each
d) either b or c process needs a maximum of 2 units then, deadlock :
a) can never occur
Answer: b b) may occur
c) has to occur
4) If deadlocks occur frequently, the detection algorithm d) None of these
must be invoked ________.
a) rarely
b) frequently Answer: a
c) None of these
10) ‘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
24
than m+n. In this setup, deadlock : Answer: a, b, c, d, e, f
a) can never occur
b) may occur 5) Cost factors of process termination include : (choose all
c) has to occur that apply)
d) None of these a) number of resources the deadlock process is holding
b) CPU utilization at the time of deadlock
Answer: a c) amount of time a deadlocked process has thus far
consumed during its execution
d) All of the above
Operating System Questions and Answers for
Experienced | Sanfoundry Answer: a and c
“Deadlock Recovery” and will also be useful for interview
preparations for experienced people. 6) If we preempt a resource from a process, the process
1) A deadlock can be broken by : (choose all that apply) cannot continue with its normal execution and it must be :
a) abort one or more processes to break the circular wait a) aborted
b) abort all the process in the system b) rolled back
c) preempt all resources from all processes c) terminated
d) to preempt some resources from one or more of the d) queued
deadlocked processes
Answer: b
Answer: a and d
7) To _______ to a safe state, the system needs to keep
2) The two ways of aborting processes and eliminating more information about the states of processes.
deadlocks are : (choose all that apply) a) abort the process
a) Abort all deadlocked processes b) roll back the process
b) Abort all processes c) queue the process
c) Abort one process at a time until the deadlock cycle is d) None of these
eliminated
d) All of these Answer: b

Answer: a and c 8) If the resources are always preempted from the same
process, __________ can occur.
3) Those processes should be aborted on occurrence of a a) deadlock
deadlock, the termination of which : b) system crash
a) is more time consuming c) aging
b) incurs minimum cost d) starvation
c) safety is not hampered
d) All of these
Answer: d
Answer: b
9) The solution to starvation is :
4) The process to be aborted is chosen on the basis of the a) the number of rollbacks must be included in the cost
following factors : (choose all that apply) factor
a) priority of the process b) the number of resources must be included in resource
b) process is interactive or batch preemption
c) how long the process has computed c) resource preemption be done instead
d) how much more long before its completion d) All of these
e) how many more resources the process needs before its
completion Answer: a
f) how many and what type of resources the process has
used
g) how many resources are available in the system Memory Management - Swapping Processes - 1 -
h) All of these “Memory Management – Swapping processes”
1) Address Binding is :
a) going to an address in memory
b) locating an address with the help of another address
25
c) binding two addresses together to form a new address in d) None of these
a different memory space
d) a mapping from one address space to another Answer: a

Answer: d 8) The ___________ swaps processes in and out of the


memory.
2) Binding of instructions and data to memory addresses a) memory manager
can be done at : b) CPU
a) Compile time c) CPU manager
b) Load time d) user
c) Execution time
d) All of these Answer: a

Answer: d 9) If a higher priority process arrives and wants service,


the memory manager can swap out the lower priority
3) If the process can be moved during its execution from process to execute the higher priority process. When the
one memory segment to another, then binding must be : higher priority process finishes, the lower priority process
a) delayed until run time is swapped back in and continues execution. This variant
b) preponed to compile time of swapping is sometimes called :
c) preponed to load time a) priority swapping
d) None of these b) pull out, push in
c) roll out, roll in
Answer: a d) None of these

4) Dynamic loading is : Answer: c


a) loading multiple routines dynamically
b) loading a routine only when it is called 10) If binding is done at assembly or load time, then the
c) loading multiple routines randomly process _____ be moved to different locations after being
d) None of these swapped out and in again.
a) can
Answer: b b) must
c) can never
5) The advantage of dynamic loading is that : d) may
a) a used routine is used multiple times
b) an unused routine is never loaded
c) CPU utilization increases Answer: c
d) All of these
11) In a system that does not support swapping,
a) the compiler normally binds symbolic addresses
Answer: b (variables) to relocatable addresses
b) the compiler normally binds symbolic addresses to
6) The idea of overlays is to : (choose all that apply) physical addresses
a) enable multiple processes execute at once c) the loader binds relocatable addresses to physical
b) enable a process to be larger than the amount of addresses
memory allocated to it d) binding of symbolic addresses to physical addresses
c) keep in memory only those instructions and data that are normally takes place during execution
needed at any given time
d) All of these Answer: a, c

Answer: b and c 12) Which of the following is TRUE ?


a) Overlays are used to increase the size of physical
7) The ___________ must design and program the overlay memory
structure. b) Overlays are used to increase the logical address space
a) programmer c) When overlays are used, the size of a process is not
b) system architect limited to the size of the physical memory
c) system designer d) Overlays are used whenever the physical address space
26
is smaller than the logical address space d) may

Answer: c Answer: d

7) Swapping requires a __________.


Operating System Interview Questions and Answers a) motherboard
for Experienced | Sanfoundry b) keyboard
“Memory Management – Swapping processes” and will c) monitor
also be useful for interview preparations for experienced d) backing store
people.
1) The address generated by the CPU is referred to as : Answer: d
a) physical address
b) logical address 8) The backing store is generally a : (choose all that apply)
c) Neither a nor b a) fast disk
b) disk large enough to accommodate copies of all
Answer: b memory images for all users
c) disk to provide direct access to the memory images
2) The address loaded into the memory address register of d) All of these
the memory is referred to as :
a) physical address Answer: d
b) logical address
c) Neither a nor b 9) The ________ consists of all processes whose memory
images are in the backing store or in memory and are
Answer: a ready to run.
a) wait queue
3) The run time mapping from virtual to physical b) ready queue
addresses is done by a hardware device called the : c) CPU
a) Virtual to physical mapper d) secondary storage
b) memory management unit
c) memory mapping unit Answer: b
d) None of these
10) The _________ time in a swap out of a running
Answer: b process and swap in of a new process into the memory is
very high.
4) The base register is also known as the : a) context – switch
a) basic register b) waiting
b) regular register c) execution
c) relocation register d) All of these
d) delocation register
Answer: a
Answer: c
11) The major part of swap time is _______ time.
5) The size of a process is limited to the size of : a) waiting
a) physical memory b) transfer
b) external storage c) execution
c) secondary storage d) None of these
d) None of these

Answer: b
Answer: a
12) Swapping _______ be done when a process has
6) If execution time binding is being used, then a process pending I/O, or has to execute I/O operations only into
______ be swapped to a different memory space. operating system buffers.
a) has to be a) must
b) can never b) can
c) must c) must never
27
d) maybe

Answer: c Answer: a

13) Swap space is allocated : 6) The operating system and the other processes are
a) as a chunk of disk protected from being modified by an already running
b) separate from a file system process because :
c) into a file system a) they are in different memory spaces
d) All of these b) they are in different logical addresses
c) they have a protection algorithm
Answer: a and b d) every address generated by the CPU is being checked
against the relocation and limit registers

Memory Management - Memory Allocation - 1 - Answer: d


“Memory Management – Memory Allocation”
1) The main memory accommodates : 7) Transient operating system code is code that :
a) operating system a) is not easily accessible
b) CPU b) comes and goes as needed
c) user processes c) stays in the memory always
d) All of these d) never enters the memory space

Answer: a and c Answer: b

2) The operating system is : 8) Using transient code, _______ the size of the operating
a) in the low memory system during program execution.
b) in the high memory a) increases
c) either a or b (depending on the location of interrupt b) decreases
vector) c) changes
d) None of these d) maintains

Answer: c Answer: c

3) In contiguous memory allocation : 9) When memory is divided into several fixed sized
a) each process is contained in a single contiguous section partitions, each partition may contain ________.
of memory a) exactly one process
b) all processes are contained in a single contiguous b) atleast one process
section of memory c) multiple processes at once
c) the memory space is contiguous d) None of these
d) None of these
Answer: a
Answer: a
10) In fixed sized partition, the degree of
4) The relocation register helps in : multiprogramming is bounded by ___________.
a) providing more address space to processes a) the number of partitions
b) a different address space to processes b) the CPU utilization
c) to protect the address spaces of processes c) the memory size
d) None of these d) All of these

Answer: c
Answer: a
5) With relocation and limit registers, each logical address
must be _______ the limit register. 11) The first fit, best fit and worst fit are strategies to
a) less than select a ______.
b) equal to a) process from a queue to put in memory
c) greater than b) processor to run the next process
d) None of these c) free hole from a set of available holes
28
d) All of these b) absolute address
c) physical address
Answer: c d) relative address
Answer:a
8. The page table contains
Operating System Questions & Answers – Memory a) base address of each page in physical memory
Management b) page offset
memory management of Operating System. c) page size
1. CPU fetches the instruction from memory according to d) none of the mentioned
the value of Answer:a
a) program counter advertisements
b) status register 9. What is compaction?
c) instruction register a) a technique for overcoming internal fragmentation
d) program status word b) a paging technique
Answer:a c) a technique for overcoming external fragmentation
2. A memory buffer used to accommodate a speed d) a technique for overcoming fatal error
differential is called Answer:c
a) stack pointer 10. Operating System maintains the page table for
b) cache a) each process
c) accumulator b) each thread
d) disk buffer c) each instruction
Answer:b d) each address
3. Which one of the following is the address generated by Answer:a
CPU? Operating System Test | Sanfoundry
a) physical address This set of 1000+ Operating System Test focuses on
b) absolute address “Memory Management – Memory Allocation”
c) logical address 1) In internal fragmentation, memory is internal to a
d) none of the mentioned partition and :
Answer:c a) is being used
4. Run time mapping from virtual to physical address is b) is not being used
done by c) is always used
a) memory management unit d) None of these
b) CPU
c) PCI Answer: b
d) none of the mentioned
2) A solution to the problem of external fragmentation is :
Answer:a
a) compaction
advertisements
b) larger memory space
5. Memory management technique in which system stores c) smaller memory space
and retrieves data from secondary storage for use in main d) None of these
memory is called
a) fragmentation Answer: a
b) paging
c) mapping 3) Another solution to the problem of external
d) none of the mentioned fragmentation problem is to :
Answer:b a) permit the logical address space of a process to be
6. The address of a page table in memory is pointed by noncontiguous
a) stack pointer b) permit smaller processes to be allocated memory at last
b) page table base register c) permit larger processes to be allocated memory at last
c) page register d) All of these
d) program counter
Answer: a
Answer:b
7. Program always deals with
a) logical address
29
4) If relocation is static and is done at assembly or load Answer: b
time, compaction _________.
a) cannot be done 10) When the memory allocated to a process is slightly
b) must be done larger than the process, then :
c) must not be done a) internal fragmentation occurs
d) can be done b) external fragmentation occurs
c) both a and b
d) neither a nor b
Answer: a
Answer: a
5) 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 : Memory Management - Paging - 1 -
a) the cost incurred “Memory Management – Paging”
b) the memory used 1) Physical memory is broken into fixed-sized blocks
c) the CPU used called ________.
d) All of these a) frames
b) pages
Answer: a c) backing store
d) None of these
6) __________ is generally faster than _________ and
_________. Answer: a
a) first fit, best fit, worst fit
b) best fit, first fit, worst fit 2) Logical memory is broken into blocks of the same size
c) worst fit, best fit, first fit called _________.
d) None of these a) frames
b) pages
Answer: a c) backing store
d) None of these
7) External fragmentation exists when :
a) enough total memory exists to satisfy a request but it is Answer: b
not contiguous
b) the total memory is insufficient to satisfy a request 3) Every address generated by the CPU is divided into two
c) a request cannot be satisfied even when the total parts : (choose two)
memory is free a) frame bit
d) None of these b) page number
c) page offset
Answer: a d) frame offset

8) External fragmentation will not occur when : Answer: b and c


a) first fit is used
b) best fit is used 4) The __________ is used as an index into the page table.
c) worst fit is used a) frame bit
d) no matter which algorithm is used, it will always occur b) page number
c) page offset
Answer: d d) frame offset

9) Sometimes the overhead of keeping track of a hole Answer: b


might be :
a) larger than the memory 5) The _____ table contains the base address of each page
b) larger than the hole itself in physical memory.
c) very small a) process
d) All of these b) memory
c) page
d) frame

30
Answer: c Answer: d

6) The size of a page is typically : 12) The page table registers should be built with _______.
a) varied a) very low speed logic
b) power of 2 b) very high speed logic
c) power of 4 c) a large memory space
d) None of these d) None of these

Answer: b Answer: b

7) If the size of logical address space is 2 to the power of 13) For larger page tables, they are kept in main memory
m, and a page size is 2 to the power of n addressing units, and a __________ points to the page table.
then the high order _____ bits of a logical address a) page table base register
designate the page number, and the ____ low order bits b) page table base pointer
designate the page offset. c) page table register pointer
a) m, n d) page table base
b) n, m
c) m – n, m Answer: a
d) m – n, n
14) For every process there is a __________.
Answer: d a) page table
b) copy of page table
8) With paging there is no ________ fragmentation. c) pointer to page table
a) internal d) All of these
b) external
c) either type of Answer: a
d) None of these
15) Time taken in memory access through PTBR is :
Answer: b a) extended by a factor of 3
b) extended by a factor of 2
9) The operating system maintains a ______ table that c) slowed by a factor of 3
keeps track of how many frames have been allocated, how d) slowed by a factor of 2
many are there, and how many are available.
a) page Answer: d
b) mapping
c) frame
d) memory Operating System Quiz | Sanfoundry
This set of 1000+ Operating System Quiz focuses on
Answer: c “Memory Management – Paging”
1) Each entry in a Translation look-aside buffer (TLB)
10) Paging increases the ______ time. consists of :
a) waiting a) key
b) execution b) value
c) context – switch c) bit value
d) All of these d) constant

Answer: c Answer: a and b

11) Smaller page tables are implemented as a set of 2) If a page number is not found in the TLB, then it is
_______. known as a :
a) queues a) TLB miss
b) stacks b) buffer miss
c) counters c) TLB hit
d) registers d) TLB hit

31
Answer: a 9) In a paged memory, the page hit ratio is 0.35. The
required to access a page in secondary memory is equal to
3) An ______ uniquely identifies processes and is used to 100 ns. The time required to access a page in primary
provide address space protection for that process. memory is 10 ns. The average time required to access a
a) address space locator page is :
b) address space identifier a) 3.0 ns
c) address process identifier b) 68.0 ns
d) None of these c) 68.5 ns
d) 78.5 ns
Answer: b
Answer: c
4) The percentage of times a page number is found in the
TLB is known as : 10) To obtain better memory utilization, dynamic loading
a) miss ratio is used. With dynamic loading, a routine is not loaded until
b) hit ratio it is called. For implementing dynamic loading,
c) miss percent a) special support from hardware is required
d) None of these b) special support from operating system is essential
c) special support from both hardware and operating
Answer: b system is essential
d) user programs can implement dynamic loading without
5) Memory protection in a paged environment is any special support from hardware or operating system
accomplished by :
a) protection algorithm with each page
b) restricted access rights to users Answer: d
c) restriction on page visibility
d) protection bit with each page 11) In paged memory systems, if the page size is
increased, then the internal fragmentation generally :
a) becomes less
Answer: d b) becomes more
c) remains constant
6) When the valid – invalid bit is set to valid, it means that d) None of these
the associated page :
a) is in the TLB Answer: b
b) has data in it
c) is in the process’s logical address space
d) is the system’s physical address space Memory Management - Segmentation -
“Memory Management – Segmentation”
Answer: c 1) In segmentation, each address is specified by :
a) a segment number
7) Illegal addresses are trapped using the _____ bit. b) an offset
a) error c) a value
b) protection d) a key
c) valid – invalid
d) access Answer: a and b

Answer: c 2) In paging the user provides only ________, which is


partitioned by the hardware into ________ and ______.
8) When there is a large logical address space, the best a) one address, page number, offset
way of paging would be : b) one offset, page number, address
a) not to page c) page number, offset, address
b) a two level paging algorithm d) None of these
c) to page the page table itself
d) All of these Answer: a

Answer: b and c 3) Each entry in a segment table has a :


a) segment base
32
b) segment peak d) None of these
c) segment limit
d) segment value Answer: b and c

Answer: a and c 10) If there are 32 segments, each of size 1Kb, then the
logical address should have :
4) The segment base contains the : a) 13 bits
a) starting logical address of the process b) 14 bits
b) starting physical address of the segment in memory c) 15 bits
c) segment length d) 16 bits
d) None of these

Answer: b Answer: a
Explanation: To specify a particular segment, 5 bits are
5) The segment limit contains the : required. To select a particular byte after selecting a page,
a) starting logical address of the process 10 more bits are required. Hence 15 bits are required.
b) starting physical address of the segment in memory 11) Consider a computer with 8 Mbytes of main memory
c) segment length and a 128 K cache. The cache block size is 4 K. It uses a
d) None of these direct mapping scheme for cache management. How many
different main memory blocks can map onto a given
physical cache block ?
Answer: c a) 2048
b) 256
6) The offset ‘d’ of the logical address must be : c) 64
a) greater than segment limit d) 8
b) between 0 and segment limit
c) between 0 and the segment number Answer: c
d) greater than the segment number
12) A multilevel page table is preferred in comparison to a
Answer: b single level page table for translating virtual address to
physical address because :
7) If the offset is legal : a) it reduces the memory access time to read or write a
a) it is used as a physical memory address itself memory location
b) it is subtracted from the segment base to produce the b) it helps to reduce the size of page table needed to
physical memory address implement the virtual address space of a process
c) it is added to the segment base to produce the physical c) it is required by the translation look aside buffer
memory address d) it helps to reduce the number of page faults in page
d) None of these replacement algorithms

Answer: a Answer: b

8) When the entries in the segment tables of two different


processes point to the same physical location : I/O System - Application I/O Interface - 1 -
a) the segments are invalid “I/O System – Application I/O Interface”
b) the processes get blocked 1) If one or more devices use a common set of wires to
c) segments are shared communicate with the computer system, the connection is
d) All of these called ______.
a) CPU
Answer: c b) Monitor
c) wirefull
9) The protection bit is 0/1 based on : (choose all that d) bus
apply)
a) write only Answer : d
b) read only
c) read – write 2) A ____ a set of wires and a rigidly defined protocol that
specifies a set of messages that can be sent on the wires.
33
a) port 8) The ______ register is written by the host to send
b) node output.
c) bus a) status
d) None of these b) control
c) data in
Answer : c d) data out

3) When device A has a cable that plugs into device B, and Answer : d
device B has a cable that plugs into device C and device C
plugs into a port on the computer, this arrangement is 9) The hardware mechanism that allows a device to notify
called a _________. the CPU is called _______.
a) port a) polling
b) daisy chain b) interrupt
c) bus c) driver
d) cable d) controlling

Answer : b Answer : b

4) The _________ present a uniform device-access 10) The CPU hardware has a wire called __________ that
interface to the I/O subsystem, much as system calls the CPU senses after executing every instruction.
provide a standard interface between the application and a) interrupt request line
the operating system. b) interrupt bus
a) devices c) interrupt receive line
b) buses d) interrupt sense line
c) device drivers
d) I/O systems Answer : a

Answer : c 11) The _________ determines the cause of the interrupt,


performs the necessary processing and executes a return
5) A ________ is a collection of electronics that can from the interrupt instruction to return the CPU to the
operate a port, a bus, or a device. execution state prior to the interrupt.
a) controller a) interrupt request line
b) driver b) device driver
c) host c) interrupt handler
d) bus d) All of these

Answer : a Answer : c

6) An I/O port typically consists of four registers status, 12) In general the two interrupt request lines are :
control, ________ and ________ registers. a) nonmaskable interrupt
a) system in, system out b) blocked interrupt
b) data in, data out c) maskable interrupt
c) flow in, flow out d) None of these
d) input, output
Answer : a and c
Answer : b
13) The _________ are reserved for events such as
7) The ______ register is read by the host to get input. unrecoverable memory errors.
a) flow in a) nonmaskable interrupts
b) flow out b) blocked interrupts
c) data in c) maskable interrupts
d) data out d) None of these

Answer : c Answer : a

34
d) None of these
Tricky
This set of 1000+ Tricky Operating System Questions and Answer : a
Answers focuses on “I/O System – Application I/O
Interface” 7) A block device transfers :
1) The ________ can be turned off by the CPU before the a) bytes one by one
execution of critical instruction sequences that must not be b) block of bytes as a unit
interrupted. c) with unpredictable response times
a) nonmaskable interrupt d) None of these
b) blocked interrupt
c) maskable interrupt Answer : b
d) None of these
8) A dedicated device is : (choose all that apply)
Answer : c a) opposite to a sharable device
b) same as a sharable device
2) The __________ is used by device controllers to request c) can be used concurrently by several processes
service. d) cannot be used concurrently by several processes
a) nonmaskable interrupt
b) blocked interrupt Answer : a and d
c) maskable interrupt
d) None of these 9) A keyboard is an example of a device that is accessed
through a __________ interface.
Answer : c a) block stream
b) set of blocks
3) The interrupt vector contains : c) character stream
a) the interrupts d) None of these
b) the memory addresses of specialized interrupt handlers
c) the identifiers of interrupts Answer : c
d) the device addresses
10) In polling :
Answer : b a) busy – wait cycles wait for I/O from device
b) interrupt handler receives interrupts
4) Division by zero, accessing a protected or non existent c) interrupt-request line is triggered by I/O device
memory address, or attempting to execute a privileged d) All of these
instruction from user mode are all categorized as
________.
a) errors Answer : a
b) exceptions
c) interrupt handlers 11) A non blocking system call _________________.
d) All of these a) halts the execution of the application for an extended
time
Answer : b b) does not halt the execution of the application
c) does not block the interrupts
5) For large data transfers, _________ is used. d) None of these
a) DMA
b) programmed I/O Answer : b
c) controller register
d) None of these 12) An asynchronous call :
a) returns immediately, without waiting for the I/O to
complete
Answer : a b) does not return immediately and waits for the I/O to
complete
6) A character stream device transfers : c) consumes a lot of time
a) bytes one by one d) is too slow
b) block of bytes as a unit
c) with unpredictable response times
35
Answer : a a) message – passing
b) draft – passing
c) secondary memory
I/O System - Kernel I/O Subsystems - d) cache
“Kernel I/O Subsystems”
1) Buffering is done to : Answer : a
a) cope with device speed mismatch
b) cope with device transfer size mismatch 8) A ________ is a full duplex connection between a
c) maintain copy semantics device driver and a user level process.
d) All of these a) bus
b) I/O operation
Answer : d c) stream
d) flow
2) Caching is ________ spooling.
a) same as Answer : c
b) not the same as
c) None of these 9) I/O is a _________ in system performance.
a) major factor
Answer : b b) minor factor
c) does not matter
3) Caching : (choose all that apply) d) None of these
a) holds a copy of the data
b) is fast memory
c) holds the only copy of the data Answer : a
d) holds output for a device
10) If the number of cycles spent busy – waiting is not
Answer : a and b excessive, then :
a) interrupt driven I/O is more efficient than programmed
4) Spooling : (choose all that apply) I/O
a) holds a copy of the data b) programmed I/O is more efficient than interrupt driven
b) is fast memory I/O
c) holds the only copy of the data c) Both programmed and interrupt driven I/O are equally
d) holds output for a device efficient
d) None of these

Answer : c and d Answer : b

5) The ________ keeps state information about the use of


I/O components. Real Time Operating System
a) CPU Real Time Operating System.
b) OS 1. In real time operating system
c) kernel a) all processes have the same priority
d) shell b) a task must be serviced by its deadline period
c) process scheduling can be done only once
Answer : c d) kernel is not required

6) The kernel data structures include : Answer:b


a) process table
b) open file table 2. Hard real time operating system has ___ jitter than a soft
c) close file table real time operating system.
d) All of these a) less
b) more
Answer : b c) equal
d) none of the mentioned
7) Windows NT uses a __________ implementation for
I/O
36
Answer:a Answer:c
Explanation:Jitter is the undesired deviation from the true
periodicity. 9. Which one of the following is a real time operating
3. For real time operating systems, interrupt latency should system?
be a) RTLinux
a) minimal b) VxWorks
b) maximum c) windows CE
c) zero d) all of the mentioned
d) dependent on the scheduling

Answer:a Answer:d
Explanation:Interrupt latency is the time duration between
the generation of interrupt and execution of its service. 10. VxWorks is centered around
4. In rate monotonic scheduling a) wind microkernel
a) shorter duration job has higher priority b) linux kernel
b) longer duration job has higher priority c) unix kernel
c) priority does not depend on the duration of the job d) none of the mentioned
d) none of the mentioned
Answer:a
Answer:a

5. In which scheduling certain amount of CPU time is Real Time System - Implementing RT Operating
allocated to each process? Systems - 1 -
a) earliest deadline first scheduling “Real Time System – Implementing RT Operating
b) proportional share scheduling Systems”
c) equal share scheduling 1) The disadvantage of real addressing mode is :
d) none of the mentioned a) there is a lot of cost involved
b) time consumption overhead
c) absence of memory protection between processes
Answer:b d) restricted access to memory locations by processes

6. The problem of priority inversion can be solved by Answer : c


a) priority inheritance protocol
b) priority inversion protocol 2) Preemptive, priority based scheduling guarantees :
c) both (a) and (b) a) hard real time functionality
d) none of the mentioned b) soft real time functionality
c) protection of memory
Answer:a d) None of these

7. Time duration required for scheduling dispatcher to stop Answer : b


one process and start another is known as
a) process latency 3) Real time systems must have :
b) dispatch latency a) preemptive kernels
c) execution latency b) non preemptive kernels
d) interrupt latency c) a or b
d) neither a nor b
Answer:b
Answer : a
8. Time required to synchronous switch from the context
of one thread to the context of another thread is called 4) Event latency is :
a) threads fly-back time a) the amount of time an event takes to occur from when
b) jitter the system started
c) context switch time b) the amount of time from the event occurance till the
d) none of the mentioned system stops
c) the amount of time from event occurance till the event
crashes
37
d) the amount of time that elapses from when an event This set of 1000+ Tough Operating System Questions
occurs to when it is serviced. focuses on “Real Time System – Implementing RT
Operating Systems”
1) In a real time system the computer results : (choose all
Answer : d that apply)
a) must be produced withing a specific deadline period
5) Interrupt latency refers to the period of time : b) may be produced at any time
a) from the occurance of an event to the arrival of an c) may be correct
interrupt d) must be correct
b) from the occurance of an event to the servicing of an
interrupt Answer : a and d
c) from arrival of an interrupt to the start of the interrupt
service routine 2) In a safety critical system, incorrect operation :
d) None of these a) does not affect much
b) causes minor problems
Answer : c c) causes major and serious problems
d) None of these
6) Real time systems need to __________ the interrupt
latency. Answer : c
a) minimize
b) maximize 3) Antilock brake systems, flight management systems,
c) not bother about pacemakers are examples of :
d) None of these a) safety critical system
b) hard real time system
Answer : a c) soft real time system
d) a and b
7) The amount of time required for the scheduling
dispatcher to stop one process and start another is known Answer : d
as ______________.
a) event latency 4) In a ______ real time system, it is guaranteed that
b) interrupt latency critical real time tasks will be completed within their
c) dispatch latency deadlines.
d) context switch a) soft
b) hard
Answer : c c) critical
d) None of these
8) The most effective technique to keep dispatch latency
low is to :
a) provide non preemptive kernels Answer : b
b) provide preemptive kernels
c) make it user programmed 5) Some of the properties of real time systems include :
d) run less number of processes at a time a) single purpose
b) multi – purpose
c) small size
Answer : b d) large size
e) inexpensively mass produced
9) Priority inversion is solved by use of _____________. f) expensive and minor production
a) priority inheritance protocol g) None of these
b) two phase lock protocol
c) time protocol Answer : a, c, e
d) All of these
6) The amount of memory in a real time system is
Answer : a generally :
a) less compared to PCs
b) high compared to PCs
Tough Operating System Questions | Sanfoundry c) same as in PCs
38
d) they do not have any memory c) None of these

Answer : a Answer : b

7) The priority of a real time task : 4) In Question number 2, can the two processes be
a) must degrade over time scheduled using the EDF algorithm without missing their
b) must not degrade over time respective deadlines ?
c) may degrade over time a) Yes
d) None of these b) No
c) Maybe
Answer : b

8) Memory management units : Answer : a


a) increase the cost of the system
b) increase the power consumption of the system 5) Using EDF algorithm practically, it is impossible to
c) increase the time required to complete an operation achieve 100 percent utilization due to : (choose all that
d) All of these apply)
a) the cost of context switching
b) interrupt handling
Answer : d c) power consumption
d) All of these
9) The technique in which the CPU generates physical
addresses directly is known as : Answer : a and b
a) relocation register method
b) real addressing 6) T shares of time are allocated among all processes out
c) virtual addressing of N shares in __________ scheduling algorithm.
d) None of these a) rate monotonic
b) proportional share
Answer : b c) earliest deadline first
d) None of these

Real Time System - Real Time CPU Scheduling - 1 - Answer : b


“Real Time System – Real Time CPU Scheduling”
1) Earliest deadline first algorithm assigns priorities 7) If there are a total of T = 100 shares to be divided
according to : among three processes, A, B and C. A is assigned 50
a) periods shares, B is assigned 15 shares and C is assigned 20
b) deadlines shares.
c) burst times i) A will have ______ percent of the total processor time.
d) None of these a) 20
b) 15
Answer : b c) 50
d) None of these
2) A process P1 has a period of 50 and a CPU burst of t1 =
25, P2 has a period of 80 and a CPU burst of 35. The total Answer : c
CPU utilization is :
a) 0.90 ii) B will have ______ percent of the total processor time.
b) 0.74 a) 20
c) 0.94 b) 15
d) 0.80 c) 50
d) None of these
Answer : c
Answer : b
3) In the above question, the priorities of P1 and P2 :
a) remain the same throughout iii) C will have ______ percent of the total processor time.
b) keep varying from time to time a) 20
b) 15
39
c) 50 a) the cost of context switching
d) None of these b) interrupt handling
c) power consumption
d) All of these
Answer : a
Answer : a and b
iv) If a new process D requested 30 shares, the admission
controller would : 6) T shares of time are allocated among all processes out
a) allocate 30 shares to it of N shares in __________ scheduling algorithm.
b) deny entry to D in the system a) rate monotonic
c) None of these b) proportional share
c) earliest deadline first
Answer : b d) None of these

Answer : b
Real Time System - Real Time CPU Scheduling - 1 -
“Real Time System – Real Time CPU Scheduling” 7) If there are a total of T = 100 shares to be divided
1) Earliest deadline first algorithm assigns priorities among three processes, A, B and C. A is assigned 50
according to : shares, B is assigned 15 shares and C is assigned 20
a) periods shares.
b) deadlines i) A will have ______ percent of the total processor time.
c) burst times a) 20
d) None of these b) 15
c) 50
Answer : b d) None of these

2) A process P1 has a period of 50 and a CPU burst of t1 = Answer : c


25, P2 has a period of 80 and a CPU burst of 35. The total
CPU utilization is : ii) B will have ______ percent of the total processor time.
a) 0.90 a) 20
b) 0.74 b) 15
c) 0.94 c) 50
d) 0.80 d) None of these

Answer : c Answer : b

3) In the above question, the priorities of P1 and P2 : iii) C will have ______ percent of the total processor time.
a) remain the same throughout a) 20
b) keep varying from time to time b) 15
c) None of these c) 50
d) None of these
Answer : b

4) In Question number 2, can the two processes be Answer : a


scheduled using the EDF algorithm without missing their
respective deadlines ? iv) If a new process D requested 30 shares, the admission
a) Yes controller would :
b) No a) allocate 30 shares to it
c) Maybe b) deny entry to D in the system
c) None of these

Answer : a Answer : b

5) Using EDF algorithm practically, it is impossible to


achieve 100 percent utilization due to : (choose all that Multimedia System - CPU and Disk Scheduling -
apply) “Multimedia System – CPU and Disk Scheduling”
40
1) A scheduling algorithm can use either ___________ Answer : a
priority or ________ priority.
a) static, still 7) Multimedia systems require _________ scheduling to
b) static, dynamic ensure critical tasks will be serviced within timing
c) live, dead deadlines.
d) None of these a) soft real time
b) hard real time
Answer : b c) normal
d) None of these
2) The priority of a process will ______________ if the
scheduler assigns it a static priority. Answer : b
a) change
b) remain unchanged 8) The EDF scheduler uses ________ to order requests
c) depends on the operating system according to their deadlines.
d) None of these a) stack
b) disks
Answer : b c) queue
d) None of these
3) As disks have relatively low transfer rates and relatively
high latency rates, disk schedulers must reduce latency
times to : Answer : c
a) ensure high bandwidth
b) ensure low bandwidth 9) In SCAN – EDF, requests with the same deadlines are
c) make sure data is transferred ordered according to :
d) reduce data transfer speeds a) SCAN policy
b) EDF policy
Answer : a c) FCFS policy
d) FIFO policy
4) Servicing requests strictly according to deadline using
EDF may result in : Answer : a
a) lower seek times
b) lower bandwidth
c) higher seek time Operating System Questions for Campus Interviews |
d) higher bandwidth Sanfoundry
“Multimedia System – Network Management” and will
also be useful for campus interviews.
Answer : c 1) The three general methods for delivering content from a
server to a client across a network are :
5) The hybrid algorithm that combines EDF with SCAN a) unicasting
algorithm is known as : b) duplex-casting
a) EDS c) broadcasting
b) SDF d) multicasting
c) SCAN-EDF
d) None of these Answer : a, c, d

Answer : c 2) Unicasting delivers the content to :


a) a single client
6) If several requests have different deadlines that are b) all clients, regardless whether they want the content or
relaticely close together, then using the SCAN – EDF not
algorithm : c) a group of receivers who indicate they wish to receive
a) the SCAN ordering will service the requests in that the content
batch d) None of these
b) the EDF ordering will service the requests in that batch
c) the FCFS ordering will service the requests in that batch Answer : a
d) None of these

41
3) Broadcasting delivers the content to : Answer : c
a) a single client
b) all clients, regardless whether they want the content or 9) In the TEARDOWN state :
not a) the server breaks down the connection and releases the
c) a group of receivers who indicate they wish to receive resources allocated for the session
the content b) the client breaks down the connection and releases the
d) None of these resources allocated for the session
c) the system crashes
Answer : b d) None of these

4) Multicasting delivers the content to : Answer : a


a) a single client
b) all clients, regardless whether they want the content or 10) RTP stands for :
not a) real time protocol
c) a group of receivers who indicate they wish to receive b) real time transmission control protocol
the content c) real time transmission protocol
d) None of these d) real time transport protocol

Answer : c Answer : d

5) RTSP stands for : 11) The problem with unicast delivery is that the :
a) Real Time Streaming Policy a) memory allocation is difficult
b) Real Time Streaming Protocol b) server must establish a seperate unicast session for each
c) Real Time Systems Protocol client
d) Read Time Streaming Policy c) the routers must support unicasting
d) the clients must be close to the server

Answer : b
Answer : b
6) HTTP is __________. (choose two)
a) a stateful protocol 12) The difficulty with multicasting from a practical point
b) a stateless protocol of view is : (choose all that apply)
c) a protocol that maintains the status of its connection a) memory allocation is difficult
with the client b) server must establish a seperate unicast session for each
d) a protocol that does not maintain the status of its client
connection with the client c) the routers must support multicasting
d) the clients must be close to the server
Answer : b and d
Answer : c and d
7) RTSP includes the following states :
a) SETUP 13) To let a client have random access to a media stream :
b) PLAY a) the protocol used must not be stateless
c) PAUSE b) the server must support download
d) STOP c) the stream should give access rights to the client
e) TEARDOWN d) All of these
f) REPLAY
g) All of these Answer : a

Answer : a, b, c and e
Security - User Authentication -
8) In the SETUP state : “Security – User Authentication”
a) the server is setup 1) Which of the following are forms of malicious attack ?
b) the client is setup a) Theft of information
c) the server allocates resources for the client session b) Modification of data
d) the client sends requests to the server c) Wiping of information

42
d) All of the mentioned d) !augustdelhi

Answer: d Answer: c
Explanation: It has a combination of Alphabet both capital
2) What are common security threats ? and small along with number and special character. Thus
a) File Shredding always use complex password with combination of all
b) File sharing and permission these.
c) File corrupting 8) Why is one time password safe ?
d) File integrity a) It is easy to generated
b) It cannot be shared
Answer: b c) It is different for every access
Explanation: Sharing and associated permissions are usual d) It is a complex enctypted password
exploits which can compromised the system.
3) From the following, which is not a common file Answer: c
permission ? Explanation: One time password is safe since it is
a) Write generated per access and thus cannot be brute forced or
b) Execute deduced.
c) Stop 9) What does Light Directory Access Protocol (LDAP)
d) Read doesn’t store ?
a) Users
Answer: c b) Address
c) Passwords
4) Which of the following is a good practice ? d) Security Keys
a) Give full permission for remote transferring
b) Grant read only permission Answer: b
c) Grant limited permission to specified account
d) Give both read and write permission but not execute. 10) What is characteristic of RADIUS system ?
a) It is essential for centralized encryption and
Answer: c authentication
Explanation: limited access is a key method to circumvent b) It works on Network layer to deny access to
unauthorized access and exploits. unauthorized people
5) What is not a good practice for user administration ? c) It provides centralized authentication mechanism via
a) Isolating a system after a compromise network devices
b) Perform random auditing procedures d) It’s a strong File access system.
c) Granting privileges on a per host basis
d) Using telnet and FTP for remote access. Answer: c

Answer: d 11) Which happens first authorization or authentication ?


Explanation: Telnet and FTP are not encrypted and can be a) Authorization
compromised. b) Authentication
6) Which of the following is least secure method of c) Both are same
authentication ? d) None of the mentioned
a) Key card
b) fingerprint Answer: a
c) retina pattern
d) Password 12) What is characteristics of Authorization ?
a) RADIUS and RSA
b) 3 way handshaking with syn and fin.
Answer: d c) Multilayered protection for securing resources
Explanation: Passwords can be be compromised more d) Deals with privileges and rights
easily than to replicate a physical thing like key card,
fingerprint or retina.
7) Which of the following is a strong password ? Answer: d
a) 19thAugust88
b) Delhi88 13) What forces the user to change password at first
c) P@assw0rd logon ?
43
a) Default behavior of OS 4) What is breach of availability ?
b) Part of AES encryption practice a) This type of violation involves unauthorized reading of
c) Devices being accessed forces the user data
d) Account administrator b) This violation involves unauthorized modification of
data.
Answer: d c) This violation involves unauthorized destruction of data
Explanation: Its administrator’s job to ensure that d) This violation involves unauthorized use of resources
password of the user remains private and is known only to
user. But while making a new user account he assigns a Answer: c
random general password to give it to user. Thus even
administrator cannot access a particular users account. 5) What is Trojan horse ?
14) What is not a best practice for password policy ? a) It is a useful way to encrypt password
a) Deciding maximum age of password b) It is a user which steals valuable information
b) Restriction on password reuse and history c) It is a rogue program which tricks users
c) Password encryption d) It’s a brute force attack algorithm.
d) Having change password every 2 years.
Answer: c
Answer: d
Explanation: Old passwords are more vulnerable to being 6) What is trap door ?
misplaced or compromised. Passwords should be changed a) IT is trap door in WarGames
periodically to enhance security. b) It is a hole in software left by designer.
c) It is a Trojan horse
Program and System Threats - Operating System d) It is a virus which traps and locks user terminal
Questions & Answers - Security | Sanfoundry
“Security – Program and System Threats”
1) What is breach of integrity ? Answer: b
a) This type of violation involves unauthorized reading of
data 7) Which mechanism is used by worm process ?
b) This violation involves unauthorized modification of a) Trap door
data. b) Fake process
c) This violation involves unauthorized destruction of data c) Spawn Process
d) This violation involves unauthorized use of resources d) VAX process

Answer: b Answer: c

2) What is breach of confidentiality ? 8) Which of the following is not a characteristic of virus ?


a) This type of violation involves unauthorized reading of a) Virus destroy and modify user data
data b) Virus is a standalone program
b) This violation involves unauthorized modification of c) Virus is a code embedded in a legitimate program
data. d) Virus cannot be detected.
c) This violation involves unauthorized destruction of data
d) This violation involves unauthorized use of resources Answer: d
Explanation: Virus can be detected by having a antivirus
Answer: a program.
9) What is known as masquerading ?
3) What is theft of service ? a) When one participant in communication pretends to be
a) This type of violation involves unauthorized reading of someone else.
data b) When attacker modifies data in communication
b) This violation involves unauthorized modification of c) When attack is of fraudulent repeat of a valid data
data. d) When attack gains access to remote systems.
c) This violation involves unauthorized destruction of data
d) This violation involves unauthorized use of resources Answer: a

Answer: d 10) Who unleashed famous worm attack in 1988 which


effected UNIX systems and caused losses in millions ?
a) Robert Morris
44
b) Bob Milano b) By upgrading OS vulnerability we can stop DOS attack
c) Mark zuckerberg to some extent
d) Bill Gates c) DOS attack has to be stopped at network level
d) Such attack can last for hours
Answer: a
Answer: a
11) What is port scanning ?
a) It is a software used to scan system for attack
b) It is a software application designed to probe a server or Security - Securing Systems and Facilities -
host for open ports “Security – Securing Systems and Facilities”
c) It is software used to scan system for introducing attacks 1) What is not a important part of security protection ?
by brute force a) Large amount of RAM to support antivirus
d) None of the mentioned b) Strong passwords
c) Audit log periodically
Answer: b d) Scan for unauthorized programs in system directories

12) Which is not a port scan type ? Answer: a


a) TCP scanning Explanation: RAM has no effect on security of a system.
b) SYN scanning System’s protection remains unchanged in increasing or
c) UDP scanning decreasing amount of RAM.
d) SYSTEM Scanning 2) What is used to protect network from outside internet
access ?
Answer: d a) A trusted antivirus
b) 24 hours scanning for virus
13) Which is not a valid port scan type ? c) Firewall to separate trusted and untrusted network
a) ACK scanning d) Deny users access to websites which can potentially
b) Window scanning cause security leak.
c) IGMP scan
d) FIN scanning Answer: c
Explanation: Firewall create a protective barrier to secure
internal network. A antivirus can only detect harmful
Answer: c viruses but cannot stop illegal access by remote attacker.
3) What is best practice in firewall domain environment ?
14) What are zombie systems ? a) Create two domain trusted and untrusted domain
a) Are specific system which are designed to attack by b) Create strong policy in firewall to support different
manufacturer types of users
b) They are network of known hacking group c) Create one Demiliatarized zone
c) These systems are previously compromised, d) Create two DMZ zones with one untrusted domain
independent systems
d) None of the mentioned Answer: c
Explanation: All live servers or workstations are kept in a
Answer: c separate zone than inside and outside to enhance
protection.
15) What is known as DOS attack ? 4) Which direction access cannot happen using DMZ zone
a) It is attack to block traffic of network by default ?
b) It is attack to harm contents stored in HDD by worm a) Company computer to DMZ
spawn processes b) Internet to DMZ
c) It is an attempt to make a machine or network resource c) Internet to company computer
unavailable. d) Company computer to internet
d) None of the mentioned

Answer: c Answer: c
Explanation: Connection from internet are never allowed
16) With regard to DOS attack what is not true from below to directly access internal PCs but is routed through DMZ
options ? zone to prevent attacks.
a) We can stop DOS attack completely
45
5) What are two features of a tripwire file system ? Answer: a,b & c
a) It is a tool to monitor file systems
b) It is used to alert system administrator to these 2) What are major components of intrusion detection
modification system ? (Choose 3)
c) It is used to automatically take corrective action a) Analysic Engine
d) It is used to secure UNIX system b) Event provider
c) Zone system
Answer: a & b d) Alert Database

6) How do viruses avoid basic pattern matchof antivirus ? Answer: a,b & d
a) They are encrypted
b) They act with special permissions 3) What are the different ways to classify an IDS ?
c) They modify themselves (Choose 3)
d) None of the mentioned a) anomaly detection
b) signature based misuse
Answer: c c) stack based
d) zone based
7) How does an antivirus of today identify viruses ?
Choose two Answer: a,b & c
a) Previously known patterns
b) It can detect unknown patterns 4) What are the different ways to classify an IDS ?
c) It can take high priority to increase scanning speed (Choose 2)
d) It looks at behavior of a running program a) Zone based
b) Host based
Answer: a & d c) Network based
d) Level based
8) What is known as sandbox ?
a) It is a program which can be molded to do desired task. Answer: b & c
b) It is program that is controlled or emulated section of
OS 5) What are characteristics of anomaly based IDS ?
c) It is a special mode of antivirus a) It models the normal usage of network as a noise
d) None of the mentioned characterization
b) It doesnt detect novel attacks
c) Anything distinct from the noise is assumed to be
Answer: b intrusion activity
d) It detects based on signature.
9) What is are two safe computing practices ?
a) Not to open software from unknown vendors Answer: a & c
b) Open and execute programs in admin level/root
c) Open and execute programs in presence of antivirus 6) What is major drawback of anomaly detection IDS ?
d) Keeping a close watch on employees. a) These are very slow at detection
b) It generates many false alarms
Answer: a & d c) It doesnt detect novel attacks
Explanation: Disgruntled employees have in past infected d) None of these
the master copies of software programs to do economic
harm to the company.
Answer: b
Security - Intrusion Detection -
“Security – Intrusion Detection” 7) What are characteristics of signature based IDS ?
1) What are the different ways to intrude ? (Choose 3) (Choose two)
a) Buffer overflows a) Most are based on simple pattern matching algorithms.
b) Unexpected combinations and unhandled input b) It is programmed to interpret a certain series of packets
c) Race conditions c) It models the normal usage of network as a noise
d) Backdoor characterization
d) Anything distinct from the noise is assumed to be

46
intrusion activity c) It is programmed to interpret a certain series of packet
d) It models the normal usage of network as a noise
Answer: a & b characterization

8) What are drawbacks of signature based IDS ? (Choose Answer: a & b


two)
a) They are able to detect novel attacks 14) What are strengths of Network based IDS ? (Choose
b) They suffer from false alarms three)
c) They have to be programmed again for every new a) Cost of ownership reduced
pattern to be detected b) Malicious intent detection
d) They are unable to detect novel attacks c) Real time detection and response
d) No addition hardware required
Answer: b,c and d
Answer: a,b & c
9) What are characteristics of Host based IDS ? (Choose 3)
a) The host operating system logs in the audit information
b) Logs includes logins,file opens and program executions Security - Cryptography -
c) Logs are analysed to detect tails of intrusion “Security – Cryptography”
d) Logs are archived daily 1) What is preferred way of encryption ?
a) pre shared secret key
Answer: a,b & c b) Using key distribution center (KDC)
c) public key-encryption
10) What are drawbacks of the host based IDS ? (Choose d) symmetric key
two)
a) Unselective logging of messages may increase the audit Answer: c
burdens Explanation: Preshared key can be compromised and
b) Selective logging runs the rish of missed attacks either party can be suspected. Likewise KDC or symmetric
c) They are very fast to detect key can have breach which are undesirable. Public and
d) They have to be programmed for new patterns private key encryption is a known industry standard.
2) What is not a role of encryption ?
Answer: a & b a) It is used to protect data from unauthorized access
during transmission
11) What are strengths of the host based IDS ? (Choose b) It is used to ensure user authentication
three) c) It is used to ensure data integrity
a) Attack verification d) It is used to ensure data corruption doesn’t happens
b) System specific acitvity
c) No addition hardware required Answer: d
d) They are very fast Explanation: Encryption doesn’t have error correction or
detection facility thus cannot be used to safeguard from
Answer: a,b & c data corruption.
3) What is cipher-block chaining ?
12) What are characteristics of stack based IDS ? a) Data is logically ‘ANDed’ with previous block
a) They are integrated closely with the TCP/IP stack and b) Data is logically ‘ORed’ with previous block
watch packets c) Data is logically ‘XORed’ with previous block
b) The host operating system logs in the audit information d) none of the mentioned
c) It is programmed to interpret a certain series of packets
d) It models the normal usage of network as a noise Answer: c
characterization
4) What is not an encryption standard ?
a) AES
Answer: a b) TES
c) Triple DES
13) What are characteristics of Network based IDS ? d) DES
(Choose two)
a) They look for attack signatures in network traffic
b) Filter decides which traffic will be discarded or passed
47
Answer: b Operating System concepts related with the secondary
storage.
5) Which of following is not a stream cipher? 1. Which one of the following is not a secondary storage?
a) two fish a) magnetic disks
b) RC5 b) magnetic tapes
c) RC4 c) RAM
d) TBONE d) none of the mentioned

Answer: d Answer:c

6) What is a Hash Function ? 2. Which private network uses storage protocol rather than
a) It creates a small flexible block of data networking protocol?
b) It creates a small,fixed block of data a) storage area network
c) It creates a encrypted block of data b) local area network
d) none of the mentioned c) wide area network
d) none of the mentioned
Answer: b
Answer:a
7) MD5 produces __ bits hash data ?
a) 128 3. The time for the disk arm to move the heads to the
b) 150 cylinder containing the desired sector is called
c) 160 a) disk time
d) 112 b) seek time
c) arm time
Answer: a d) sector time

8) SHA-1 produces __ bit of hash ? Answer:b


a) 128
b) 160 4. Which algorithm of disk scheduling selects the request
c) 150 with the least seek time from the current head positions?
d) 112 a) SSTF scheduling
b) FCFS scheduling
Answer: b c) SCAN scheduling
d) LOOK scheduling
9) Which two of the following are authentication
algorithms ? Answer:a
a) MAC
b) AES 5. Operating system is responsible for
c) DES a) disk initialization
d) Digital-signature b) booting from disk
c) bad-block recovery
d) all of the mentioned
Answer: a & c

10) What is role of Key Distribution Center ? Answer:d


a) It is used to distribute keys to everyone in world
b) It intended to reduce the risks inherent in exchanging 6. A swap space can reside in
keys a) separate disk partition
c) a and b both b) RAM
d) none of the mentioned c) cache
d) none of the mentioned
Answer: b
Answer:a

Secondary Storage 7. RAID level 1 refers to


a) disk arrays with striping
48
b) disk mirroring c) ext4
c) both (a) and (b) d) none of the mentioned
d) none of the mentioned Answer:a
4. Which binary format is supported by linux?
Answer:b a) a.out
Explanation:A variety of disk-organization techniques is b) ELF
called “redundant arrays of independent disks (RAID)”. c) both (a) and (b)
8. When we write something on the disk, which one of the
d) none of the mentioned
following can not happen?
Answer:c
a) successful completion
b) partial failure advertisements
c) total failure 5. Which one of the following bootloader is not used by
d) none of the mentioned linux?
a) GRUB
Answer:d b) LILO
c) NTLDR
9. During recovery from a failure d) none of the mentioned
a) each pair of physical block is examined Answer:c
b) specified pair of physical block is examined 6. The first process launched by the linux kernel is
c) first pair of physical block is examined a) init process
d) none of the mentioned b) zombie process
c) batch process
d) boot process
Answer:a
Answer:a
7. Which desktop environment is not used in any linux
10. The replacement of a bad block generally is not totally
automatic because distribution?
a) data in bad block can not be replaced a) gnome
b) data in bad block is usually lost b) KDE
c) bad block does not contain any data c) unity
d) none of the mentioned d) none of the mentioned
Answer:d
Answer:b 8. Standard set of functions through which interacts with
kernel is defined by
Operating System Questions & Answers – Linux a) system libraries
Linux Operating System. b) kernel code
1. Linux uses a time-sharing algorithm c) compilers
a) to pair preemptive scheduling between multiple d) utility programs
processes Answer:a
b) for tasks where absolute priorities are more important advertisements
than fairness 9. Linux is
c) both (a) and (b) a) single user, single tasking
d) none of the mentioned b) single user, multitasking
Answer:a c) multiuser, single tasking
2. First linux kernel which supports the SMP hardware was d) multiuser, multitasking
a) linux 0.1 Answer:d
b) linux 1.0 10. Which one of the following is not a linux distribution?
c) linux 1.2 a) debian
d) linux 2.0 b) gentoo
Answer:d c) open SUSE
3. Which one of the following linux file system does not d) multics
support journaling feature? Answer:d
a) ext2
b) ext3 Threads

49
threads in Operating System. b) first two threads of the process
1. Which one of the following is not shared by threads? c) all threads within the process
a) program counter d) no thread within the process
b) stack
c) both (a) and (b) Answer:c
d) none of the mentioned
8. Which one of the following is not a valid state of a
Answer:c thread?
a) running
2. A process can be b) parsing
a) single threaded c) ready
b) multithreaded d) blocked
c) both (a) and (b)
d) none of the mentioned Answer:b

Answer:c 9. The register context and stacks of a thread are


deallocated when the thread
3. If one thread opens a file with read privileges then a) terminates
a) other threads in the another process can also read from b) blocks
that file c) unblocks
b) other threads in the same process can also read from d) spawns
that file
c) any other thread can not read from that file
d) all of the mentioned Answer:a

Answer:b 10. Thread synchronization is required because


a) all threads of a process share the same address space
4. The time required to create a new thread in an existing b) all threads of a process share the same global variables
process is c) all threads of a process can share the same files
a) greater than the time required to create a new process d) all of the mentioned
c) less than the time required to create a new process
c) equal to the time required to create a new process Answer:d
d) none of the mentioned

Answer:b User and Kernel Threads -


“User and Kernel Threads”
5. When the event for which a thread is blocked occurs, 1) A thread is also called :
a) thread moves to the ready queue a) Light Weight Process(LWP)
b) thread remains blocked b) Heavy Weight Process(HWP)
c) thread completes c) Process
d) a new thread is provided d) None of these

Answer: a
Answer:a
2) A thread shares its resources(like data section, code
6. The jacketing technique is used to section, open files, signals) with :
a) convert a blocking system call into nonblocking system a) other process similar to the one that the thread belongs
call to
b) create a new thread b) other threads that belong to similar processes
c) communicate between threads c) other threads that belong to the same process
d) terminate a thread d) All of these

Answer:a Answer: c

7. Termination of the process terminates 3) A heavy weight process :


a) first thread of the process a) has multiple threads of execution
50
b) has a single thread of execution c) cause the entire process to block even if the other
c) can have multiple or a single thread for execution threads are available to run
d) None of these d) None of these

Answer: b Answer: c

4) A process having multiple threads of control implies : 10) Because the kernel thread management is done by the
a) it can do more than one task at a time Operating System itself :
b) it can do only one task at a time, but much faster a) kernel threads are faster to create than user threads
c) it has to use only one thread per process b) kernel threads are slower to create than user threads
d) None of these c) kernel threads are easier to manage as well as create
then user threads
Answer: a d) None of these

5) Multithreading an interactive program will increase


responsiveness to the user by : Answer: b
a) continuing to run even if a part of it is blocked
b) waiting for one part to finish before the other begins 11) If a kernel thread performs a blocking system call,
c) asking the user to decide the order of multithreading ____________________.
d) None of these a) the kernel can schedule another thread in the application
for execution.
b) the kernel cannot schedule another thread in the same
Answer: a application for execution.
c) the kernel must schedule another thread of a different
6) Resource sharing helps : application for execution.
a) share the memory and resources of the process to which d) the kernel must schedule another thread of the same
the threads belong. application on a different processor.
b) an application have several different threads of activity
all within the same address space Answer: a
c) reduce the address space that a process could potentially
use 12) Which of the following is FALSE ? (GATE 2007)
d) All of these a) Context switch time is longer for kernel level threads
than for user level threads
Answer: d b) User level threads do not need any hardware support
c) Related kernel level threads can be scheduled on
7) Multithreading on a multi – CPU machine : different processors in a multiprocessor system
a) decreases concurrency d) Blocking one kernel level thread blocks all other related
b) increases concurrency threads
c) doesnt affect the concurrency
d) can increase or decrease the concurrency Answer: d

Answer: b
Multi Threading Models -
8) The kernel is _______ of user threads. “Multi Threading Models”.
a) a part of 1) The model in which one kernel thread is mapped to
b) the creator of many user-level threads is called :
c) unaware of a) Many to One model
d) aware of b) One to Many model
c) Many to Many model
Answer: c d) One to One model

9) If the kernel is single threaded, then any user level Answer: a


thread performing a blocking system call will :
a) cause the entire process to run along with the other 2) The model in which one user-level thread is mapped to
threads many kernel level threads is called :
b) cause the thread to block with the other threads running a) Many to One model
51
b) One to Many model b) When the program has to be multi-threaded
c) Many to Many model c) When there is a single processor
d) One to One model d) None of these

Answer: b Answer: a

3) In the Many to One model, if a thread makes a blocking 9) In the Many to Many model true concurrency cannot be
system call : gained because :
a) the entire process will be blocked a) the kernel can schedule only one thread at a time
b) a part of the process will stay blocked, with the rest b) there are too many threads to handle
running c) it is hard to map threads with each other
c) the entire process will run d) None of these
d) None of these

Answer: a Answer: a

4) In the Many to One model, multiple threads are unable 10) In the Many to Many model when a thread performs a
to run in parallel on multiprocessors because : blocking system call :
a) only one thread can access the kernel at a time a) other threads are strictly prohibited from running
b) many user threads have access to just one kernel thread b) other threads are allowed to run
c) there is only one kernel thread c) other threads only from other processes are allowed to
d) None of these run
d) None of these

Answer: a Answer: b

5) The One to One model allows :


a) increased concurrency The fork and exec System Calls -
b) decreased concurrency “The fork and exec System calls”
c) increased or decreased concurrency 1) Which of the following system calls does not return
d) concurrency equivalent to other models control to the calling point, on termination ?
a) fork
Answer: a b) exec
c) ioctl
6) In the One to One model when a thread makes a d) longjmp
blocking system call :
a) other threads are strictly prohibited from running Answer: b
b) other threads are allowed to run
c) other threads only from other processes are allowed to 2) The following program:
run main()
d) None of these {
if(fork()>0)
Answer: b sleep(100);
}
7) Which of the following is the drawback of the One to results in the creation of:
One Model ? a) an orphan process
a) increased concurrency provided by this model b) a zombie process
b) decreased concurrency provided by this model c) a process that executes forever
c) creating so many threads at once can crash the system d) None of these
d) creating a user thread requires creating the
corresponding kernel thread Answer: b

Answer: d 3) Which of the following system calls transforms


executable binary file into a process ?
8) When is the Many to One model at an advantage ? a) fork
a) When the program does not need multi-threading b) exec
52
c) ioctl 9) If a process does not call exec after forking,
d) longjmp a) the program specified in the parameter to exec will
replace the entire process.
Answer: b b) all the threads should be duplicated
c) all the threads should not be duplicated
4) The following C program : d) None of these
main()
{ Answer: b
fork();fork();printf(“yes”); Explanation: The new process is purely based on fork, due
} to no exec command, duplication will be done.
prints yes:
a) only once Thread Cancellation -
b) twice “Thread Cancellation”
c) four times 1) Thread cancellation is :
d) eight times a) the task of destroying the thread once its work is done
b) the task of removing a thread once its work is done
c) the task of terminating a thread before it has completed
Answer: c d) None of these

5) Which of the following calls never returns an error ? Answer: c


a) getpid
b) fork 2) When a web page is loading, and the user presses a
c) ioctl button on the browser to stop loading the page :
d) open a) the thread loading the page continues with the loading
b) the thread loading the page does not stop, but continues
Answer: a with another task
c) the thread loading the page is paused
6) A fork system call will fail if : d) the thread loading the page is cancelled
a) the previously executed statement is also a fork call.
b) the limit on the maximum number of processes in the Answer: d
system would be executed.
c) the limit on the maximum number of processes that can 3) When one thread immediately terminates the target
be under execution by a single user would be executed. thread, it is called :
d) All of these a) Asynchronous cancellation
b) Systematic cancellation
Answer: b and c c) Sudden Termination
d) Deferred cancellation
7) If a thread invokes the exec system call,
a) only the exec executes as a separate process.
b) the program specified in the parameter to exec will Answer: a
replace the entire process.
c) the exec is ignored as it is invoked by a thread. 4) When the target thread periodically checks if it should
d) None of these terminate and terminates itself in an orderly manner, it is
called :
Answer: b a) Asynchronous cancellation
b) Systematic cancellation
8) If exec is called immediately after forking, c) Sudden Termination
a) the program specified in the parameter to exec will d) Deferred cancellation
replace the entire process.
b) all the threads will be duplicated Answer: d
c) all the threads will not be duplicated
d) None of these 5) Cancelling a thread asynchronously :
a) frees all the resources properly
b) may not free each resource
Answer: a and c c) spoils the process execution

53
d) None of these a) ignoring the signal
b) handling the signal
Answer: b c) performing some default action
d) asking the user to handle the signal
6) Cancellation point is the point where :
a) the thread can be cancelled – safely or otherwise doesnt Answer: a, b and c
matter
b) the thread can be cancelled safely 5) Signals are identified by :
c) the whole process can be cancelled safely a) signal identifiers
d) None of these b) signal handlers
c) signal actions
Answer: b d) None of these

7) If multiple threads are concurrently searching through a Answer: a


database and one thread returns the result then the
remaining threads must be : 6) When a process blocks the receipt of certain signals :
a) continued (choose two)
b) cancelled a) The signals are delivered
c) protected b) The signals are not delivered
d) None of these c) The signals are not received until they are unblocked
d) The signals are received by the process once they are
delivered
Answer: b

Answer: a and c
Signal Handling -
“Signal Handling” 7) The _______ maintains pending and blocked bit vectors
1) Signals that occur at the same time, are presented to the in context of each process.
process : a) CPU
a) one at a time, in a particular order b) Memory
b) one at a time, in no particular order c) Process
c) all at a time d) Kernel
d) None of these
Answer: d
Answer: b
8) In UNIX, the set of masked signals can be set or cleared
2) Which of the following is not TRUE : using the ________ function.
a) Processes may send each other signals a) sigmask
b) Kernel may send signals internally b) sigmaskproc
c) a field is updated in the signal table when the signal is c) sigprocmask
sent d) sigproc
d) each signal is maintained by a single bit
Answer: c
Answer: c
Explanation: A field is updated in the process table when 9) The usefulness of signals as a general inter process
the signal is sent. communication mechanism is limited because :
3) Signals of a given type : a) they do not work between processes
a) are queued b) they are user generated
b) are all sent as one c) they cannot carry information directly
c) cannot be queued d) None of these
d) None of these
Answer: c
Answer: b
Explanation: The signal handler will be invoked only once. 10) The usual effect of abnormal termination of a program
4) The three ways in which a process responds to a signal is :
are : (choose three) a) core dump file generation
54
b) system crash c) when we need to arrange the ordering of threads
c) program switch d) None of these
d) signal destruction
Answer: a
Answer: a
2) Instead of starting a new thread for every task to
11) In UNIX, the abort() function sends the ________ execute concurrently, the task can be passed to a
signal to the calling process, causing abnormal ___________.
termination. a) process
a) SIGTERM b) thread pool
b) SIGSTOP c) thread queue
c) SIGABORT d) None of these
d) SIGABRT
Answer: b
Answer: d
3) Each connection arriving at multi threaded servers via
12) network is generally :
In most cases a) is directly put into the blocking queue
, if a process is sent a signal while it is executing a system b) is wrapped as a task and passed on to a thread pool
call : c) is kept in a normal queue and then sent to the blocking
a) the system call will continue execution and the signal queue from where it is dequeued
will be ignored completely d) None of these
b) the system call is interrupted by the signal, and the
signal handler comes in Answer: b
c) the signal has no effect until the system call completes
d) None of these 4) The idea behind thread pools is :
a) a number of threads are created at process startup and
placed in a pool where they sit and wait for work
Answer: c b) when a process begins, a pool of threads is chosen from
the many existing and each thread is allotted equal amount
13) A process can never be sure that a signal it has sent of work
___________________. c) all threads in a pool distribute the task equally among
a) has which identifier themselves
b) has not been lost d) None of these
c) has been sent
d) All of these
Answer: a
Answer: b
5) If the thread pool contains no available thread :
14) In UNIX, the _____ system call is used to send a a) the server runs a new process
signal. b) the server goes to another thread pool
a) sig c) the server demands for a new pool creation
b) send d) the server waits until one becomes free
c) kill
d) sigsend Answer: d

Answer: c 6) Thread pools help in :


a) servicing multiple requests using one thread
b) servicing a single request using multiple threads from
Thread Pools - the pool
“Thread Pools” c) faster servicing of requests with an existing thread
1) Thread pools are useful when : rather than waiting to create a new thread
a) when we need to limit the number of threads running in d) None of these
the application at the same time
b) when we need to limit the number of threads running in Answer: c
the application as a whole
55
7) Thread pools limit the number of threads that exist at Answer:b
any one point, hence :
a) not letting the system resources like CPU time and 5. When a program tries to access a page that is mapped in
memory exhaust address space but not loaded in physical memory, then
b) helping a limited number of processes at a time a) segmentation fault occurs
c) not serving all requests and ignoring many b) fatal error occurs
d) None of these c) page fault occurs
d) no error occurs
Answer: a

8) The number of the threads in the pool can be decided on Answer:c


factors such as :
a) number of CPUs in the system 6. Effective access time is directly proportional to
b) amount of physical memory a) page-fault rate
c) expected number of concurrent client requests b) hit ratio
d) All of these c) memory access time
d) none of the mentioned

Answer: d Answer:a

7. In FIFO page replacement algorithm, when a page must


Virtual Memory be replaced
virtual memory concept of Operating System. a) oldest page is chosen
1. Because of virtual memory, the memory can be shared b) newest page is chosen
among c) random page is chosen
a) processes d) none of the mentioned
b) threads
c) instructions Answer:a
d) none of the mentioned
8. Which algorithm chooses the page that has not been
Answer:a used for the longest period of time whenever the page
required to be replaced?
2. _____ is the concept in which a process is copied into a) first in first out algorithm
main memory from the secondary memory according to b) additional reference bit algorithm
the requirement. c) least recently used algorithm
a) Paging d) counting based page replacement algorithm
b) Demand paging
c) Segmentation Answer:c
d) Swapping
9. A process is thrashing if
Answer:b a) it is spending more time paging than executing
b) it is spending less time paging than executing
3. The pager concerns with the c) page fault occurs
a) individual page of a process d) swapping can not take place
b) entire process
c) entire thread
d) first page of a process Answer:a

Answer:a 10. Working set model for page replacement is based on


the assumption of
4. Swap space exists in a) modularity
a) primary memory b) locality
b) secondary memory c) globalization
c) CPU d) random access
d) none of the mentioned

56
Answer:b 6) Virtual memory is normally implemented by ________.
a) demand paging
b) buses
Virtual Memory - Demand Paging - c) virtualization
“Memory Management – Demand Paging” d) All of these
1) Virtual memory allows :
a) execution of a process that may not be completely in Answer: a
memory
b) a program to be larger than the physical memory 7) Segment replacement algorithms are more complex than
c) a program to be larger than the secondary storage page replacement algorithms because :
d) execution of a process without being in physical a) Segments are better than pages
memory b) Pages are better than segments
c) Segments have variable sizes
Answer: a and b d) Segments have fixed sizes

2) The instruction being executed, must be in : Answer: c


a) physical memory
b) logical memory 8) A swapper manipulates ___________, whereas the
c) None of these pager is concerned with individual _______ of a process.
a) the entire process, parts
Answer: a b) all the pages of a process, segments
c) the entire process, pages
3) Error handler codes, to handle unusual errors are : d) None of these
a) almost never executed
b) executed very often Answer: c
c) executed periodically
d) None of these 9) Using a pager :
a) increases the swap time
Answer: a b) decreases the swap time
c) decreases the amount of physical memory needed
4) The ability to execute a program that is only partially in d) increases the amount of physical memory needed
memory has benefits like : (choose all that apply)
a) the amount of physical memory cannot put a constraint Answer: b and c
on the program
b) programs for an extremely large virtual space can be 10) The valid – invalid bit, in this case, when valid
created indicates :
c) CPU utilization decreases a) the page is legal
d) Throughput increases b) the page is illegal
e) response time is not affected c) the page is in memory
f) turnaround time increases d) the page is not in memory
g) less I/O will be needed to load or swap each user
program in memory Answer: a and c
h) All of these
11) A page fault occurs when :
Answer: a, b, d, e, g a) a page gives inconsistent data
b) a page cannot be accesses due to its absence from
5) In virtual memory. the programmer __________ of memory
overlays. c) a page is invisible
a) has to take care d) All of these
b) does not have to take care
c) None of these
Answer: b

Answer: b 12) When a page fault occurs, the state of the interrupted
process is :
a) disrupted
57
b) invalid d) 7
c) saved
d) None of these Answer: c

Answer: c 3) In question 2, if the number of page frames is increased


to 4, then the number of page transfers :
13) When a process begins execution with no pages in a) decreases
memory : b) increases
a) process execution becomes impossible c) remains the same
b) a page fault occurs for every page brought into memory d) None of these
c) process causes system crash
d) None of these Answer: b

Answer: b 4) A memory page containing a heavily used variable that


was initialized very early and is in constant use is
14) If the memory access time is denoted by ‘ma’ and ‘p’ removed, then the page replacement algorithm used is :
is the probability of a page fault (0 <= p <= 1). Then the a) LRU
effective access time for a demand paged memory is : a) p b) LFU
x ma + (1-p) x page fault time b) ma + page fault time c) c) FIFO
(1-p) x ma + p x page fault time d) None of these [expand d) None of these
title=""]Answer: c [/expand]
Answer: c
15) When the page fault rate is low :
5) A virtual memory system uses First In First Out (FIFO)
a) the turnaround time increases
page replacement policy and allocates a fixed number of
b) the effective access time increases frames to a process. Consider the following statements :
c) the effective access time decreases P : Increasing the number of page frames allocated to a
d) a and b [expand title=""]Answer: c [/expand] process sometimes increases the page fault rate
Q : Some programs do not exhibit locality of reference
16) Locality of reference implies that the page reference Which of the following is TRUE?
being made by a process : a) will always be to the page a) Both P and Q are true, and Q is the reason for P
used in the previous page reference b) is likely to be one of b) Both P and Q are true, but Q is not the reason for P
the pages used in the last few page references c) will c) P is false but Q is true
always be one of the pages existing in memory d) will d) Both P and Q are false
always lead to page faults [expand title=""]Answer: b
[/expand] Answer: c

Virtual Memory - Page Replacement Algorithms - 1 - 6) Users _______ that their processes are running on a
“Memory Management – Page Replacement Algorithms” paged system.
1) Which of the following page replacement algorithms a) are aware
suffers from Belady’s Anomaly ? b) are unaware
a) Optimal replacement c) None of these
b) LRU
c) FIFO
d) Both optimal replacement and FIFO Answer: b

Answer: c 7) If no frames are free, _____ page transfer(s) is/are


required.
2) A process refers to 5 pages, A, B, C, D, E in the order : a) one
A, B, C, D, A, B, E, A, B, C, D, E. If the page replacement b) two
algorithm is FIFO, the number of page transfers with an c) three
empty internal store of 3 frames is : d) four
a) 8
b) 10 Answer: b
c) 9

58
8) When a page is selected for replacement, and its modify 70120304230321201701
bit is set : i) How many page faults does the LRU page replacement
a) the page is clean algorithm produce ?
b) the page has been modified since it was read in from the a) 10
disk b) 15
c) the page is dirty c) 11
d) a and b d) 12

Answer: b and c Answer: d

9) The aim of creating page replacement algorithms is to : ii) How many page faults does the FIFO page replacement
a) replace pages faster algorithm produce ?
b) increase the page fault rate a) 10
c) decrease the page fault rate b) 15
d) to allocate multiple pages to processes c) 11
d) 12
Answer: c
Answer: b
10) A FIFO replacement algorithm associates with each
page the _______ 15) The two methods how LRU page replacement policy
a) time it was brought into memory can be implemented in hardware are : (choose two)
b) size of the page in memory a) Counters
c) page after and before it b) RAM
d) All of these c) Stack
d) Registers
Answer: a
Answer: a and c
11) Optimal page – replacement algorithm is :
a) Replace the page that has not been used for a long time “Memory Management – Page Replacement Algorithms”
b) Replace the page that has been used for a long time 1) When using counters to implement LRU, we replace the
c) Replace the page that will not be used for a long time page with the :
d) None of these a) smallest time value
b) largest time value
Answer: c c) greatest size
d) None of the mentioned
12) Optimal page – replacement algorithm is difficult to
implement, because : Answer: a
a) it requires a lot of information Explanation: Whenever a reference to a page is made, the
b) it requires future knowledge of the reference string contents of the clock register are copied into the time-of-
c) it is too complex use field in the page-table entry for that page. In this way
d) it is extremely expensive we always have the time of the last reference to each page.
2) In the stack implementation of the LRU algorithm, a
Answer: b stack can be maintained in a manner :
a) whenever a page is used, it is removed from the stack
13) LRU page – replacement algorithm associates with and put on top
each page the ______ b) the bottom of the stack is the LRU page
a) time it was brought into memory c) the top of the stack contains the LRU page and all new
b) the time of that page’s last use pages are added to the top
c) page after and before it d) None of the mentioned
d) All of these
Answer: a and b

Answer: b 3) There is a set of page replacement algorithms that can


never exhibit Belady’s Anomaly, called :
14) For 3 page frames, the following is the reference string a) queue algorithms
: b) stack algorithms
59
c) string algorithms Answer: a
d) None of the mentioned
9) The reason for using the MFU page replacement
Answer: b algorithm is :
a) an actively used page should have a large reference
4) Applying the LRU page replacement to the following count
reference string : b) a less used page has more chances to be used again
12452124 c) it is extremely efficient and optimal
The main memory can accommodate 3 pages and it d) All of the mentioned
already has pages 1 and 2. Page 1 came in before page 2.
How many page faults will occur ?
a) 2 Answer: b
b) 3
c) 4 10) The implementation of the LFU and the MFU
d) 5 algorithm is very uncommon because :
a) they are too complicated
b) they are optimal
Answer: c c) they are expensive
d) All of the mentioned
5) Increasing the RAM of a computer typically improves
performance because: Answer: c
a) Virtual memory increases
b) Larger RAMs are faster
c) Fewer page faults occur “Virtual Memory – Allocation of Frames”
d) None of the mentioned 1) The minimum number of frames to be allocated to a
process is decided by the :
Answer: c a) the amount of available physical memory
b) Operating System
6) The essential content(s) in each entry of a page table is / c) instruction set architecture
are : d) None of the mentioned
a) Virtual page number
b) Page frame number Answer: c
c) Both virtual page number and page frame number
d) Access right information 2) When a page fault occurs before an executing
instruction is complete :
Answer: b a) the instruction must be restarted
b) the instruction must be ignored
7) The minimum number of page frames that must be c) the instruction must be completed ignoring the page
allocated to a running process in a virtual memory fault
environment is determined by : d) None of the mentioned
a) the instruction set architecture
b) page size Answer: a
c) physical memory size
d) number of processes in memory 3) Consider a machine in which all memory reference
instructions have only one memory address, for them we
Answer: a need atleast _____ frame(s).
a) one
8) The reason for using the LFU page replacement b) two
algorithm is : c) three
a) an actively used page should have a large reference d) None of the mentioned
count
b) a less used page has more chances to be used again Answer: b
c) it is extremely efficient and optimal Explanation: Atleast one frame for the instruction and one
d) All of the mentioned for the memory reference.
4) The maximum number of frames per process is defined
by :
60
a) the amount of available physical memory 10) One problem with the global replacement algorithm is
b) Operating System that :
c) instruction set architecture a) it is very expensive
d) None of the mentioned b) many frames can be allocated to a process
c) only a few frames can be allocated to a process
Answer: a d) a process cannot control its own page – fault rate

5) The algorithm in which we split m frames among n


processes, to give everyone an equal share, m/n frames is Answer: d
known as :
a) proportional allocation algorithm 11) ________ replacement generally results in greater
b) equal allocation algorithm system throughput.
c) split allocation algorithm a) Local
d) None of the mentioned b) Global
c) Universal
d) Public
Answer: b
Answer: b
6) The algorithm in which we allocate memory to each
process according to its size is known as :
a) proportional allocation algorithm Virtual Memory - Thrashing -
b) equal allocation algorithm “Virtual Memory – Thrashing”
c) split allocation algorithm 1) A process is thrashing if :
d) None of the mentioned a) it spends a lot of time executing, rather than paging
b) it spends a lot of time paging, than executing
Answer: a c) it has no memory allocated to it
d) None of these
7) With either equal or proportional algorithm, a high
priority process is treated ___________ a low priority Answer: b
process.
a) greater than 2) Thrashing _______ the CPU utilization.
b) same as a) increases
c) lesser than b) keeps constant
d) None of the mentioned c) decreases
d) None of these
Answer: b
Answer: c
8) _________ replacement allows a process to select a
replacement frame from the set of all frames, even if the 3) A locality is :
frame is currently allocated to some other process. a) a set of pages that are actively used together
a) Local b) a space in memory
b) Universal c) an area near a set of processes
c) Global d) None of these
d) Public
Answer: a
Answer: c
4) When a subroutine is called,
9) _________ replacement allows each process to only a) it defines a new locality
select from its own set of allocated frames. b) it is in the same locality from where it was called
a) Local c) it does not define a new locality
b) Universal d) b and c
c) Global
d) Public Answer: a

Answer: a 5) A program is generally composed of several different


localities, which _____ overlap.
61
a) may number of page faults is :
b) must a) 10
c) do not b) 14
d) must not c) 8
d) 11
Answer: a
Answer: a
6) In the working set model, for :
261577775162341234443434441323 ii) For LRU page replacement algorithm with 5 frames, the
if DELTA = 10, then the working set at time t1 (….7 5 1) number of page faults is :
is : a) 10
a) {1, 2, 4, 5, 6} b) 14
b) {2, 1, 6, 7, 3} c) 8
c) {1, 6, 5, 7, 2} d) 11
d) {1, 2, 3, 4, 5}
Answer: c

Answer: c iii) For FIFO page replacement algorithms with 3 frames,


the number of page faults is :
7) The accuracy of the working set depends on the a) 16
selection of : b) 15
a) working set model c) 14
b) working set size d) 11
c) memory size
d) number of pages in memory
Answer: a
Answer: b
iv) For FIFO page replacement algorithms with 4 frames,
8) If working set window is too small : the number of page faults is :
a) it will not encompass entire locality a) 16
b) it may overlap several localities b) 15
c) it will cause memory problems c) 14
d) None of these d) 11

Answer: a Answer: c

9) If working set window is too large : v) For Optimal page replacement algorithms with 3
a) it will not encompass entire locality frames, the number of page faults is :
b) it may overlap several localities a) 16
c) it will cause memory problems b) 15
d) None of these c) 14
d) 11
Answer: b
Answer: d
10) If the sum of the working – set sizes increases,
exceeding the total number of available frames : vi) For Optimal page replacement algorithms with 5
a) then the process crashes frames, the number of page faults is :
b) the memory overflows a) 6
c) the system crashes b) 7
d) the operating system selects a process to suspend c) 10
d) 9
Answer: d
Answer: b
11) Consider the following page reference string :
12342156212376321236
i) For LRU page replacement algorithm with 4 frames, the File System
62
file system concepts of Operating System. b) page table
1. ______ is a unique tag, usually a number, identifies the c) virtual memory
file within the file system. d) file system
a) File identifier
b) File name Answer:a
c) File type
d) none of the mentioned 8. Mapping of network file system protocol to local file
system is done by
Answer:a a) network file system
b) local file system
2. To create a file c) volume manager
a) allocate the space in file system d) remote mirror
b) make an entry for new file in directory
c) both (a) and (b) Answer:a
d) none of the mentioned
9. Which one of the following explains the sequential file
Answer:c access method?
a) random access according to the given byte number
3. By using the specific system call, we can b) read bytes one at a time, in order
a) open the file c) read/write sequentially by record
b) read the file d) read/write randomly by record
c) write into the file
d) all of the mentioned
Answer:b
Answer:d
10. file system fragmentation occurs when
4. File type can be represented by a) unused space or single file are not contiguous
a) file name b) used space is not contiguous
b) file extension c) unused space is non-contiguous
c) file identifier d) multiple files are non-contiguous
d) none of the mentioned
Answer:a
Answer:b

5. Which file is a sequence of bytes organized into blocks File System


understandable by the system’s linker? file system implementation of Operating System.
a) object file 1. Management of metadata information is done by
b) source file a) file-organisation module
c) executable file b) logical file system
d) text file c) basic file system
d) application programs

Answer:a Answer:b

6. What is the mounting of file system? 2. A file control block contains the information about
a) crating of a filesystem a) file ownership
b) deleting a filesystem b) file permissions
c) attaching portion of the file system into a directory c) location of file contents
structure d) all of the mentioned
d) removing portion of the file system into a directory
structure Answer:d

Answer:c 3. Which table contains the information about each


mounted volume?
7. Mapping of file is managed by a) mount table
a) file metadata b) system-wide open-file table
63
c) per-process open-file table 10. Which protocol establishes the initial logical
d) all of the mentioned connection between a server and a client?
a) transmission control protocol
Answer:d b) user datagram protocol
c) mount protocol
4. To create a new file application program calls d) datagram congestion control protocol
a) basic file system
b) logical file system Answer:c
c) file-organisation module
d) none of the mentioned
File System Interface Access Methods - 1 -
Answer:b “File System Interface Access Methods”
1) Data cannot be written to secondary storage unless
5. When a process closes the file written within a ______.
a) per-process table entry is removed a) file
b) system wide entry’s open count is decremented b) swap space
c) both (a) and (b) c) directory
d) none of the mentioned d) text format

Answer: a
Answer:c
2) File attributes consist of :
6. What is raw disk? a) name
a) disk without file system b) type
b) empty disk c) identifier
c) disk lacking logical file system d) content
d) disk having file system e) size

Answer:a Answer: a, b, c, e

7. The data structure used for file directory is called 3) The information about all files is kept in :
a) mount table a) swap space
b) hash table b) operating system
c) file table c) seperate directory structure
d) process table d) None of these

Answer:b Answer: c

8. In which type of allocation method each file occupy a 4) A file is a/an _______ data type.
set of contiguous block on the disk? a) abstract
a) contiguous allocation b) primitive
b) dynamic-storage allocation c) public
c) linked allocation d) private
d) indexed allocation

Answer:a Answer: a

9. If the block of free-space list is free then bit will 5) The operating system keeps a small table containing
a) 1 information about all open files called :
b) 0 a) system table
c) Any of 0 or 1 b) open-file table
d) none of the mentioned c) file table
d) directory table

Answer:a Answer: b

64
6) In UNIX, the open system call returns : Answer: a
a) pointer to the entry in the open file table
b) pointer to the entry in the system wide table 3) In the sequential access method, information in the file
c) a file to the process calling it is processed :
d) None of these a) one disk after the other, record access doesnt matter
b) one record after the other
Answer: a c) one text document after the other
d) None of these
7) System wide table in UNIX contains process
independent information such as : Answer: b
a) location of file on disk
b) access dates 4) Sequential access method ______ , on random access
c) file size devices.
d) file contents a) works well
b) doesnt work well
Answer: a, b, c c) Both a and b
d) None of these
8) The open file table has a/an _______ associated with
each file.
a) file content Answer: a
b) file permission
c) open count 5) The direct access method is based on a ______ model of
d) close count a file, as _____ allow random access to any file block.
a) magnetic tape, magnetic tapes
b) tape, tapes
Answer: c c) disk, disks
Explanation: open count indicates the number of processes d) All of these
that have the file open.
9) The file name is generally split into two parts : Answer: c
a) name
b) identifier 6) For a direct access file :
c) extension a) there are restrictions on the order of reading and writing
d) type b) there are no restrictions on the order of reading and
writing
Answer: a and c c) access is restricted permission wise
d) access is not restricted permission wise

“File System Interface Access Methods” Answer: b


1) The UNIX sytem uses a/an ________, stored at the
beginning of a some files to indicate roughly the type of 7) A relative block number is an index relative to :
file. a) the beginning of the file
a) identifier b) the end of the file
b) extension c) the last written position in file
c) virtual number d) None of these
d) magic number
Answer: a
Answer: d
8) The index contains :
2) The larger the block size, the ______ the internal a) names of all contents of file
fragmentation. b) pointers to each page
a) greater c) pointers to the various blocks
b) lesser d) All of these
c) same
d) None of these
Answer: c

65
9) For large files, when the index itself becomes too large 6) When a user job starts in a two level directory system,
to be kept in memory : or a user logs in :
a) index is called a) the users user file directory is searched
b) an index is created for the index file b) the system’s master file directory is searched
c) secondary index files are created c) the master file directory is indexed by user name or
d) All of these account number, and each entry points to the UFD for that
user
Answer: b d) All of these

Answer: b and c
File System Interface Directory Structure - 1 -
“File System Interface Directory Structure” 7) When a user refers to particular file, :
1) To organise file systems on disk, : a) system MFD is searched
a) they are split into one or more partitions b) his own UFD is searched
b) information about files is added to each partition c) both MFD and UFD are searched
c) they are made on different storage spaces d) every directory is searched
d) All of these
Answer: b and c
Answer: a and b
8) The disadvantage of the two level directory structure is
2) The directory can be viewed as a _________, that that :
translates file names into their directory entries. a) it does not solve the name collision problem
a) symbol table b) it solves the name collision problem
b) partition c) it does not isolate users from one another
c) swap space d) it isolates users from one another
d) cache
Answer : d
Answer: a
9) In the tree structured directories,
3) In the single level directory : a) the tree has the stem directory
a) All files are contained in different directories all at the b) the tree has the leaf directory
same level c) the tree has the root directory
b) All files are contained in the same directory d) All of these
c) Depends on the operating system
d) None of these Answer : c

Answer: b 10) The current directory contains, most of the files that
are :
4) In the single level directory : a) of current interest to the user
a) all directories must have unique names b) stored currently in the system
b) all files must have unique names c) not used in the system
c) all files must have unique owners d) not of current interest to the system
d) All of these

Answer: b Answer : a

5) In the two level directory structure : 11) Path names can be of two types : (choose two)
a) each user has his/her own user file directory a) absolute
b) the system has its own master file directory b) local
c) both a and b c) global
d) None of these d) relative

Answer : a and d
Answer: c

“File System Interface Directory Structure”


66
1) An absolute path name begins at the : c) implemented as an absolute or relative path name
a) leaf d) a directory entry
b) stem
c) current directory Answer : b, c and d
d) root
8) The operating system _______ the links when
Answer : d traversing directory trees, to preserve the acyclic structure
of the system.
2) A relative path name begins at the : a) considers
a) leaf b) ignores
b) stem c) deletes
c) current directory d) None of these
d) root
Answer : b
Answer : c
9) The deletion of a link, ________ the original file.
3) In tree structure, when deleting a directory that is not a) deletes
empty : b) affects
a) The contents of the directory are safe c) does not affect
b) The contents of the directory are also deleted d) None of these
c) None of these
Answer : c
Answer : b
10) When keeping a list of all the links/references to a file,
4) When two users keep a subdirectory in their own and the list is empty, implies that :
directories, the structure being referred to is : a) the file has no copies
a) tree structure b) the file is deleted
b) cyclic graph directory structure c) the file is hidden
c) two level directory structure d) None of these
d) acyclic graph directory

Answer : d Answer : b

5) A tree structure ______ the sharing of files and 11) When a cycle exists, the reference count maybe non
directories. zero, even when it is no longer possible to refer to a
a) allows directory or file, due to _______.
b) may restrict a) the possibility of one hidden reference
c) restricts b) the possibility of two hidden references
d) None of these c) the possibility of self referencing
d) None of these

Answer : c Answer : c

6) With a shared file : (choose two)


a) only one actual file exists File System Interface Mounting and Sharing -
b) there are two copies of the file “File System Interface Mounting and Sharing”
c) the changes made by one person are not reflected to the 1) A mount point is :
other a) an empty directory at which the mounted file system
d) the changes made by one person are reflected to the will be attached
other b) a location where everytime file systems are mounted
c) is the time when the mounting is done
Answer : a and d d) None of these

7) In UNIX, a link is : (choose all that apply) Answer: a


a) a connection between two files
b) a pointer to another file or subdirectory
67
2) When a file system is mounted over a directory that is Answer: a
not empty : (choose all that apply) Explanation: The world wide web uses anonymous file
a) the system may disallow the mount exchange almost exclusively.
b) the system must allow the mount 8) The machine containing the files is the _______, and
c) the system may allow the mount and the directory’s the machine wanting to access the files is the ______.
existing files will then be made obscure a) master, slave
d) All of these b) memory, user
c) server, client
Answer: a and c d) None of these

3) In UNIX, exactly which operations can be executed by Answer: c


group members and other users is definable by :
a) the group’s head 9) Distributed naming services/Distributed information
b) the file’s owner systems have been devised to :
c) the file’s permissions a) provide information about all the systems
d) All of these b) provide unified access to the information needed for
remote computing
Answer: b c) provide unique names to all systems in a network
d) All of these
4) A process _____ lower the priority of another process,
if both are owned by the same owner. Answer: b
a) must
b) can 10) Domain name system provides :
c) cannot a) host-name-to-network-address translations for the entire
d) None of these internet
b) network-address-to-host-name translations for the entire
Answer: b internet
c) binary to hex translations for the entire internet
5) In distributed file system, ______ directories are visible d) All of these
from the local machine.
a) protected
b) local Answer: a
c) private
d) remote 11) To recover from failures in the network operations,
______ information maybe maintained.
a) ip address
Answer: d b) state
c) stateless
6) In the world wide web, a ____ is needed to gain access d) operating system
to the remote files, and seperate operations are used to
transfer files. Answer: b
a) laptop
b) plugin 12) The series of accesses between the open and close
c) browser operations is a :
d) player a) transaction
b) procedure
Answer: c c) program
d) file session
7) Anonymous access allows a user to transfer files :
a) without having an account on the remote system Answer: d
b) only if he accesses the system with a guest account
c) only if he has an account on the remote system
d) None of these File System Interface Protection -
“File System Interface Protection”
1) Reliability of files can be increased by :
a) keeping the files safely in the memory
68
b) making a different partition for the files 8) To control access the three bits used in UNIX are
c) by keeping them in external storage represented by :
d) by keeping duplicate copies of the file a) r
b) w
Answer: d c) ex
d) x
2) Protection is only provided at the _____ level.
a) lower Answer: a, b, d
b) central
c) higher 9) If each access to a file is controlled by a password, then
d) None of these the disadvantage is that :
a) user will need to remember a lot of passwords
Answer: a b) it is not reliable
c) it is not efficient
3) The main problem with access control lists is : d) All of these
a) their maintenance
b) their length Answer: a
c) their permissions
d) All of these 10) In a multilevel directory structure :
a) the same previous techniques will be used as in the
Answer: b other structures
b) a mechanism for directory protection will have to
4) Many systems recognize three classifications of users in applied
connection with each file (to condense the access control c) the subdirectories do not need protection once the
list) : directory is protected
a) Owner d) None of these
b) Group
c) Sub-owner
d) Universe Answer: b

Answer: a, b and d 11) In UNIX, the directory protection is handled


_________ to the file protection.
5) All users in a group get _______ access to a file. a) different
a) different b) similar
b) similar c) it is not handled at all
c) None of these d) None of these

Answer: b
Answer: b
12) Disks are segmented into one or more partitions, each
6) Universe consists of : containing a file system or ______.
a) all users that arent included in the group or owners a) left ‘raw’
b) all users that are not owners b) made into swap space
c) all users in the system c) made into backup space
d) None of these d) left ‘ripe’

Answer: c Answer: a

7) In UNIX, groups can be created and modified by :


a) superuser File System Implementation - Allocation Methods - 1 -
b) any user “File System Implementation – Allocation Methods”
c) a programmer only 1) The three major methods of allocating disk space that
d) the people in the group only are in wide use are :
a) contiguous
Answer: a b) linked
c) indexed
69
d) hashed a) size of the linear list in memory
b) linear search to find a file
Answer : a, b and c c) it is not reliable
d) All of these
2) In contiguous allocation :
a) each file must occupy a set of contiguous blocks on the Answer : b
disk
b) each file is a linked list of disk blocks 8) Contiguous allocation of a file is defined by : (choose
c) all the pointers to scattered blocks are placed together in all that apply)
one location a) disk address of the first block
d) None of these b) length
c) size of the block
Answer : a d) total size of the file

3) In linked allocation : Answer : a and b


a) each file must occupy a set of contiguous blocks on the
disk 9) One difficulty of contiguous allocation is :
b) each file is a linked list of disk blocks a) finding space for a new file
c) all the pointers to scattered blocks are placed together in b) inefficient
one location c) costly
d) None of these d) time taking

Answer : b Answer : a

4) In indexed allocation : 10) _______ and ________ are the most common
a) each file must occupy a set of contiguous blocks on the strategies used to select a free hole from the set of
disk available holes.
b) each file is a linked list of disk blocks a) First fit
c) all the pointers to scattered blocks are placed together in b) Worst fit
one location c) Best fit
d) None of these d) None of these

Answer : c Answer : a and c

5) On systems where there are multiple operating system, 11) The first fit and best fit algorithms suffer from :
the decision to load a particular one is done by : (choose all that apply)
a) boot loader a) internal fragmentation
b) boot strap b) external fragmentation
c) process control block c) starvation
d) file control block d) All of these

Answer : a Answer : b

6) The VFS (virtual file system) activates file system 12) To solve the problem of external fragmentation,
specific operations to handle local requests according to ________ needs to be done periodically.
their _______. a) compaction
a) size b) check
b) commands c) formatting
c) timings d) replacing memory
d) file system types
Answer : a
Answer : d
13) If too little space is allocated to a file,
7) The real disadvantage of a linear list of directory entries a) the file will not work
is the : b) there will not be any space for the data, as the FCB
70
takes it all a) can
c) the file cannot be extended b) cannot
d) the file cannot be opened c) is
d) None of these
Answer : c

Answer : b
Basic
“File System Implementation – Allocation Methods” 7) When in contiguous allocation the space cannot be
1) A device driver can be thought of as a translator. Its extended easily :
input consists of _____ commands and output consists of a) the contents of the file have to be copied to a new space,
_______ instructions. a larger hole
a) high level, low level b) the file gets destroyed
b) low level, high level c) the file will get formatted and loose all its data
c) complex, simple d) None of these
d) Both a and c
Answer : a
Answer : a
8) In the linked allocation, the directory contains a pointer
2) The file organization module knows about : to the :
a) files I. first block
b) logical blocks of files II. last block
c) physical blocks of files a) I only
d) All of these b) II only
c) Both I and II
Answer : d d) Neither I nor II

3) Metadata includes : Answer : c


a) all of the file system structure
b) contents of files 9) There is no __________ with linked allocation.
c) Both a and b a) internal fragmentation
d) None of these b) external fragmentation
c) starvation
Answer : c d) All of these

4) For each file their exists a ___________, that contains Answer : b


information about the file, including ownership,
permissions and location of the file contents. 10) The major disadvantage with linked allocation is that :
a) metadata a) internal fragmentation
b) file control block b) external fragmentation
c) process control block c) there is no sequential access
d) All of these d) there is only sequential access

Answer : b Answer : d

5) For processes to request access to file contents, they 11) If a pointer is lost or damaged in a linked allocation :
need to : a) the entire file could get damaged
a) they need to run a seperate program b) only a part of the file would be affected
b) they need special interrupts c) there would not be any problems
c) implement the open and close system calls d) None of these
d) None of these

Answer : c Answer : a

6) During compaction time, other normal system 12) FAT stands for :
operations _______ be permitted. a) File Attribute Transport
71
b) File Allocation Table b) internal – fragmentation
c) Fork At Time c) size – declaration
d) None of these d) memory – allocation

Answer : b Answer : a and c

13) By using FAT, random access time is __________. 6) Each _______ has its own index block.
a) the same a) partition
b) increased b) address
c) decreased c) file
d) not affected d) All of these

Answer : c Answer : c

7) Indexed allocation _________ direct access.


“File System Implementation – Allocation Methods” a) supports
1) A better way of contiguous allocation to extend the file b) does not support
size is : c) is not related to
a) adding an extent (another chunk of contiguous space) d) None of these
b) adding an index table to the first contiguous block
c) adding pointers into the first contiguous block Answer : a
d) None of these
8) The pointer overhead of indexed allocation is generally
Answer : a _________ the pointer overhead of linked allocation.
a) less than
2) If the extents are too large, then the problem that comes b) equal to
in is : c) greater than
a) internal fragmentation d) keeps varying with
b) external fragmentation
c) starvation Answer : c
d) All of these
9) For any type of access, contiguous allocation requires
Answer : a ______ access to get a disk block.
a) only one
3) The FAT is used much as a _________. b) atleast two
a) stack c) exactly two
b) linked list d) None of these
c) data
d) pointer
Answer : a
Answer : b Explanation: We can easily keep the initial address of the
file in memory and calculate immediately the disk address
4) A section of disk at the beginning of each partition is set of the ith block and read it directly.
aside to contain the table in : 10) Consider a disk where blocks
a) FAT 2,3,4,5,8,9,10,11,12,13,17,18,25,26 and 27 are free and the
b) linked allocation rest of the blocks are allocated. Then the free space bit
c) Hashed allocation map would be :
d) indexed allocation a) 10000110000001110011111100011111…
b) 110000110000001110011111100011111…
c) 01111001111110001100000011100000…
Answer : a d) 001111001111110001100000011100000…

Answer : d
5) Contiguous allocation has two problems _________ and
_________ that linked allocation solves.
a) external – fragmentation File System Implementation - Performance -
72
“File System Implementation – Performance” Answer : b
1) _______ tend to represent a major bottleneck in system
performance. 7) In the optimized technique for sequential access
a) CPUs ___________ removes a page from the buffer as soon as
b) Disks the next page is requested.
c) Programs a) write ahead
d) I/O b) read ahead
c) free-behind
Answer : b d) add-front

2) In UNIX, even an ’empty’ disk has a percentage of its Answer : c


space lost to ______.
a) programs 8) With _______, a requested page and several subsequent
b) inodes pages are read and cached.
c) virtual memory a) write ahead
d) stacks b) read ahead
c) free-behind
Answer : b d) add-front

3) By preallocating the inodes and spreading them across


the volume, we ___________ the system performance. Answer : b
a) improve
b) decrease
c) maintain File System Implementation - Recovery -
d) do not affect “File System Implementation – Recovery”
1) Some directory information is kept in main memory or
Answer : a cache to ___________.
a) fill up the cache
4) ____________ writes occur in the order in which the b) increase free space in secondary storage
disk subsystem receives them, and the writes are not c) decrease free space in secondary storage
buffered. d) speed up access
a) Asynchronous
b) Regular Answer : d
c) Synchronous
d) Irregular 2) A systems program such as fsck in ______ is a
consistency checker.
a) UNIX
Answer : c b) Windows
c) Macintosh
5) In ___________ writes, the data is stored in the cache. d) Solaris
a) Asynchronous
b) Regular Answer : a
c) Synchronous
d) Irregular 3) A consistency checker __________________ and tries
to fix any inconsistencies it finds.
Answer : a a) compares the data in the secondary storage with the data
in the cache
6) A file being read or written sequentially should not have b) compares the data in the directory structure with the
its pages replaced in LRU order, because data blocks on disk
___________________. c) compares the system generated output and user required
a) it is very costly output
b) the most recently used page will be used last d) All of these
c) it is not efficient
d) All of these Answer : b

73
4) Each set of operations for performing a specific task is a d) neither a nor b
_________.
a) program Answer : c
b) code
c) transaction 2) A _________ directory is mounted over a directory of a
d) All of these _______ file system.
a) local, remote
b) remote, local
Answer : c c) None of these

5) Once the changes are written to the log, they are Answer : c
considered to be ________.
a) committed 3) The _________ becomes the name of the root of the
b) aborted newly mounted directory.
c) completed a) root of the previous directory
d) None of these b) local directory
c) remote directory itself
Answer : a d) None of these

6) When an entire committed transaction is completed, Answer : b


___________.
a) it is stored in the memory 4) ___________ mounts, is when a file system can be
b) it is removed from the log file mounted over another file system, that is remotely
c) it is redone mounted, not local.
d) None of these a) recursive
b) cascading
Answer : b c) trivial
d) None of these
7) A circular buffer :
a) writes to the end of its space and then continues at the
beginning Answer : b
b) overwrites older values as it goes
c) both a and b 5) The mount mechanism ________ a transitive property.
d) neither a nor b a) exhibits
b) does not exhibit
Answer : c c) may exhibit
d) None of these
8) All the changes that were done from a transaction that
did not commit before the system crashed, have to be Answer : b
_________. Explanation: Mounting a remote file system does not give
a) saved the client access to other file systems that were, by chance,
b) saved and the transaction redone mounted over the former file system.
c) undone 6) A mount operation includes the : (choose all that apply)
d) None of these a) name of the network
b) name of the remote directory to be mounted
c) name of the server machine storing it
Answer : c d) All of these

Answer : b and c
File System Implementation - Network File System - 1 -
“File System Implementation – Network File System” 7) The mount request is mapped to the corresponding
1) A machine in Network file system (NFS) can be _____ and is forwarded to the mount server running on the
________. specific server machine.
a) client a) IPC
b) server b) system
c) both a and b c) CPU
74
d) RPC b) asynchronously
c) index-wise
Answer : b d) None of these

8) The server maintains a/an ________ that specifies local


file systems that it exports for mounting, along with names Answer : a
of machines that are permitted to mount them.
a) export list 5) A single NFS write procedure :
b) import list a) can be atomic
c) sending list b) is atomic
d) receiving list c) is non atomic
d) None of these

Answer : a Answer : b

9) In UNIX, the file handle consists of a __________ and 6) The NFS protocol, __________ concurrency control
__________. mechanisms.
a) file-system identifier a) provides
b) an inode number b) does not provide
c) a FAT c) may provide
d) a file pointer d) None of these

Answer : a and b Answer : b

7) _______________ in NFS involves the parsing of a


“File System Implementation – Network File System” path name into seperate directory entries – or components.
1) The NFS servers : a) Path parse
a) are stateless b) Path name parse
b) save the current state of the request c) Path name translation
c) maybe stateless d) Path name parsing
d) None of these
Answer : c
Answer : a
8) For every pair of component and directory vnode after
2) Every NFS request has a _________, allowing the path name translation :
server to determine if a request is duplicated or if any are a) a single NFS lookup call is used sequentially
missing. b) a single NFS lookup call is used beginning from the last
a) name component
b) transaction c) atleast two NFS lookup calls per component are
c) sequence number performed
d) All of these d) a seperate NFS lookup call is performed

Answer : c
Answer : d
3) A server crash and recovery will __________ to a
client. 9) When a client has a cascading mount, _______ server(s)
a) be visible is/are involved in a path name traversal.
b) affect a) atleast one
c) be invisible b) more than one
d) harm c) more than two
d) more than three
Answer : c
Explanation: All blocks that the server is managing for the Answer : b
client will be intact.
4) The server must write all NFS data ___________.
a) synchronously I/O Subsystem
75
I/O subsystems of Operating System. c) each I/O device state
1. I/O hardware contains d) all of the mentioned
a) bus
b) controller Answer:d
c) I/O port and its registers
d) all of the mentioned 8. Which buffer holds the output for a device?
a) spool
Answer:d b) output
c) status
2. The data-in register of I/O port is d) magic
a) read by host to get input
b) read by controller to get input Answer:a
c) written by host to send output
d) written by host to start a command 9. Which one of the following connects high-speed high-
bandwidth device to memory subsystem and CPU.
Answer:a a) expansion bus
b) PCI bus
3. The host sets _____ bit when a command is available c) SCSI bus
for the controller to execute. d) none of the mentioned
a) write
b) status
c) command-ready Answer:a
d) control
10. A process is moved to wait queue when I/O request is
Answer:c made with
a) non-blocking I/O
4. When hardware is accessed by reading and writing to b) blocking I/O
the specific memory locations, then it is called c) asynchronous I/O
a) port-mapped I/O d) synchronous I/O
b) controller-mapped I/O
c) bus-mapped I/O Answer:b
d) none of the mentioned

Answer:d Disk Scheduling - 1 -


Explanation:It is called memory-mapped I/O. “Disk Scheduling”
5. Device drivers are implemented to interface 1) In _______, information is recorded magnetically on
a) character devices platters.
b) block devices a) magnetic disks
c) network devices b) electrical disks
d) all of the mentioned c) assemblies
d) cylinders

Answer:d Answer : a

6. Which hardware triggers some operation after certain 2) The heads of the magnetic disk are attached to a _____
programmed count? that moves all the heads as a unit.
a) programmable interval timer a) spindle
b) interrupt timer b) disk arm
c) programmable timer c) track
d) none of the mentioned d) None of these

Answer:a Answer : b

7. The device-status table contains 3) The set of tracks that are at one arm position make up a
a) each I/O device type ___________.
b) each I/O device address a) magnetic disks
76
b) electrical disks d) disk, host
c) assemblies
d) cylinders
Answer : c
Answer : d
10) The disk bandwidth is :
4) The time taken to move the disk arm to the desired a) the total number of bytes transferred
cylinder is called the : b) total time between the first request for service and the
a) positioning time completion on the last transfer
b) random access time c) the total number of bytes transferred divided by the total
c) seek time time between the first request for service and the
d) rotational latency completion on the last transfer
d) None of these

Answer : c Answer : c

5) The time taken for the desired sector to rotate to the disk
head is called :
a) positioning time “Disk Scheduling”
b) random access time 1) Whenever a process needs I/O to or from a disk it issues
c) seek time a ______________.
d) rotational latency a) system call to the CPU
b) system call to the operating system
Answer : d c) a special procedure
d) All of these
6) When the head damages the magnetic surface, it is
known as _________. Answer : b
a) disk crash
b) head crash 2) If a process needs I/O to or from a disk, and if the drive
c) magnetic damage or controller is busy then :
d) All of these a) the request will be placed in the queue of pending
requests for that drive
Answer : b b) the request will not be processed and will be ignored
completely
7) A floppy disk is designed to rotate ___________ as c) the request will be not be placed
compared to a hard disk drive. d) None of these
a) faster
b) slower Answer : a
c) at the same speed
d) None of these 3) Consider a disk queue with requests for I/O to blocks on
cylinders :
Answer : b 98 183 37 122 14 124 65 67
i) Considering FCFS (first cum first served) scheduling,
8) The host controller is : the total number of head movements is, if the disk head is
a) controller built at the end of each disk initially at 53 :
b) controller at the computer end of the bus a) 600
c) both a and b b) 620
d) neither a nor b c) 630
d) 640
Answer : b
Answer : d
9) ______ controller sends the command placed into it, via
messages to the _____ controller. ii) Considering SSTF (shortest seek time first) scheduling,
a) host, host the total number of head movements is, if the disk head is
b) disk, disk initially at 53 :
c) host, disk a) 224
77
b) 236 9) In the _______ algorithm, the disk head moves from
c) 245 one end to the other , servicing requests along the way.
d) 240 When the head reaches the other end, it immediately
returns to the beginning of the disk without servicing any
requests on the return trip.
Answer : b a) LOOK
b) SCAN
4) Random access in magnetic tapes is _________, c) C-SCAN
compared to magnetic disks. d) C-LOOK
a) fast
b) very fast Answer : c
c) slow
d) very slow 10) In the ______ algorithm, the disk arm goes as far as
the final request in each direction, then reverses direction
Answer : d immediately without going to the end of the disk.
a) LOOK
5) Magnetic tape drives can write data at a speed b) SCAN
________ disk drives. c) C-SCAN
a) much lesser than d) C-LOOK
b) comparable to
c) much faster than Answer : a
d) None of these

Answer : b Disk Management -


“Disk Management”
6) On media that use constant linear velocity (CLV), the 1) The process of dividing a disk into sectors that the disk
_____________ is uniform. controller can read and write, before a disk can store data
a) density of bits on the disk is known as : (choose all that apply)
b) density of bits per sector a) partitioning
c) the density of bits per track b) swap space creation
d) None of these c) low-level formatting
d) physical formatting
Answer : c
Explanation: The farther a track is from the center of the Answer : c and d
disk.
7) SSTF algorithm, like SJF __________ of some requests. 2) The data structue for a sector typically contains :
a) may cause starvation (choose all that apply)
b) will cause starvation a) header
c) does not cause starvation b) data area
d) causes aging c) trailer
d) main section
Answer : a
Answer : a, b and c
8) In the ______ algorithm, the disk arm starts at one end
of the disk and moves toward the other end, servicing 3) The header and trailer of a sector contain information
requests till the other end of the disk. At the other end, the used by the disk controller such as _________ and
direction is reversed and servicing continues. _________.
a) LOOK a) main section
b) SCAN b) error correcting codes (ECC)
c) C-SCAN c) sector number
d) C-LOOK d) disk identifier

Answer : b and c
Answer : b
4) The two steps the operating system takes to use a disk to
hold its files are _______ and ________.
78
a) partitioning 10) The scheme used in the above question is known as
b) swap space creation _______ or ________.
c) caching a) sector sparing
d) logical formatting b) forwarding
c) backwarding
Answer : a and d d) sector utilization

5) The _______ program initializes all aspects of the


system, from CPU registers to device controllers and the Answer : a and b
contents of main memory, and then starts the operating
system. 11) An unrecoverable error is known as _________.
a) main a) hard error
b) bootloader b) tough error
c) bootstrap c) soft error
d) ROM d) None of these

Answer : a
Answer : c

6) For most computers, the bootstrap is stored in ____. Swap Space Management -
a) RAM “Swap Space Management”
b) ROM 1) Virtual memory uses disk space as an extension of
c) cache _________.
d) tertiary storage a) secondary storage
b) main memory
Answer : b c) tertiary storage
d) None of these
7) A disk that has a boot partition is called a _________.
(choose all that apply) Answer : b
a) start disk
b) system disk 2) Using swap space significantly _________ system
c) boot disk performance.
d) All of these a) increases
b) decreases
Answer : b and c c) maintains
d) does not affect
8) Defective sectors on disks are often known as
__________. Answer : b
a) good blocks Explanation: Disk access is much slower than memory
b) destroyed blocks access.
c) bad blocks 3) Linux __________ the use of multiple swap spaces.
d) None of these a) allows
b) does not allow
Answer : c c) None of these

9) In SCSI disks used in high end PCs, the controller Answer : a


maintains a list of _________ on the disk. The disk is Explanation: Putting these swap spaces on seperate disks
initialized during ________ formatting which sets aside reduces the load places on the I/O system.
spare sectors not visible to the operating system. 4) A single swap space ______ reside in two places.
a) destroyed blocks, high level formatting a) can
b) bad blocks, partitioning b) cannot
c) bad blocks, low level formatting c) must not
d) destroyed blocks, partitioning d) None of these

Answer : c

79
Answer : a 1) RAID level 3 supports a lower number of I/Os per
second, because _______________.
5) If the swap space is simply a large file, within the file a) every disk has to participate in every I/O request
system, ____________ used to create it, name it and b) only one disk participates per I/O request
allocate its space. c) I/O cycle consumes a lot of CPU time
a) special routines must be d) All of these
b) normal file system routines can be
c) normal file system routines cannot be Answer : a
d) swap space storage manager is
2) RAID level _____ is also known as block interleaved
Answer : b parity organisation and uses block level striping and keeps
a parity block on a seperate disk.
6) For swap space created in a seperate disk partition a) 1
where no file system or directory structure is placed, b) 2
_____________ used to allocate and deallocate the blocks. c) 3
a) special routines must be d) 4
b) normal file system routines can be
c) normal file system routines cannot be Answer : d
d) swap space storage manager is
3) A performance problem with _________ is the expense
Answer : d of computing and writing parity.
a) non-parity based RAID levels
7) When a fixed amount of swap space is created during b) parity based RAID levels
disk partitioning, more swap space can be added only by : c) all RAID levels
I) repartitioning of the disk d) None of these
II) adding another swap space elsewhere
a) only I Answer : b
b) only II
c) both I and II 4) In RAID level 4, one block read, accesses __________.
d) neither I nor II a) only one disk
b) all disks simultaneously
Answer : c c) all disks sequentially
d) None of these
8) In UNIX, two per process ________ are used by the
kernel to track swap space use. Answer : a
a) process tables Explanation: Other requests are allowed to be processed by
b) swap maps other disks.
c) memory maps 5) The overall I/O rate in RAID level 4 is :
d) partition maps a) low
b) very low
c) high
Answer : b d) None of these

9) It is __________ to reread a page from the file system


than to write it to swap space and then to reread it from Answer : c
there. Explanation: All disks can be read in parallel.
a) useless 6) A write of a block has to access : (choose all that apply)
b) less efficient a) the disk on which the block is stored
c) more efficient b) parity disk
d) None of these c) a parity block
d) All of these
Answer : c
Answer : d

RAID Structure - 1 - 7) RAID level 5 is also known as :


“RAID Structure” a) bit-interleaved parity organization
80
b) block-interleaved parity organization Advanced
c) block-interleaved distributed parity This set of 1000+ Advanced Operating System Questions
d) memory-style ECC organization and Answers focuses on “RAID Structure”
1) A large number of disks in a system improves the rate at
Answer : c which data can be read or written :
a) if the disks are operated on sequentially
8) RAID level ____ spreads parity and data among all N+1 b) if the disks are operated on selectively
disks rather than storing data in N disks and parity in 1. c) if the disks are operated in parallel
a) 3 d) All of these
b) 4
c) 5 Answer : c
d) 6
2) RAID stands for :
Answer : c a) Redundant Allocation of Inexpensive Disks
b) Redundant Array of Important Disks
9) The potential overuse of a single parity disk is avoided c) Redundant Allocation of Independent Disks
in RAID level ____. d) Redundant Array of Independent Disks
a) 3
b) 4 Answer : d
c) 5
d) All of these 3) If the mean time to failure of a single disk is 100,000
hours, then the mean time to failure of some disk in an
Answer : c array of 100 disks will be :
a) 100 hours
10) RAID level 0+1 is used because, RAID level 0 b) 10 days
provides ______ whereas RAID level 1 provides c) 10 hours
________. d) 1000 hours
a) performance, redundancy
b) performance, reliability Answer : d
c) redundancy, performance
d) None of these 4) The solution to the problem of reliability is the
introduction of __________.
a) aging
Answer : b b) scheduling
c) redundancy
11) If a disk fails in RAID level ___ rebuilding lost data is d) disks
easiest.
a) 1 Answer : c
b) 2
c) 3 5) The technique of duplicating every disk is known as :
d) 4 a) mirroring
b) shadowing
Answer : a c) redundancy
Explanation: Data can be copied from another disk in raid d) scheduling
level 1, for other raid levels all other disks have to be
accessed.
12) Where performance and reliability are both important, Answer : a and b
RAID level ____ is used.
a) 0 6) The mean time to failure of a mirrored disk depends on :
b) 1 I) the mean time to failure of individual disks
c) 2 II) the mean time to repair
d) 0+1 a) Only I
b) Only II
Answer :d c) Both I and II
d) Neither I nor II

81
Answer : c Answer : c
Explanation: There is one mirror disk for every disk in
7) RAID level ________ refers to disk arrays with striping level 1.
at the level of blocks, but without any redundancy.
a) 0 Tertiary Storage -
b) 1 “Tertiary Storage”
c) 2 1) Tertiary storage is built with :
d) 3 a) a lot of money
b) unremovable media
Answer : a c) removable media
d) secondary storage
8) RAID level _______ refers to disk mirroring.
a) 0 Answer : c
b) 1
c) 2 2) Floppy disks are examples of :
d) 3 a) primary storage
b) secondary storage
Answer : b c) tertiary storage
d) None of these
9) RAID level ______ is also known as bit interleaved
parity organisation. Answer : c
a) 0
b) 1 3) A magneto-optic disk is :
c) 2 a) primary storage
d) 3 b) secondary storage
c) tertiary storage
Answer : d d) removable disk

10) A single parity bit can be used for : (choose all that Answer : c and d
apply)
a) detection 4) The magneto-optic head flies ___________ the disk
b) multiple error corrections surface than a magnetic disk head does.
c) few error corrections a) much farther from
d) single error correction b) much closer to
c) at the same distance as
d) None of these
Answer : a and d
Answer : a
11) RAID level ______ is also known as memory style
error correcting code(ECC) organization. 5) Optical disks ______ magnetism.
a) 1 a) use
b) 2 b) do not use
c) 3 c) may use
d) 4 d) None of these

Answer : b
Answer : b
12) RAID level 3 does not have _________ as in RAID
level 1. 6) The phase change disk is coated with a material that can
a) efficiency freeze into either _______ or ________ state.
b) enough storage space for data a) crystalline, solid
c) storage overhead b) ice, amorphous
d) time consumption overhead c) crystalline, liquid
d) crystalline, amorphous

82
Answer : d 2) What is meaning of right-set ?
a) It is a subset consist of read and write
7) WORM stands for : b) It is a subset of all valid operations that can be
a) write only, read mandatory performed on the object
b) write once, read many times c) It is a subset consist of read,write and execute
c) write only once, read multiple d) None of these
d) None of these
Answer: b
Answer : b
3) What is Domain ?
8) A tape holds _______ data than optical or magnetic disk a) Domain = Set of all objects
cartridge. b) It is a collection of protection policies
a) lesser c) Domain= set of access-rights
b) more d) None of these
c) much lesser
d) None of these Answer: c

Answer : b 4) What does access matrix represent ?


a) Rows-Domains, Columns-Objects
9) Random access to tape is _______ a disk seek. b) Rows-Objects, Columns-Domains
a) much slower than c) Rows-Access List, Columns-Domains
b) much faster than d) Rows-Domains, Columns-Access list
c) comparable to
d) None of these Answer: a

Answer : a 5) What are the three additional operations to change the


contents of the access-matrix ?
10) A typical tape drive is ________ a typical disk drive. a) Copy
a) more expensive than b) Owner
b) cheaper than c) Deny
c) of the same cost as d) control
d) None of these
Answer: a,b and d

Answer : a 6) Who can add new rights and remove some rights ?
a) Copy
11) The surface area of a tape is ________ the surface area b) transfer
of a disk. c) limited copy
a) much lesser than d) owner
b) much larger than
c) equal to
d) None of these Answer: d

Answer : b 7) What are the three copy rights ?


a) Copy
b) transfer
Protection - Access Matrix - c) limited copy
“Protection – Access Matrix” d) owner
1) In domain structure what is Access-right equal to ?
a) Access-right = object-name, rights-set Answer: a,b,c
b) Access-right = read-name, write-set
c) Access-right = read-name, execute-set 8) Which two rights allow a process to change the entries
d) Access-right = object-name, execute-set in a column ?
a) copy and transfer
Answer: a b) copy and owner
c) owner and transfer
83
d) deny and copy Answer: b & a

Answer: a 14) What are cryptographic and logical separation ?


(Choose 2)
9) Which is an unsolvable problem in access-matrix ? a) logical separation – in which process use different
a) Owner override physical objects like separate printers
b) brute force b) cryptographic separation – in which process having
c) Access denied different security requirement at different times
d) Confinement c) Logical separation – In which users operate under
illusion that no other processes exist
Answer: d d) cryptographic sepration – In which processes conceal
their data and computations
10) Which of the following objects require protection ?
a) CPU
b) Printers Answer: d & c
c) Tape drives
d) Motherboard 15) What are various roles of protection ? (Choose two)
a) It is used to detect errors which can prevent
Answer: b & c contamination of system.
b) It is used used to defend against misuse
11) What is ‘separation’ in security of Operating systems ? c) It is used to optimize system downtime
a) To have separate login for different users d) It is used to accelerate a process
b) To have separate Hard disk drive/partition for different
users Answer: a & b
c) It means keeping one user’s objects separate from other
users 16) Which of the following objects require protection ?
d) None of these (Choose two)
a) Memory
Answer: c b) Sharable I/O devices such as disks
c) Power supply unit
12) What are physical separation and logical separation ? d) Monitor
(Choose 2)
a) Physical separation – in which process use different Answer: a & b
physical objects like separate printers
b) Physical separation – in which process having different
security requirement at different times OS Protection
c) Logical separation – In which users operate under protection concepts of Operating System.
illusion that no other processes exist 1. Which principle states that programs, users and even the
d) Logical sepration – In which processes conceal their systems be given just enough privileges to perform their
data and computations task?
a) principle of operating system
b) principle of least privilege
Answer: a & c c) principle of process scheduling
d) none of the mentioned
13) What are temporal and physical separation ? (Choose
2) Answer:b
a) Physical separation – in which process use different
physical objects like separate printers 2. _______ is an approach to restricting system access to
b) Temporal separation – in which process having different authorized users.
security requirement at different times a) Role-based access control
c) Physical separation – In which users operate under b) Process-based access control
illusion that no other processes exist c) Job-based access control
d) Temporal sepration – In which processes conceal their d) none of the mentioned
data and computations
Answer:a

84
3. For system protection, a process should access d) none of the mentioned
a) all the resources
b) only those resources for which it has authorization
c) few resources but authorization is not required Answer:c
d) all of the mentioned
10. In UNIX, domain switch is accomplished via
Answer:b a) file system
b) user
4. The protection domain of a process contains c) superuser
a) object name d) none of the mentioned
b) rights-set
c) both (a) and (b) Answer:a
d) none of the mentioned

Answer:c OS Security
security in Operating System.
5. If the set of resources available to the process is fixed 1. When an attempt is to make a machine or network
throughout the process’s lifetime then its domain is resource unavailable to its intended users, the attack is
a) static called
b) dynamic a) denial-of-service attack
c) neither static nor dynamic b) slow read attack
d) none of the mentioned c) spoofed attack
d) starvation attack

Answer:a Answer:a

6. Access matrix model for user authentication contains 2. The code segment that misuses its environment is called
a) a list of objects a
b) a list of domains a) internal thief
c) a function which returns an object’s type b) trojan horse
d) all of the mentioned c) code stacker
d) none of the mentioned
Answer:d
Answer:b
7. Global table implementation of matrix table contains
a) domain 3. The internal code of any software that will set of a
b) object malicious function when specified conditions are met, is
c) right-set called
d) all of the mentioned a) logic bomb
b) trap door
Answer:d c) code stacker
d) none of the mentioned
8. For a domain _______ is a list of objects together with
the operation allowed on these objects. Answer:a
a) capability list
b) access list 4. The pattern that can be used to identify a virus is known
c) both (a) and (b) as
d) none of the mentioned a) stealth
b) virus signature
Answer:a c) armoured
d) multipartite
9. Which one of the following is capability based
protection system? Answer:b
a) hydra
b) cambridge CAP system 5. Which one of the following is a process that uses the
c) both (a) and (b) spawn mechanism to revage the system performance?
85
a) worm b) It can protect Operating system from one user
b) trojen c) It can protect users from each other
c) threat d) It is implemented via software register
d) virus
Answer: a & b

Answer:a 2) What is not true regarding ‘Fence’ ?


a) It is implemented via hardware register
6. What is a trap door in a program? b) It doesn’t protect users from each other
a) a security hole, inserted at programming time in the c) It good to protect OS from abusive users
system for later use d) Its implementation is unrestricted and can take any
b) a type of antivirus amount of space in Operating system.
c) security hole in a network
d) none of the mentioned Answer: d

Answer:a 3) What is correct regarding ‘relocation’ w.r.t protecting


memory ? (Choose 2)
7. Which one of the following is not an attack, but a search a) It is a process of taking a program as if it began at
for vulnerabilities to attack? address 0
a) denial of service b) It is a process of taking a program as if it began at
b) port scanning address 0A
c) memory access violation c) It changes all address to reflect the actual address at
d) dumpster diving which program is located in memory
d) Fence cannot be used within relocation process
Answer:b
Answer: a & c
8. File virus attaches itself to the
a) source file 4) How can fence and relocation be used together ?
b) object file a) To each program address, the contents of fence register
c) executable file are added
d) all of the mentioned b) To contents of fence register is subtracted from actual
address of program
Answer:c c) Both a and b
d) none of the mentioned
9. Multipartite viruses attack on
a) files Answer: a
b) boot sector Explanation: This both relocates the address and
c) memory guarantees that no one can access a location lower than a
d) all of the mentioned fence address.
5) What is basic need in protecting memory in multi-user
environment ?
Answer:d a) We need two registers one ‘start’ and other ‘end’
b) We need a variable register
10. In asymmetric encryption c) A fence register has to be used known as base register.
a) same key is used for encryption and decryption d) none of the mentioned
b) different keys are used encryption and decryption
c) no key is required for encryption and decryption Answer: c
d) none of the mentioned
6) What is role of base/bound registers ?
Answer:b a) They give starting address to a program
b) Program’s addresses are neatly confined to space
between the base and the bound registers
Protection - Memory Protection - c) They provide encrypted environment
“Protection – Memory Protection” d) This technique doesn’t protects a program’s address
1) What is true regarding ‘Fence’ ? (Choose 2) from modification by another user
a) Its a method to confine users to one side of a boundary
86
d) offset, rights

Answer: b
Answer: a
7) What is all-or-nothing situation for sharing in memory ? Explanation: OS can retrieve the real address via looking
(Choose 2) for the table then making a simple calculation : address of
a) Program makes all its data available to be accessed the name + offset.
b) It prohibits access to all 13) What is main objective of protection ?
c) It creates rules who can access program memory a) Ensure all objects are protected individually
d) It separates program memory and data memory b) Objects have different priority and thus different levels
of protection
Answer: a and b c) Ensure that each object is accessed correctly and only
by allowed processes
8) How is disadvantage of all-or-nothing approach d) None of the mentioned
overcome ?
a) Base/Bound Answer: c
b) Relocation technique
c) Fence method 14) What is principle of least privilege ?
d) Tagged architecture a) Less privileges provide difficulty in executing admin
tasks.
Answer: d b) Users can get temporary high privilege access
c) Users should be given just enough privileges to perform
9) What is true regarding tagged architecture ? (Choose their tasks.
two) d) None of the mentioned
a) Every word of machine memory has one or more extra
bits Answer: c
b) Extra bits are used to do padding
c) Extra bits are used to identify rights to that word 15) What is need of protection ? (Choose two)
d) It is very compatible to code upgrades a) Prevent mischievous and intentional violation
b) Prevent competitors to become better
Answer: a and c c) Ensure that each program component uses resources
allotted to it only.
10) What is best solution to have effect of unbounded d) For improving performance of system
number if base/bound registers?
a) Tagged architecture Answer: a & c
b) Segmentation
c) Fence method
d) none of the mentioned Tough
This set of 1000+ Tough Operating System Questions and
Answer: b Answers focuses on “Protection – Revocation of Access
Rights”
11) What is major feature of segmentation ? 1) What is incorrect methods of revocation of access rights
a) Program is divided in data memory and program ?
memory a) Immediate/Delayed
b) Program is executed in segments b) Selective/General
c) Program is divided into pieces having different access c) Partial/total
rights d) Crucial
d) It has effect of an unbounded architecture
Answer: d
Answer: c
2) Why is it difficult to revoke capabilities ?
12) What is correct way the segmentation program address a) They are too many
is stored ? b) They are not defined precicely
a) name, offset c) They are distributed throughout the system.
b) start, stop d) None of these
c) access, rights
87
Answer: c d) It includes kernel rights such as read.

3) What is reaquisition scheme to revoke capability ? Answer: a & c


a) When a process’s capability is revoked then it wont be
able to reacquire it. 9) What is the problem of mutually suspicious subsystem ?
b) Pointers are maintained for each object which can be (Choose two)
used to revoke a) Service program can steal users data
c) Indirect pointing is done to revoke object’s capabilities b) Service program can malfunction and retain some rights
d) Master key can be used compare and revoke. of data provided by user.
c) Calling program can get access to restricted portion
Answer: a from service program
d) Calling program gets unrestricted access
4) What is false regarding Back-Pointers scheme to revoke
capability ? Answer: b
a) List of pointers is maintained with each object. Explanation: Both calling program and service program
b) When revocation is required these pointers are followed are vulnerable to access each others private data/rights.
c) This scheme is not adopted in MULTICS system. 10) What are characteristics of Cambridge CAP system as
d) These point to all capabilities associated with that compared to Hydra system ? (Choose two)
object. a) It is simpler than hydra system
b) It is more powerful than hydra system.
Answer: c c) It is less powerful than hydra system.
d) It is not as secure as Hydra system.
5) What is true about Indirection to revoke capability ?
(Choose two)
a) Capabilities point indirectly to the objects Answer: a & c
b) Each capability has a unique entry in global
c) Table entries cannot be reused for other capabilities 11) What are two capabilities defined in CAP system ?
d) This system was adopted in MULTICS system. a) data capability
b) address capability
c) hardware capability
Answer: a & b d) software capability

6) How can Keys be defined or replaced ? Answer: a & d


a) create [keyname] [bits] b) set-key
c) Key
d) MAKE [Key Name] Distributed Operating System
Answer: b distributed Operating System.
1. In distributed system each processor has its own
7) What are characteristics of Hydra system ? (Choose a) local memory
two) b) clock
a) It consist of known access rights and interpreted by the c) both (a) and (b)
system. d) none of the mentioned
b) A user can of protection system can declare other rights
c) Hydra system is not flexible Answer:c
d) Hydra doesn’t provide rights amplification
2. If one site fails in distributed system
Answer: a & b a) the remaining sites can continue operating
b) all the sites will stop working
8) What are characteristics of rights amplification in Hydra c) directly connected sites will stop working
? (Choose two) d) none of the mentioned
a) This scheme allows a procedure to be certified as
trustworthy. Answer:a
b) Amplification of rights cannot be stated explicitly in
declaration. 3. Network operating system runs on
c) It may include auxiliary rights. a) server
b) every system in the network
88
c) both (a) and (b)
d) none of the mentioned
Answer:a
Answer:a
10. Internet provides _______ for remote login.
4. Which technique is based on compile-time program a) telnet
transformation for accessing remote data in a distributed- b) http
memory parallel system. c) ftp
a) cache coherence scheme d) RPC
b) computation migration
c) remote procedure call Answer:a
d) message passing

Answer:b Distributed Operating System - Types & Resource


Sharing -
5. Logical extension of computation migration is “Distributed Operating System – Types & Resource
a) process migration Sharing”
b) system migration 1) What is not true about distributed system ?
c) thread migration a) It is a collection of processor
d) data migration b) All processors are synchronized
c) They do not share memory
d) None of these
Answer:a
Answer : b
6. Processes on the remote systems are identified by
a) host ID 2) What are characteristics of processor in distributed
b) host name and identifier system ?
c) identifier a) They vary in size and function
d) process ID b) They are same in size and function
c) They are manufactured with single purpose
Answer:b d) They are real-time devices

7. Which routing technique is used in distributed system? Answer : a


a) fixed routing
b) virtual routing 3) What are characteristics of distributed file system ?
c) dynamic routing (Choose two)
d) all of the mentioned a) Its users,servers and storage devices are dispersed
b) Service activity is carried out across the network
Answer:d c) They have single centralized data repository
d) There are multiple dependent storage devices
8. In distributed systems, link and site failure is detected
by Answer : a & b
a) polling
b) handshaking 4) What is not a major reason for building distributed
c) token passing systems ?
d) none of the mentioned a) Resource sharing
b) Computation speedup
Answer:b c) Reliability
d) Simplicity
9. The capability of a system to adapt the increased service
load is called Answer : d
a) scalability
b) tolerance 5) What are two types of distributed operating system ?
c) capacity (Choose two)
d) none of the mentioned a) Network Operating system
b) Zone based Operating system
89
c) Level based Operating system Answer : c
d) Distributed Operating system

Distributed Operating System - Network Structure &


Answer : a & d Topology -
“Distributed Operating System – Network Structure &
6) What are characteristic of Network Operating Systems ? Topology”
(Choose two) 1) What are parts of network structure ? (Choose three)
a) Users are aware of multiplicity of machines a) Workstation
b) They are transparent b) Gateway
c) They are simple to use c) Laptop
d) They are not transparent d) Mouse

Answer : a & d Answer : a,b & c

7) How are access to resources of various machines is 2) What are valid network topology ? (Choose three)
done ? (Choose two) a) Multiaccess bus
a) Remote logging using ssh or telnet b) ring
b) Remote Desktop c) star
c) FTP is not used d) mesh
d) Zone are configured for automatic access
Answer : a,b & c
Answer : a & b
3) What are sites in network topology compared ? (Choose
8) What are characteristics of Distributed Operating three)
system ? (Choose two) a) Basic cost
a) Users are not aware of multiplicity of machines b) Communication cost
b) Access is done like local resources c) Flexibility
c) Users are aware of multiplicity of machines d) Reliability
d) They have multiple zones to access files
Answer : a,b & d
Answer : a & b
4) Which design features of a communication network are
9) What are characteristics of data migration ? important ? (Choose three)
a) transfer data by entire file or immediate portion required a) Naming and name resolution
b) transfer the computation rather than the data b) Routing strategies
c) execute an entire process or parts of it at different sites c) Connection strategies
d) None of these d) Minimum number of devices

Answer : a
Answer : a,b & c
10) What are characteristics of computation migration ?
a) transfer data by entire file or immediate portion required 5) What are characteristics of Naming and Name
b) transfer the computation rather than the data resolution ? (Choose two)
c) execute an entire process or parts of it at different sites a) Name systems in the network
d) None of these b) address messages with the process-id
c) virtual circuit
d) message switching
Answer : b
Answer : a & b
11) What are characteristics of process migration ?
a) transfer data by entire file or immediate portion required 6) What are routing strategies used in distributed systems ?
b) transfer the computation rather than the data (Choose three)
c) execute an entire process or parts of it at different sites a) Fixed routing
d) None of these b) Token routing
c) Virtual circuit
90
d) Dynamic routing a) Physical
b) Data link
Answer : a,c & d c) Network
d) Transport
7) What are connection strategies used in distributed
systems ? (Choose three) Answer : a
a) Circuit switching
b) Message switching 4) Header are ___ when data packet moves from upper to
c) Token switching the lower layers ?
d) Packet switching a) Modified
b) removed
Answer : a,b & d c) added
d) None of these
8) How is are collisions avoided in network ? (Choose
three)
a) Carrier sense with multiple access (CSMA); collision Answer : c
detection (CD)
b) Carrier sense multiple access with collision avoidance 5) Which layer lies between transport layer and data link
c) Token Passing layer ?
d) Message slots a) Physical
b) Network
c) Application
Answer : a,b & d d) Session

9) What is common problem found in distributed system ? Answer : b


a) Process Synchronization
b) Communication synchronization 6) Which of the following is an application layer service ?
c) Deadlock problem a) Mail service
d) Power failure b) File transfer
c) Remote access
Answer : c d) All of these

Answer : d
Distributed Operating System - Robustness of
Distributed Systems - 7) What are different ways distributed may suffer ?
“Distributed Operating System – Robustness of (Choose three)
Distributed Systems” a) Failure of a link
1) How many layers does Internet model ISO consists of ? b) Failure of a site
a) Three c) Loss of message
b) Five d) Failure if power
c) Seven
d) Eight Answer : a,b & c

Answer : c 8) What are design issues in distributed system structure ?


(Choose three)
2) Which layer is responsible for The process-to-process a) Scaleability
delivery ? b) Fault-tolerance
a) Network c) Clustering
b) Transport d) Upgradation
c) Application
d) Physical Answer : a,b & c

Answer : b 9) In which OSI layer encryption and decryption happens ?


a) Application
3) Which layer is the layer closest to the transmission b) Presentation
medium ? c) Transport
91
d) Data Link 5) What are the major components of file system ?
(Choose three)
a) Directory service
Answer : b b) Authorization service
c) Shadow service
10) What are important step followed when recovery from d) System service
failure happens ? (Choose two)
a) Post repairing integration with main system should Answer : a,b & d
happen smoothly and gracefully
b) Upon link failure both parties at end must me notified 6) What are the different ways mounting of file system ?
c) Fault recovery system must me adjusted (Choose three)
d) Failures are logged systematically a) Boot mounting
b) root mounting
Answer : a & b c) explicit mounting
d) auto mounting

Distributed File System - 1 - Answer : a,c & d


“Distributed File System”
1) What are the different ways in which clients and servers 7) What is the advantage of caching in remote file access ?
are dispersed across machines ? (Choose Two) a) Reduced network traffic by retaining recently accessed
a) Servers may run on dedicated machines disk blocks
b) Servers and clients can be on same machines b) Faster network access.
c) Distribution cannot be interposed between a OS and the c) Copies of data creates backup automatically
file system d) None of these
d) OS cannot be distributed with the file system a part of
that distribution Answer : a

Answer : a & b 8) What is networked virtual memory ?


a) Caching
2) What are the characteristics of a DFS ? (Choose Two) b) Segmentation
a) login transparency and access transparency c) RAM disk
b) Files need not contain information about their physical d) None of these
location
c) No Multiplicity of users Answer : a
d) No Multiplicity if files
9) What are examples of state information ? (Choose
Answer : a & b three)
a) opened files and their clients
3) What is not a characteristic of a DFS ? (Choose three) b) file descriptors and file handles
a) Fault tolerance c) current file position pointers
b) Scaleability d) current list of total users
c) Heterogeneity of the system
d) Upgradation
Answer : a,b & c
Answer : a,b & c
10) What are examples of state information ? (Choose
4) What are the different ways file accesses take place ? three)
(Choose three) a) Mounting information
a) sequential access b) Description of HDD space
b) direct access c) Session keys
c) random d) Lock status
d) indexed sequential access
Answer : a,c & d

Answer : a,b & d

92
Operating System Aptitude Test Questions | Answer : a,b & c
Sanfoundry
This set of 1000+ Operating System Aptitude Test 7) What are the three popular semantic modes ? (Choose
Questions focuses on “Distributed File System” three)
1) What is a stateless file server ? a) Unix semantics
a) It keeps tracks of states of different objects b) Transaction semantics
b) It maintains internally no state information at all. c) Coherent semantics
c) It maintains some information in them d) Session semantics
d) None of these
Answer : a,b & d
Answer : b
8) What are the characteristics of Unix semantics ?
2) What are the characteristics of stateless server ? (Choose three)
(Choose two) a) Easy to implement in a single processor system
a) Easier to implement b) Data cached on a per process basis using write through
b) They are fault-tolerant upon client or server failures case control
c) They store all information file server c) Write-back enhances access performance
d) They are redundant to keep data safe d) Cache must not be write-invalidate

Answer : a & b Answer : a,b & c

3) Implementation of a stateless file server must address ? 9) What are the characteristics of transaction semantics ?
(Choose three) (Choose two)
a) Idempotency requirement a) suitable for applications that are not concerned about
b) Encryption of keys coherence of data
c) File locking mechanism b) The users of this model are interested in the atomicity
d) Cache consistency property for their transaction
c) Easy to implement in a single processor system
Answer : a,c & d d) Write-back enhances access performance

4) What are the advantages of file replication ? (Choose


two) Answer : a & b
a) Improves availability
b) Improves performance 10) What are the characteristics of session semantics ?
c) They are consistent (Choose three)
d) Improves speed a) Each client obtains a working copy from the server
b) When file is closed, the modified file is copied to the
file server
Answer : a & b c) the burden of coordinating file sharing is ignored by the
system
5) What are characteristic of NFS protocol ? (Choose d) Easy to implement in a single processor system
three)
a) Search for file withing directory Answer : a,b & c
b) Read a set of directory entries
c) Manipulate links and directories
d) Cannot read/write file attributes Distributed File System
distributed file system – 3.
Answer : a,b & c 1. The file once created can not be changed is called
a) immutable file
6) What is coherency of replicated data ? (Choose three) b) mutex file
a) All replicas are identical at all times c) mutable file
b) Replicas are perceived as identical only at some points d) none of the mentioned
in time
c) Users always read the most recent data in the replicas Answer:a
d) Write operations are not performed immediately

93
2. ______ of the distributed file system are dispersed b) stateful file service
among various machines of distributed system. c) both (a) and (b)
a) Clients d) none of the mentioned
b) Servers
c) Storage devices Answer:a
d) all of the mentioned
9. In distributed file system, file name does not reveal the
Answer:d file’s
a) local name
3. _______ is not possible in distributed file system. b) physical storage location
a) File replication c) both (a) and (b)
b) Migration d) none of the mentioned
c) Client interface
d) Remote access
Answer:b
Answer:b
10. Which one of the following is a distributed file
4. Which one of the following hides the location where in system?
the network the file is stored? a) andrew file system
a) transparent distributed file system b) network file system
b) hidden distributed file system c) novel network
c) escaped distribution file system d) all of the mentioned
d) spy distributed file system
Answer:d
Answer:a

5. In distributed file system, when a file’s physical storage Distributed Coordination -


location changes “Distributed Coordination”
a) file name need to be changed 1) What are the characteristics of tightly coupled system ?
b) file name need not to be changed (Choose three)
c) file’s host name need to be changed a) Same clock, usually shared memory
d) file’s local name need to be changed b) Communication is via this shared memory
c) Multiprocessors
d) Different clock
Answer:b
Answer : a,b & c
6. In distributed file system, _______ is mapping between
logical and physical objects. 2) What are the characteristics of tightly coupled system ?
a) client interfacing (Choose three)
b) naming a) Different clock
c) migration b) Use communication links
d) hetrogeneity c) Same clock
d) Distributed systems
Answer:b
Answer : b,c & d
7. In distributed file system, a file is uniquely identified by
a) host name 3) What are the characteristics of mutual exclusion using
b) local name centralized approach ? (Choose three)
c) the combination of host name and local name a) One processor as coordinator which handles all requests
d) none of the mentioned b) It requires request,reply and release per critical section
entry
Answer:c c) The method is free from starvation
d) When responses are received from all processes, then
8. There is no need to establish and terminate a connection process can enter its Critical Section
through open and close operation in
a) stateless file service
94
Answer : a,b & c a) Bottleneck
b) Slow response
4) What are the characteristics of fully distributed c) Vulnerability
approach ? (Choose two) d) One request per second
a) When responses are received from all processes, then
process can enter its Critical Section Answer : a & c
b) When process exits its critical section, the process sends
reply messages to all its deferred requests. 10) What are the disadvantages of majority protocol ?
c) It requires request,reply and release per critical section (Choose two)
entry a) Complicated implementation
d) One processor as coordinator which handles all requests b) Deadlock can occur easily
c) Bottleneck
Answer : a & b d) Vulnerability

5) What are the advantages of token(with rings) passing


approach ? (Choose three) Answer : a & b
a) One processor as coordinator which handles all requests
b) No starvation if the ring is unidirectional 11) What are the two parts of global unique identifier ?
c) There are many messages passed per section entered if (Choose two)
few users want to get in section a) Local unique time stamp
d) One processor as coordinator which handles all requests b) Remote time stamp
e) Only one message/entry if everyone wants to get in c) Site identifier
d) Clock number

Answer : a,b & d Answer : a & c

6) What is the characteristics of atomicity ? 12) Which are the two complementary deadlock-
a) All operations associated are executed to completion or prevention schemes using time stamps ? (Choose two)
none are performed a) The wait-die scheme
b) One processor as coordinator which handles all requests b) The wait-n-watch scheme
c) When responses are received from all processes, then c) The wound-wait scheme
process can enter its Critical Section d) The wait-wound scheme
d) Use communication links
Answer : a & c
Answer : a

7) What things are transaction coordinator is responsible Distributed Synchronization


for ? (Choose three) distributed synchronisation.
a) Starting the execution of the transaction 1. In distributed systems, a logical clock is associated with
b) Breaking transaction into a number of subtransactions a) each instruction
c) Coordinating the termination of the transaction b) each process
d) Syncronization of the parties c) each register
d) none of the mentioned
Answer : a,b & c
Answer:b
8) Single coordinator approach has the following
advantages : (Choose two) 2. If timestamps of two events are same, then the events
a) Simple implementation are
b) Simple deadlock handling a) concurrent
c) Speed of operation b) non-concurrent
d) No bottleneck c) monotonic
d) non-monotonic
Answer : a & b
Answer:a
9) Single coordinator approach has the following
disadvantages : (Choose two)
95
3. If a process is executing in its critical section c) priority of the processes is not required
a) any other process can also execute in its critical section d) none of the mentioned
b) no other process can execute in its critical section
c) one more process can execute in its critical section
d) none of the mentioned Answer:a

Answer:b 10. According to the ring algorithm, links between


processes are
4. A process can enter into its critical section a) bidirectional
a) anytime b) unidirectional
b) when it recieves a reply message from its parent process c) both (a) and (b)
c) when it recieves a reply message from all other d) none of the mentioned
processes in the system
d) none of the mentioned Answer:b

Answer:c

5. For proper synchronization in distributed systems


a) prevention from the deadlock is must
b) prevention from the starvation is must
c) both (a) and (b)
d) none of the mentioned

Answer:c

6. In the token passing approach of distributed systems,


processes are organized in a ring structure
a) logically
b) physically
c) both (a) and (b)
d) none of the mentioned

Answer:a

7. In distributed systems, transaction coordinator


a) starts the execution of transaction
b) breaks the transaction into number of sub transactions
c) coordinates the termination of the transaction
d) all of the mentioned

Answer:d

8. In case of failure, a new transaction coordinator can be


elected by
a) bully algorithm
b) ring algorithm
c) both (a) and (b)
d) none of the mentioned

Answer:c

9. In distributed systems, election algorithms assumes that


a) a unique priority number is associated with each active
process in system
b) there is no priority number associated with any process
96

You might also like