Sanfoundry OS
Sanfoundry OS
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
Answer: a Answer: c
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
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
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
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: b Answer: a
8
Answer: c d) throughput
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
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
11
d) None of these Answer: b
“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
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
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
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
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: c Answer: d
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
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
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
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: 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
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 : 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: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
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
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
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
Answer : a Answer : b
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
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: b Answer: c
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
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
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: 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
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
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
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
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
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: d Answer:a
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
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
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
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
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: 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
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: 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
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
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
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
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
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
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
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
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
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
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
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 : 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 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 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
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
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
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 : 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
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: 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.
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
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
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
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
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
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
Answer:c
Answer:c
Answer:a
Answer:d
Answer:c