CS8493 Operating Systems MCQ
CS8493 Operating Systems MCQ
Answer: a
Explanation: The control unit is referred to
as the central nervous system because it
selects and interprets the instructions and
coordinates execution.
M
b) Memory Buffer Routine
CS8493 Operating c) Main Buffer Routine
d) Memory Buffer Register
O
Systems Answer: d
C
Explanation: The binary subtraction 0 – 1
gives the result 1.
T.
CSE - Fourth A borrow of 1 is although generated and is
removed from the next higher column.
Semster
O
4. In the instruction ADD A, B, the answer
Regulations 2017 SP
gets stored in ___________
a) B
b) A
G
c) Buffer
d) C
LO
Answer: b
UNIT I OPERATING Explanation: In any instruction of the form
ADD A, B; the answer gets stored in the A
SYSTEM OVERVIEW
.B
2. Control Unit acts as the central nervous 6. Which of the following holds the last
system of the computer. instruction fetched?
a) True a) PC
b) False b) MAR
M
Answer: c
7. The portion of the processor which Explanation: In the hardwired control unit,
O
contains the hardware required to fetch the the delay element method uses D-flip flop
operations is _______ which causes a delay. Since, in the delay
C
a) Datapath element method, there must be a finite time
b) Processor gap between the 2 steps.
T.
c) Control
d) Output unit
1. What is the high speed memory between
O
Answer: a the main memory and the CPU called?
Explanation: The datapath contains the a) Register Memory
hardware required to fetch the operations.
The control tells the data path what needs to
be done.
SP
b) Cache Memory
c) Storage Memory
d) Virtual Memory
G
8. Causing the CPU to step through a series of Answer: b
LO
Answer: c a) True
Explanation: Sequencing is the process of b) False
causing the CPU to step through a series of
micro operations. Execution causes the Answer: b
-R
9. The functions of execution and sequencing the DRAM chips. SRAM stands for Static
are performed by using ______________ RAM. It is faster and is expensive.
a) Input Signals
b) Output Signals 3. Whenever the data is found in the cache
C
M
c) Least Recently Used 8. In ____________ mapping, the data can be
d) Low Required Usage mapped anywhere in the Cache Memory.
O
a) Associative
Answer: c b) Direct
C
Explanation: LRU stands for Least Recently c) Set Associative
Used. LRU is a type of replacement policy d) Indirect
T.
used by the cache memory.
Answer: a
5. When the data at a location in cache is Explanation: This happens in the associative
O
different from the data located in the main mapping. In this case, a block of data from
memory, the cache is called _____________ the main memory can be mapped anywhere in
a) Unique
b) Inconsistent
c) Variable
SP
the cache memory.
Answer: b b) 11
Explanation: The cache is said to be c) 9
inconsistent. Inconsistency must be avoided d) 23
as it leads to serious data bugs.
.B
Answer: a
6. Which of the following is not a write Explanation: There is only 1 sign bit in all
17
1. Computer has a built-in system clock that second is the clock speed. It is generally
emits millions of regularly spaced electric measured in gigahertz(109 cycles/sec) or
pulses per _____ called clock cycles. megahertz (106 cycles/sec).
a) second
b) millisecond 5. CISC stands for ____________
c) microsecond a) Complex Information Sensed CPU
d) minute b) Complex Instruction Set Computer
c) Complex Intelligence Sensed CPU
Answer: a
M
d) Complex Instruction Set CPU
Explanation: The regularly spaced electric
pulses per second are referred to as the clock Answer: b
O
cycles. All the jobs performed by the Explanation: CISC is a large instruction set
processor are on the basis of clock cycles. computer. It has variable length instructions.
C
It also has variety of addressing modes.
2. It takes one clock cycle to perform a basic
T.
operation. 6. Which of the following processor has a
a) True fixed length of instructions?
b) False
O
a) CISC
b) RISC
Answer: a
Explanation: It takes exactly one clock cycle
to perform a basic operation, such as moving
a byte of memory from a location to another
SP
c) EPIC
d) Multi-core
Answer: b
G
location in the computer. Explanation: The RISC which stands for
Reduced Instruction set computer has a fixed
LO
a) RISC
Answer: a
b) EPIC
Explanation: Normally, several clock cycles
c) CISC
are required to fetch, execute and decode a
-R
d) Multi-core
particular program.
Installation of a device is done by the system Answer: c
SE
M
closest to the CPU. Registers, Cache and the
9. MAR stands for ___________ main memory are the means of onboard
O
a) Memory address register storage in the computer system.
b) Main address register
C
c) Main accessible register 3. Which of the following is the fastest means
d) Memory accessible register of memory access for CPU?
T.
a) Registers
Answer: a b) Cache
Explanation: The MAR stands for memory c) Main memory
O
address register. It holds the address of the d) Virtual Memory
active memory location.
a) Memory
b) ALU 4. The memory implemented using the
c) CU semiconductor chips is _________
d) Processor a) Cache
.B
b) Main
Answer: d c) Secondary
17
1. Any electronic holding place where data It mainly consists of RAM and small amount
can be stored and retrieved later whenever of ROM.
required is ____________
a) memory 5. Size of the ________ memory mainly
C
M
the address bus? Answer: a
a) Secondary memory Explanation: The MAR stands for memory
O
b) Main memory address register. It holds the address of the
c) Onboard memory active memory location.
C
d) Cache memory
10. If M denotes the number of memory
T.
Answer: a locations and N denotes the word size, then
Explanation: The secondary memory is an expression that denotes the storage
independent of the address bus. It increases capacity is ______________
O
the storage space. It is implemented in the a) M*N
form of magnetic storage devices. b) M+N
d) Magnetic
Answer: c
17
Explanation: The tertiary storage is the 1. Computer has a built-in system clock that
correct option. It is used in the realms of emits millions of regularly spaced electric
enterprise storage and scientific computing on pulses per _____ called clock cycles.
a) second
-R
d) minute
8. What is the location of the internal
registers of CPU? Answer: a
a) Internal Explanation: The regularly spaced electric
C
a) True a) CISC
b) False b) RISC
c) EPIC
Answer: a d) Multi-core
Explanation: It takes exactly one clock cycle
to perform a basic operation, such as moving Answer: b
a byte of memory from a location to another Explanation: The RISC which stands for
location in the computer. Reduced Instruction set computer has a fixed
length of instructions. It has a small
M
3. The operation that does not involves clock instruction set. Also has reduced references to
cycles is ____________ memory to retrieve operands.
O
a) Installation of a device
b) Execute 7. Processor which is complex and expensive
C
c) Fetch to produce _________
d) Decode a) RISC
T.
b) EPIC
Answer: a c) CISC
Explanation: Normally, several clock cycles d) multi-core
O
are required to fetch, execute and decode a
particular program. Installation of a device is Answer: c
done by the system on its own.
Answer: a b) Multi-core
Explanation: The number of clock cycles per c) RISC
17
M
c) 8 bits
d) 32 bits 4. What does USB stand for?
O
a) Universal Signal Board
Answer: c b) Universal Signal Bus
C
Explanation: The word length which is the c) Universal Serial Bus
size of a word is generally 8 bits in a personal d) Universal Serial Board
T.
computer. Word Size is generally the number
of bits that can be processed in one go by the Answer: c
CPU. Explanation: USB stands for universal serial
O
bus. A flash drive simply plugs in the USB
port of a computer.
1. Winchester disks are a type of _______
a) optical disks
b) magnetic disks
SP
5. A device similar to a flash drive
______________
G
c) compact disks a) Memory card
d) magnetic drives b) Compact drive
LO
c) Compact disk
Answer: b d) Memory disk
Explanation: The regularly spaced electric
pulses per second are referred to as the clock Answer: a
.B
cycles. All the jobs performed by the Explanation: Memory card serves a similar
processor are on the basis of clock cycles. purpose as that of a flash drive. It is in the
17
single hard disk platter encased in a plastic Explanation: RAID is Redundant array of
cartidge. independent disks. It is an array of disks
which can store data bits.
3. A plug and play storage device that simply
plugs in the port of a computer is __________ 7. A set of hard disk drives with a controller
a) Flash drive mounted in a single box, forming a single
b) Compact disk large storage unit is ____________
M
performance, enhanced storage capacity and stored in ROM.
reliability. a) Synchronous Software
O
b) Package Software
8. The process in which a file is partitioned c) Firmware
C
into smaller parts and different parts are d) Middleware
stored in different disks is ____________
T.
a) RAID Answer: c
b) Mirroring Explanation: Software refers to a collection
c) Stripping of programs. Firm wares act as a link between
O
d) RAID classification the hardware and the system. It is stored in
read only memory.
Answer: c
Explanation: Enhanced reliability is achieved
by using techniques like mirroring and
SP
2. Middleware has enabled the production of
various types of smart machines having
G
stripping in case of disk arrays. Stripping is microprocessor chips with embedded
the division of a large file into smaller parts software.
LO
Answer: c application.
Explanation: Disk packs use a number of a) Middleware
SE
disk? Answer: a
a) Floppy Explanation: A middleware acts as a glue
b) Winchester between client and server parts of application.
c) Zip It provides programming abstraction which
d) FLASH means hiding all the relevant details.
M
sending and receiving messages across Explanation: It is called the embedded
distributed systems. middleware since it activates the
O
communication link between the built-in
5. Storage of firmware is ___________ applications and the real time operating
C
a) Cache Memory system.
b) RAM
T.
c) External 9. What is the other name for object
d) ROM middleware?
a) Object request interface
O
Answer: d b) Object enabled interface
Explanation: Firmware is stored in ROM c) Object Request broker
which is the read only memory. Firmware
basically acts as a link between the hardware
and the system.
SP
d) Object enabled broker
Answer: c
G
Explanation: It is also called as object
6. DNS stands for? request broker. It gives the applications
LO
c) Message Oriented
d) DB
7. A software that lies between the OS and
SE
M
b) interrupt
c) scheduler
d) none of the mentioned Answer: a
O
Explanation: None.
Answer: a
C
Explanation: None. 6. In priority scheduling algorithm, when a
process arrives at the ready queue, its priority
T.
2. The processes that are residing in main is compared with the priority of
memory and are ready and waiting to execute ____________
a) all process
O
are kept on a list called _____________
a) job queue b) currently running process
c) parent process
b) ready queue
c) execution queue
d) process queue
SP
d) init process
Answer: b
G
Answer: b Explanation: None.
Explanation: None.
LO
as ____________
a) waiting time c) priority scheduling algorithm
b) turnaround time d) multilevel queue scheduling algorithm
17
c) response time
d) throughput Answer: b
Explanation: None.
-R
Answer: b
Explanation: None. 8. Process are classified into different groups
in ____________
SE
M
scheduled by the kernel?
a) kernel level thread Answer: c
O
b) user level thread Explanation: None.
c) process
C
d) none of the mentioned 5. A process is selected from the ______
queue by the ________ scheduler, to be
T.
Answer: b executed.
Explanation: User level threads are managed a) blocked, short term
by thread library and the kernel is unaware of b) wait, long term
O
them. c) ready, short term
d) ready, long term
M
queues
Answer: c b) the total time spent in the ready queue
O
Explanation: None. c) the total time spent in the running queue
d) the total time from the completion till the
C
9. Scheduling is done so as to ____________ submission of a process
a) increase CPU utilization
T.
b) decrease CPU utilization Answer: b
c) keep the CPU more idle Explanation: None.
d) none of the mentioned
O
14. Scheduling is done so as to
Answer: a ____________
Explanation: None.
M
c) using extremely small time slices increases logically runnable to be temporarily
performance suspended is called ____________
O
d) using very small time slices converts it into a) Non preemptive scheduling
Shortest Job First algorithm b) Preemptive scheduling
C
c) Shortest job first
Answer: a d) First come First served
T.
Explanation: All the processes will be able to
get completed. Answer: b
Explanation: None.
O
3. The portion of the process scheduler in an
operating system that dispatches processes is 7. What is Scheduling?
concerned with ____________
a) assigning ready processes to CPU
b) assigning ready processes to waiting queue
SP
a) allowing a job to use the processor
b) making proper use of processor
c) all of the mentioned
G
c) assigning running processes to blocked d) none of the mentioned
queue
LO
b) tQ = 40ms
Answer: a c) tQ = 45ms
Explanation: Large computers are d) tQ = 50ms
overloaded with a greater number of
C
processes. Answer: a
Explanation: None.
5. What is FIFO algorithm?
a) first executes the job that came in last in 9. Orders are processed in the sequence they
the queue arrive if _______ rule sequences the jobs.
b) first executes the job that came in first in a) earliest due date
the queue b) slack time remaining
M
b) Shortest Job First 1. Which is the most optimal scheduling
c) Earliest Deadline First algorithm?
O
d) Longest Job First a) FCFS – First come First served
b) SJF – Shortest Job First
C
Answer: b c) RR – Round Robin
Explanation: None. d) None of the mentioned
T.
11. Under multiprogramming, turnaround Answer: b
time for short jobs is usually ________ and Explanation: None.
O
that for long jobs is slightly ___________
a) Lengthened; Shortened 2. The real difficulty with SJF in short term
b) Shortened; Lengthened
c) Shortened; Shortened
d) Shortened; Unchanged
SP
scheduling is ____________
a) it is too good an algorithm
b) knowing the length of the next CPU
G
request
Answer: b c) it is too complex to understand
LO
Answer: b
a) I only
Explanation: In a time sharing system, each
b) I and III only
c) II and III only user needs to get a share of the CPU at
regular intervals.
C
d) I, II and III
Answer: c
P2 8 Explanation: None.
P3 7
8. What is ‘Aging’?
P4 3 a) keeping track of cache contents
b) keeping track of what pages are currently
Assuming the above process being scheduled residing in memory
with the SJF scheduling algorithm. c) keeping track of how many times a given
a) The waiting time for process P1 is 3ms page is referenced
M
b) The waiting time for process P1 is 0ms d) increasing the priority of jobs to ensure
c) The waiting time for process P1 is 16ms termination in a finite time
O
d) The waiting time for process P1 is 9ms
Answer: d
C
Answer: a Explanation: None.
Explanation: None.
T.
9. A solution to the problem of indefinite
5. Preemptive Shortest Job First scheduling is blockage of low – priority processes is
sometimes called ____________ ____________
O
a) Fast SJF scheduling a) Starvation
b) EDF scheduling – Earliest Deadline First b) Wait queue
c) HRRN scheduling – Highest Response
Ratio Next
d) SRTN scheduling – Shortest Remaining
SP
c) Ready queue
d) Aging
G
Time Next Answer: d
Explanation: None.
LO
Answer: d
Explanation: None. 10. Which of the following statements are
true? (GATE 2010)
6. An SJF algorithm is simply a priority
.B
algorithm where the priority is ____________ i) Shortest remaining time first scheduli
ng may cause starvation
a) the predicted next CPU burst
17
b) the inverse of the predicted next CPU burst ii) Preemptive scheduling may cause starv
c) the current CPU burst ation
d) anything the user wants
iii) Round robin is better than FCFS in t
-R
M
a) collection of programs that manages resources, allowing multiple processes to use
hardware resources the resources and provide services to various
O
b) system service provider to the application processes. Kernel modules can be loaded and
programs unloaded in run-time i.e. in running OS.
C
c) interface between the hardware and
application programs 4. Which one of the following error will be
T.
d) all of the mentioned handle by the operating system?
a) power failure
Answer: d b) lack of paper in printer
O
Explanation: An Operating System acts as an c) connection failure in the network
intermediary between user/user d) all of the mentioned
applications/application programs and
hardware. It is a program that manages
hardware resources. It provides services to
SP
Answer: d
Explanation: All the mentioned errors are
G
application programs. handled by OS. The OS is continuously
monitoring all of its resources. Also, the OS
LO
2. To access the services of operating system, is constantly detecting and correcting errors.
the interface is provided by the ___________
a) System calls 5. What is the main function of the command
b) API interpreter?
.B
Read, Write are some of most prominently Explanation: The main function of command
used system calls. interpreter is to get and execute the next user-
specified command. Command Interpreter
3. Which one of the following is not true? checks for valid command and then runs that
C
a) kernel is the program that constitutes the command else it will throw an error.
central core of the operating system
b) kernel is the first part of operating system 6. In Operating Systems, which of the
to load into memory during booting following is/are CPU scheduling algorithms?
c) kernel is made of various modules which a) Round Robin
can not be loaded in running operating system b) Shortest Job First
c) Priority b) QNX
d) All of the mentioned c) RTLinux
d) Palm OS
Answer: d
Explanation: In Operating Systems, CPU Answer: d
scheduling algorithms are: Explanation: VxWorks, QNX & RTLinux
i) First Come First Served scheduling are real-time operating systems. Palm OS is a
ii) Shortest Job First scheduling mobile operating system. Palm OS is
iii) Priority scheduling developed for Personal Digital Assistants
M
iv) Round Robin scheduling (PDAs).
v) Multilevel Queue scheduling
O
vi) Multilevel Feedback Queue scheduling 10. The OS X has ____________
All of these scheduling algorithms have their a) monolithic kernel
C
own advantages and disadvantages. b) hybrid kernel
c) microkernel
T.
7. If a process fails, most operating system d) monolithic kernel with modules
write the error information to a ______
a) log file Answer: b
O
b) another running process Explanation: OS X has a hybrid kernel.
c) new file Hybrid kernel is a combination of two
d) none of the mentioned
Answer: a
SP
different kernels. OS X is developed by
Apple and originally it is known as Mac OS
X.
G
Explanation: If a process fails, most
operating systems write the error information
LO
to a log file. Log file is examined by the 1. The systems which allow only one process
debugger, to find out what is the actual cause execution at a time, are called __________
of that particular problem. Log file is useful a) uniprogramming systems
b) uniprocessing systems
.B
b) DLocate
c) DMap are called multiprogramming systems.
d) DAdd Uniprocessing means only one processor.
SE
contains code, data, stack and heap segments means process has all necessary resources
or sections. Each process also has a list of which are required for execution of that
files which is opened by the process as well process when CPU is allocated. Process is
as all pending alarms, signals and various ready for execution but waiting for the CPU
signal handlers. to be allocated.
3. In Unix, Which system call creates the new 6. What is interprocess communication?
process? a) communication within the process
a) fork b) communication between two process
M
b) create c) communication between two threads of
c) new same process
O
d) none of the mentioned d) none of the mentioned
C
Answer: a Answer: b
Explanation: In UNIX, a new process is Explanation: Interprocess Communication
T.
created by fork() system call. fork() system (IPC) is a communication mechanism that
call returns a process ID which is generally allows processes to communicate with each
the process id of the child process created. other and synchronise their actions without
O
using the same address space. IPC can be
4. A process can be terminated due to achieved using shared memory and message
__________
a) normal exit
b) fatal error
SP
passing.
forever
Answer: d b) each process is terminated
Explanation: A process can be terminated c) all processes are trying to kill each other
normally by completing its task or because of
.B
completes its task without any error then it Explanation: Deadlock is a situation which
exits normally. The process may exit occurs because process A is waiting for one
abnormally because of the occurrence of fatal resource and holds another resource (blocking
-R
error while it is running. The process can be resource). At the same time another process B
killed or terminated forcefully by another demands blocking a resource as it is already
process. held by a process A, process B is waiting
SE
Answer: d Answer: c
Explanation: Process stack contains Function Explanation: Process Control Block (PCB)
parameters, Local variables and Return contains information related to a process such
address. It does not contain the PID of child as Process State, Program Counter, CPU
process. Register, etc. Process Control Block is also
known as Task Control Block. Bootstrap
9. Which system call can be used by a parent program is a program which runs initially
process to determine the termination of child when the system or computer is booted or
process? rebooted.
M
a) wait
b) exit 2. The number of processes completed per
O
c) fork unit time is known as __________
d) get a) Output
C
b) Throughput
Answer: a c) Efficiency
T.
Explanation: wait() system call is used by d) Capacity
the parent process to determine termination of
child process. The parent process uses wait() Answer: b
O
system call and gets the exit status of the Explanation: The number of processes
child process as well as the pid of the child completed per unit time is known as
process which is terminated.
After every instruction is executed, the a) the final activity of the process
Program Counter is incremented by 1 i.e. b) the activity just executed by the process
address of the next instruction to be executed. c) the activity to next be executed by the
SE
Answer: d
C
4. Which of the following is not the state of a c) the number of processes in the I/O queue
process? d) the number of processes in memory
a) New
b) Old Answer: d
c) Waiting Explanation: Multiprogramming means the
d) Running number of processes are in the ready states.
To increase utilization of CPU,
Answer: b Multiprogramming is one of the most
Explanation: There is no process state such important abilities of OS. Generally, a single
M
as old. When a process is created then the process cannot use CPU or I/O at all time,
process is in New state. When the process whenever CPU or I/O is available another
O
gets the CPU for its execution then the process can use it. By doing this CPU
process is in Running state. When the process utilization is increased.
C
is waiting for an external event then the
process is in a Waiting state. 8. A single thread of control allows the
T.
process to perform __________
5. What is a Process Control Block? a) only one task at a time
a) Process type variable b) multiple tasks at a time
O
b) Data Structure c) only two tasks at a time
c) A secondary storage section d) all of the mentioned
d) A Block in memory
Answer: b
SP
Answer: a
Explanation: A single thread of control
G
Explanation: A Process Control Block (PCB) allows the process to perform only one task at
is a data structure. It contains information a time. In the case of multi-core, multiple
LO
related to a process such as Process State, threads can be run simultaneously and can
Program Counter, CPU Register, etc. Process perform multiple tasks at a time.
Control Block is also known as Task Control
9. What is the objective of
.B
Block.
multiprogramming?
6. The entry of all the PCBs of the current a) Have a process running at all time
17
process that is created in OS along with their I/O is available another process can use it.
PIDs. Multiprogramming offers this ability to OS
by keeping multiple programs in a ready
7. What is the degree of multiprogramming? queue.
a) the number of processes executed per unit
time
b) the number of processes in the ready queue
M
queues for processes. PCB is a process Answer: a
control block which contains information Explanation: A long-term scheduler selects
O
related to process. Each process is processes which have to be brought into the
represented by PCB. ready queue. When processes enter the
C
system, they are put in the job queue. Long-
2. When the process issues an I/O request term scheduler selects processes from the job
T.
__________ queue and puts them in the ready queue. It is
a) It is placed in an I/O queue also known as Job Scheduler.
b) It is placed in a waiting queue
O
c) It is placed in the ready queue 5. If all processes I/O bound, the ready queue
d) It is placed in the Job queue will almost always be ______ and the Short
Answer: a
Explanation: When the process issues an I/O
SP
term Scheduler will have a ______ to do.
a) full, little
b) full, lot
G
request it is placed in an I/O queue. I/O is a c) empty, little
resource and it should be used effectively and d) empty, lot
LO
I/O is allocated to any particular process and the ready queue will almost empty and the
after completing I/O operation, I/O access is short-term scheduler will have a little to do.
returned to the OS. I/O bound processes spend more time doing
17
d) Its process control block is never de- next and allocates CPU
allocated c) It selects which process to remove from
memory by swapping
Answer: a d) None of the mentioned
C
swapped in. Swapping helps to free up 10. In a time-sharing operating system, when
memory. the time slot given to a process is completed,
the process goes from the running state to the
7. What is a short-term scheduler? __________
a) It selects which process has to be brought a) Blocked state
into the ready queue b) Ready state
b) It selects which process has to be executed c) Suspended state
next and allocates CPU d) Terminated state
c) It selects which process to remove from
M
memory by swapping Answer: b
d) None of the mentioned Explanation: In a time-sharing operating
O
system, when the time slot given to a process
Answer: b is completed, the process goes from the
C
Explanation: A short-term scheduler selects running state to the Ready State. In a time-
a process which has to be executed next and sharing operating system unit time is defined
T.
allocates CPU. Short-term scheduler selects a for sharing CPU, it is called a time quantum
process from the ready queue. It selects or time slice. If a process takes less than 1
processes frequently.
O
time quantum, then the process itself releases
the CPU.
8. The primary distinction between the short
term scheduler and the long term scheduler is
__________
a) The length of their queues
SP
11. In a multiprogramming environment
__________
a) the processor executes more than one
G
b) The type of processes they schedule process at a time
c) The frequency of their execution b) the programs are developed by more than
LO
Answer: b Answer: c
Explanation: Suppose that a process is in Explanation: Scheduler process does not
“Blocked” state waiting for some I/O service. interrupt a running process. Scheduler process
When the service is completed, it goes to the selects an available process from a pool of
ready state. Process never goes directly to the available processes and allocates CPU to it.
running state from the waiting state. Only
processes which are in ready state go to the
running state whenever CPU allocated by 1. Which process can be affected by other
operating system. processes executing in the system?
M
a) cooperating process
13. The context of a process in the PCB of a b) child process
O
process does not contain __________ c) parent process
a) the value of the CPU registers d) init process
C
b) the process state
c) memory-management information Answer: a
T.
d) context switch time Explanation: None.
O
Explanation: The context of a process in the data concurrently and the outcome of the
PCB of a process does not contain context execution depends on the particular order in
switch time. When switching CPU from one
process to another, the current context of the
process needs to be saved. It includes values
SP
which the access takes place, is called?
a) dynamic condition
b) race condition
G
of the CPU registers, process states, memory- c) essential condition
management information. d) critical condition
LO
between processes?
a) General purpose registers 3. If a process is executing in its critical
b) Translation lookaside buffer section, then no other processes can be
17
Answer: b
Explanation: Translation Look-aside Buffer c) synchronous exclusion
(TLB) need not necessarily be saved on a d) asynchronous exclusion
SE
M
Answer: d
Answer: a Explanation: None.
O
Explanation: None.
10. To enable a process to wait within the
C
6. Mutual exclusion can be provided by the monitor __________
__________ a) a condition variable must be declared as
T.
a) mutex locks condition
b) binary semaphores b) condition variables must be used as
c) both mutex locks and binary semaphores boolean objects
O
d) none of the mentioned c) semaphore must be used
d) all of the mentioned
Answer: c
Explanation: Binary Semaphores are known
as mutex locks.
SP
Answer: a
Explanation: None.
G
7. When high priority task is indirectly
LO
Answer: c
__________ Explanation: None.
a) hardware level
b) software level 2. A parent process calling _____ system call
C
c) both hardware and software level will be suspended until children processes
d) none of the mentioned terminate.
a) wait
Answer: c b) fork
Explanation: None. c) exit
d) exec
M
d) None of the mentioned 8. The child process completes execution, but
the parent keeps executing, then the child
O
Answer: a process is known as __________
Explanation: None. a) Orphan
C
b) Zombie
4. With _____________ only one process can c) Body
T.
execute at a time; meanwhile all other process d) Dead
are waiting for the processor. With
______________ more than one process can Answer: b
O
be running simultaneously each on a different Explanation: None.
processor.
a) Multiprocessing, Multiprogramming
b) Multiprogramming, Uniprocessing
c) Multiprogramming, Multiprocessing
SP
1. What is Inter process communication?
a) allows processes to communicate and
G
d) Uniprogramming, Multiprocessing synchronize their actions when using the
same address space
LO
b) Device Queue
c) Process Identifier Answer: b
d) None of the mentioned Explanation: None.
-R
3. Which of the following two operations are a) there is another process R to handle and
provided by the IPC facility? pass on the messages between P and Q
a) write & delete message b) there is another machine between the two
b) delete & receive message processes to help communication
c) send & delete message c) there is a mailbox to help communication
d) receive & send message between P and Q
d) none of the mentioned
Answer: d
Explanation: None. Answer: c
M
Explanation: None.
4. Messages sent by a process __________
O
a) have to be of a fixed size 8. In the non blocking send __________
b) have to be a variable size a) the sending process keeps sending until the
C
c) can be fixed or variable sized message is received
d) None of the mentioned b) the sending process sends the message and
T.
resumes operation
Answer: c c) the sending process keeps sending until it
Explanation: None. receives a message
O
d) none of the mentioned
5. The link between two processes P and Q to
send and receive messages is called
__________
a) communication link
SP
Answer: b
Explanation: None.
G
b) message-passing link 9. In the Zero capacity queue __________
c) synchronization link a) the queue can store at least one message
LO
c) Exactly N/2 links exist between each pair b) is referred to as a message system with no
of processes(N = max. number of processes buffering
supported by system) c) is referred to as a link
d) Exactly two link exists between each pair d) none of the mentioned
C
of processes
Answer: b
Answer: b Explanation: None.
Explanation: None.
11. Bounded capacity and Unbounded
7. In indirect communication between capacity queues are referred to as
processes P and Q __________ __________
M
1. Concurrent access to shared data may section, then no other process must be
result in ____________ executing in their critical sections
O
a) data consistency b) if a process is executing in its critical
b) data insecurity section, then other processes must be
C
c) data inconsistency executing in their critical sections
d) none of the mentioned c) if a process is executing in its critical
T.
section, then all the resources of the system
Answer: c must be blocked until it finishes execution
Explanation: None. d) none of the mentioned
O
2. A situation where several processes access Answer: a
and manipulate the same data concurrently
and the outcome of the execution depends on
the particular order in which access takes
SP
Explanation: None.
a) program Answer: a
b) critical section Explanation: None.
SE
M
d) each process gets a unique number and the a) CPU cycles wasting locks over critical
one with the lowest number is served next sections of programs
O
b) Locks that avoid time wastage in context
Answer: b switches
C
Explanation: None. c) Locks that work better on multiprocessor
systems
T.
d) All of the mentioned
1. An un-interruptible unit is known as
____________ Answer: d
O
a) single Explanation: None.
b) atomic
c) static
d) none of the mentioned
SP
6. What is the main disadvantage of
spinlocks?
a) they are not sufficient for many process
G
Answer: b b) they require busy waiting
Explanation: None. c) they are unreliable sometimes
LO
b) periodically
c) atomically 7. The wait operation of the semaphore
17
c) hold()
3. Semaphore is a/an _______ to solve the d) wait()
SE
Answer: b
Explanation: None.
Process P2
9. If the semaphore value is negative wait(S2);
____________
a) its magnitude is the number of processes release(S0);
waiting on that semaphore
b) it is invalid How many times will P0 print ‘0’?
c) no operation can be further performed on it a) At least twice
M
until the signal operation is performed on it b) Exactly twice
d) none of the mentioned c) Exactly thrice
O
d) Exactly once
Answer: a
C
Explanation: None. Answer: a
Explanation: None.
T.
10. The code that changes the value of the
semaphore is ____________ 12. Each process Pi, i = 0,1,2,3,……,9 is
a) remainder section code coded as follows.
O
b) non – critical section code
repeat
c) critical section code
d) none of the mentioned
Answer: c
SP
P(mutex)
{Critical Section}
G
Explanation: None.
V(mutex)
LO
c) 3
wait(S0);
d) None of the mentioned
print '0';
SE
Answer: c
release(S1); Explanation: Any one of the 9 processes can
get into critical section after executing
release(S2);
P(mutex) which decrements the mutex value
C
M
{
d) Signaling
w1 = true;
O
Answer: b
while(w2 == true); Explanation: If a thread which had already
C
Critical section locked a mutex, tries to lock the mutex again,
it will enter into the waiting list of that mutex,
T.
w1 = false; which results in a deadlock. It is because no
other thread can unlock the mutex.
}
O
2. What is a semaphore?
Remainder Section
a) is a binary mutex
Process P2 :
SP
b) must be accessed from only one process
c) can be accessed from multiple processes
d) none of the mentioned
G
while(true)
Answer: c
LO
{
Explanation: None.
w2 = true;
3. What are the two kinds of semaphores?
while(w1 == true); a) mutex & counting
.B
} Answer: b
Explanation: None.
-R
Remainder Section
4. What is a mutex?
Here, w1 and w2 have shared variables,
a) is a binary mutex
SE
M
represents Signal. P operation will decrease A1 B1 A2 B2: X = 6
the value by 1 every time and V operation A1 B1 B2 A2: X = 10
O
will increase the value by 1 every time. B1 A1 B2 A2: X = 10
B1 A1 A2 B2: X = 6
C
6. A binary semaphore is a semaphore with B1 B2 A1 A2: X = 12.
integer values ____________
T.
a) 1 8. The program follows to use a shared binary
b) -1 semaphore T.
c) 0.8
O
d) 0.5 Process A
Answer: a
Explanation: None.
SP
int Y;
A1: Y = X*2;
G
7. The following pair of processes share a A2: X = Y;
common variable X.
LO
signal(T);
Process A
int Y; Process B
.B
B1: wait(T);
17
A2: X = Y;
B2: Z = X+1;
Process B
-R
X = Z;
int Z;
T is set to 0 before either process begins
B1: Z = X+1; execution and, as before, X is set to 5.
SE
a) one
execution. As usual, statements within a
process are executed sequentially, but b) two
statements in process A may execute in any c) three
order with respect to statements in process B. d) four
How many different values of X are possible
Answer: a
after both processes finish executing?
Explanation: The semaphore T ensures that
a) two
all the statements from A finish execution 3. In the bounded buffer problem
before B begins. So now there is only one ____________
way in which statements from A and B can be a) there is only one buffer
interleaved: b) there are n buffers ( n being greater than
A1 A2 B1 B2: X = 11. one but finite)
c) there are infinite buffers
9. Semaphores are mostly used to implement d) the buffer size is bounded
____________
a) System calls Answer: b
M
b) IPC mechanisms Explanation: None.
c) System protection
O
d) None of the mentioned 4. To ensure difficulties do not arise in the
readers – writers problem _______ are given
C
Answer: b exclusive access to the shared object.
Explanation: None. a) readers
T.
b) writers
10. Spinlocks are intended to provide c) readers and writers
__________ only. d) none of the mentioned
O
a) Mutual Exclusion
b) Bounded Waiting Answer: b
c) Aging
d) Progress
SP
Explanation: None.
possibility of starvation
the empty and full semaphores that c) eliminates any possibility of any kind of
____________ problem further
a) count the number of empty and full buffers d) none of the mentioned
C
critical section and signal(mutex) afterward. 9. Consider the methods used by processes P1
Suppose a process executes in the following and P2 for accessing their critical sections
manner. whenever needed, as given below. The initial
values of shared boolean variables S1 and S2
signal(mutex); are randomly assigned. (GATE 2010)
..... Method used by P1 :
critical section while(S1==S2);
M
..... Critical section
O
wait(mutex); S1 = S2;
In this situation :
C
a) a deadlock will occur Method used by P2 :
T.
b) processes will starve to enter critical
section while(S1!=S2);
c) several processes maybe executing in their Critical section
O
critical section
d) all of the mentioned S2 = not(S1);
Answer: c
Explanation: None.
SP
Which of the following statements describes
properties achieved?
G
a) Mutual exclusion but not progress
8. All processes share a semaphore variable b) Progress but not mutual exclusion
LO
mutex, initialized to 1. Each process must c) Neither mutual exclusion nor progress
execute wait(mutex) before entering the d) Both mutual exclusion and progress
critical section and signal(mutex) afterward.
Suppose a process executes in the following Answer: d
.B
wait(mutex);
17
wait(mutex); Answer: c
Explanation: None.
a) a deadlock will occur
b) processes will starve to enter critical 2. A monitor is characterized by
C
section ____________
c) several processes maybe executing in their a) a set of programmer defined operators
critical section b) an identifier
d) all of the mentioned c) the number of variables in it
d) all of the mentioned
Answer: a
Explanation: None.
Answer: a Answer: a
Explanation: None. Explanation: None.
M
c) semaphore, semaphore
d) monitor, monitor Answer: c
O
Explanation: None.
Answer: d
C
Explanation: None.
1. A collection of instructions that performs a
T.
4. The monitor construct ensures that single logical function is called
____________ ____________
a) only one process can be active at a time a) transaction
O
within the monitor b) operation
b) n number of processes can be active at a c) function
time within the monitor (n being greater than
1)
c) the queue has only one process in it at a
SP
d) all of the mentioned
Answer: a
G
time Explanation: None.
d) all of the mentioned
LO
Explanation: None.
it was just before the transaction started
6. Which is the process of invoking the wait executing. This restoration is known as
operation? ________ of transaction.
C
M
5. In the write ahead logging a Answer: d
O
_____________ is maintained. Explanation: None.
a) a memory
C
b) a system 9. Consider a transaction T1 that committed
c) a disk prior to checkpoint. The <T1 commits>
T.
d) a log record record appears in the log before the
<checkpoint> record. Any modifications
Answer: d made by T1 must have been written to the
O
Explanation: None. stable storage either with the checkpoint or
prior to it. Thus at recovery time
6. An actual update is not allowed to a data
item ____________
a) before the corresponding log record is
SP
____________
a) There is a need to perform an undo
operation on T1
G
written out to stable storage b) There is a need to perform a redo operation
b) after the corresponding log record is on T1
LO
Answer: c
Answer: a Explanation: None.
17
Explanation: None.
10. Serializable schedules are ones where
7. The undo and redo operations must be ____________
_________ to guarantee correct behaviour,
-R
M
12. The two phase locking protocol consists
of ____________
O
a) growing & shrinking phase 1. What is a reusable resource?
b) shrinking & creation phase a) that can be used by one process at a time
C
c) creation & growing phase and is not depleted by that use
d) destruction & creation phase b) that can be used by more than one process
T.
at a time
Answer: a c) that can be shared between various threads
Explanation: None. d) none of the mentioned
O
13. The growing phase is a phase in which? Answer: a
a) A transaction may obtain locks, but does
not release any
b) A transaction may obtain locks, and
SP
Explanation: None.
not obtain any new locks b) a process may hold allocated resources
d) A transaction may release locks, and does while awaiting assignment of other resources
obtain new locks c) no resource can be forcibly removed from
a process holding it
.B
Answer: d
14. The shrinking phase is a phase in which? Explanation: None.
a) A transaction may obtain locks, but does
not release any 3. A system is in the safe state if
-R
c) A transaction may release locks, but does process in some order and still avoid a
not obtain any new locks deadlock
d) A transaction may release locks, and does b) there exist a safe sequence
obtain new locks c) all of the mentioned
C
M
avoidance algorithm? d) none of the mentioned
a) banker’s algorithm
O
b) round-robin algorithm Answer: a
c) elevator algorithm Explanation: None.
C
d) karn’s algorithm
10. To avoid deadlock ____________
T.
Answer: a a) there must be a fixed number of resources
Explanation: None. to allocate
b) resource allocation must be done only once
O
6. What is the drawback of banker’s c) all deadlocked processes must be aborted
algorithm? d) inversion technique can be used
a) in advance processes rarely know how
much resource they will need
b) the number of processes changes as time
SP
Answer: a
Explanation: None.
G
progresses
c) resource once available can disappear
LO
Explanation: None.
Answer: c
Explanation: None. 2. The request and release of resources are
___________
C
M
conditions cannot hold
4. For a deadlock to arise, which of the b) to ensure that all of the necessary
O
following conditions must hold conditions do not hold
simultaneously? c) to decide if the requested resources for a
C
a) Mutual exclusion process have to be given or not
b) No preemption d) to recover from a deadlock
T.
c) Hold and wait
d) All of the mentioned Answer: a
Explanation: None.
O
Answer: d
Explanation: None. 8. For non sharable resources like a printer,
Answer: a ____________
Explanation: If another process requests that a) is required
resource (non – shareable resource), the b) is not required
requesting process must be delayed until the c) may be or may not be required
-R
Answer: b
SE
M
it must release all the resources that it is whether the current request can be satisfied or
currently allocated. must wait to avoid a future possible deadlock.
O
a) resources currently available
11. The disadvantage of a process being b) processes that have previously been in the
C
allocated all its resources before beginning its system
execution is ____________ c) resources currently allocated to each
T.
a) Low CPU utilization process
b) Low resource utilization d) future requests and releases of each
c) Very high resource utilization process
O
d) None of the mentioned
Answer: a
Answer: b
Explanation: None.
SP
Explanation: None.
preempted
M
c) the state keeps the system protected and 5
safe
O
d) all of the mentioned 2
C
2
Answer: b
Explanation: None.
Which of the following sequence is a safe
T.
sequence?
5. A system is in a safe state only if there
a) P0, P1, P2
exists a ____________
O
b) P1, P2, P0
a) safe allocation
c) P2, P0, P1
b) safe resource
c) safe sequence
d) all of the mentioned
SP
d) P1, P0, P2
Answer: d
G
Explanation: None.
Answer: c
Explanation: None.
8. If no cycle exists in the resource allocation
LO
graph ____________
6. All unsafe states are ____________
a) then the system will not be in a safe state
a) deadlocks
b) then the system will be in a safe state
b) not deadlocks
.B
Answer: b
Answer: b
Explanation: None.
Explanation: None.
-R
P2 Answer: a
Explanation: None.
M
Explanation: None. Available
A B C
O
11. The data structures available in the 3 3 2
Banker’s algorithm are ____________
C
a) Available The sequence <P1, P3, P4, P2, P0> leads the
b) Need system to ____________
T.
c) Allocation a) an unsafe state
d) All of the mentioned b) a safe state
c) a protected state
O
Answer: d d) a deadlock
Explanation: None.
P4 that Pj needs
c) Pi is waiting for Pj to leave the system
Allocation (process-wise : P0 through P4 d) Pj is waiting for Pi to leave the system
top TO bottom)
A B C
0 1 0
Answer: a
2 0 0 Explanation: None.
3 0 2
2 1 1
3. If the wait for graph contains a cycle a) the set of processes that have been
____________ deadlocked
a) then a deadlock does not exist b) the set of processes in the deadlock queue
b) then a deadlock exists c) the specific process that caused the
c) then the system is in a safe state deadlock
d) either deadlock exists or system is in a safe d) all of the mentioned
state
Answer: a
Answer: b Explanation: None.
M
Explanation: None.
8. A computer system has 6 tape drives, with
O
4. If deadlocks occur frequently, the detection ‘n’ processes competing for them. Each
algorithm must be invoked ________ process may need 3 tape drives. The
C
a) rarely maximum value of ‘n’ for which the system is
b) frequently guaranteed to be deadlock free is?
T.
c) rarely & frequently a) 2
d) none of the mentioned b) 3
c) 4
O
Answer: b d) 1
Explanation: None.
M
Explanation: None. execution and it must be ____________
a) aborted
O
2. The two ways of aborting processes and b) rolled back
eliminating deadlocks are ____________ c) terminated
C
a) Abort all deadlocked processes d) queued
b) Abort all processes
T.
c) Abort one process at a time until the Answer: b
deadlock cycle is eliminated Explanation: None.
d) All of the mentioned
O
7. To _______ to a safe state, the system
Answer: c needs to keep more information about the
Explanation: None.
Answer: a Answer: b
Explanation: None. Explanation: None.
M
Answer: b
Explanation: None.
1. What is Address Binding?
O
a) going to an address in memory 6. The idea of overlays is to ____________
b) locating an address with the help of
C
a) data that are needed at any given time
another address b) enable a process to be larger than the
c) binding two addresses together to form a
T.
amount of memory allocated to it
new address in a different memory space
c) keep in memory only those instructions
d) a mapping from one address space to
d) all of the mentioned
O
another
Answer: d
Answer: d
Explanation: None. SP
Explanation: None.
b) system architect
b) Load time
c) system designer
c) Execution time
d) none of the mentioned
d) All of the mentioned
.B
Answer: a
Answer: d
Explanation: None.
Explanation: None.
17
M
d) None of the mentioned
10. If binding is done at assembly or load
O
time, then the process _____ be moved to Answer: b
different locations after being swapped out Explanation: None.
C
and in again.
a) can 2. The address loaded into the memory
T.
b) must address register of the memory is referred to
c) can never as ____________
d) may a) Physical address
O
b) Logical address
Answer: c c) Neither physical nor logical
Explanation: None.
Answer: a
G
swapping ____________ Explanation: None.
a) the compiler normally binds symbolic
LO
addresses (variables) to relocatable addresses 3. The run time mapping from virtual to
b) the compiler normally binds symbolic physical addresses is done by a hardware
addresses to physical addresses device called the ____________
c) the loader binds relocatable addresses to a) Virtual to physical mapper
.B
Explanation: None.
4. The base register is also known as the
____________
SE
M
then a process ______ be swapped to a d) all of the mentioned
different memory space.
O
a) has to be Answer: a
b) can never Explanation: None.
C
c) must
d) may 11. The major part of swap time is _______
T.
time.
Answer: d a) waiting
Explanation: None. b) transfer
O
c) execution
7. Swapping requires a _________ d) none of the mentioned
a) motherboard
b) keyboard
c) monitor
SP
Answer: b
Explanation: None.
G
d) backing store
12. Swapping _______ be done when a
LO
M
a) stack pointer
b) cache 7. Program always deals with ____________
O
c) accumulator a) logical address
d) disk buffer b) absolute address
C
c) physical address
Answer: b d) relative address
T.
Explanation: None.
Answer: a
3. Which one of the following is the address Explanation: None.
O
generated by CPU?
a) physical address 8. The page table contains ____________
b) absolute address
c) logical address
d) none of the mentioned
SP
a) base address of each page in physical
memory
b) page offset
G
c) page size
Answer: c d) none of the mentioned
LO
Explanation: None.
Answer: a
4. Run time mapping from virtual to physical Explanation: None.
address is done by ____________
.B
c) PCI fragmentation
d) None of the mentioned b) a paging technique
c) a technique for overcoming external
Answer: a fragmentation
-R
Answer: a register.
Explanation: None. a) less than
b) equal to
c) greater than
1. The main memory accommodates d) none of the mentioned
____________
a) operating system Answer: a
b) cpu Explanation: None.
c) user processes
M
d) all of the mentioned 6. The operating system and the other
processes are protected from being modified
O
Answer: a by an already running process because
Explanation: None. ____________
C
a) they are in different memory spaces
2. What is the operating system? b) they are in different logical addresses
T.
a) in the low memory c) they have a protection algorithm
b) in the high memory d) every address generated by the CPU is
c) either low or high memory (depending on being checked against the relocation and limit
O
the location of interrupt vector) registers
d) none of the mentioned
Answer: c
Explanation: None.
SP
Answer: d
Explanation: None.
G
7. Transient operating system code is code
3. In contiguous memory allocation that ____________
LO
execution.
4. The relocation register helps in a) increases
____________
SE
b) decreases
a) providing more address space to processes c) changes
b) a different address space to processes d) maintains
c) to protect the address spaces of processes
C
M
___________
a) the number of partitions Answer: a
O
b) the CPU utilization Explanation: None.
c) the memory size
C
d) all of the mentioned 4. If relocation is static and is done at
assembly or load time, compaction
T.
Answer: a _________
Explanation: None a) cannot be done
b) must be done
O
11. The first fit, best fit and worst fit are c) must not be done
strategies to select a ______ d) can be done
a) process from a queue to put in memory
b) processor to run the next process
c) free hole from a set of available holes
SP
Answer: a
Explanation: None.
G
d) all of the mentioned
5. The disadvantage of moving all process to
LO
M
a) frames
8. External fragmentation will not occur b) pages
O
when? c) backing store
a) first fit is used d) none of the mentioned
C
b) best fit is used
c) worst fit is used Answer: b
T.
d) no matter which algorithm is used, it will Explanation: None.
always occur
3. Every address generated by the CPU is
O
Answer: d divided into two parts. They are
Explanation: None. ____________
occurs
d) neither internal nor external fragmentation 5. The _____ table contains the base address
occurs of each page in physical memory.
a) process
C
Answer: a b) memory
Explanation: None. c) page
d) frame
M
a) queues
7. If the size of logical address space is 2 to b) stacks
O
the power of m, and a page size is 2 to the c) counters
power of n addressing units, then the high d) registers
C
order _____ bits of a logical address
designate the page number, and the ____ low Answer: d
T.
order bits designate the page offset. Explanation: None.
a) m, n
b) n, m 12. The page table registers should be built
O
c) m – n, m with _______
d) m – n, n a) very low speed logic
Answer: d
Explanation: None.
SP
b) very high speed logic
c) a large memory space
d) none of the mentioned
G
8. With paging there is no ________ Answer: b
LO
M
1. Each entry in a translation lookaside buffer
(TLB) consists of ____________ Answer: d
O
a) key Explanation: None.
b) value
C
c) bit value 6. When the valid – invalid bit is set to valid,
d) constant it means that the associated page
T.
____________
Answer: a a) is in the TLB
Explanation: None. b) has data in it
O
c) is in the process’s logical address space
2. If a page number is not found in the TLB, d) is the system’s physical address space
then it is known as a ____________
a) TLB miss
b) Buffer miss
SP
Answer: c
Explanation: None.
G
c) TLB hit
d) All of the mentioned 7. Illegal addresses are trapped using the
LO
_____ bit.
Answer: a a) error
Explanation: None. b) protection
c) valid – invalid
.B
M
Explanation: None. c) Segmentation
d) Swapping
O
10. To obtain better memory utilization,
dynamic loading is used. With dynamic Answer: b
C
loading, a routine is not loaded until it is Explanation: None.
called. For implementing dynamic loading
T.
____________ 3. The pager concerns with the
a) special support from hardware is required ____________
b) special support from operating system is a) individual page of a process
O
essential b) entire process
c) special support from both hardware and c) entire thread
operating system is essential
d) user programs can implement dynamic
loading without any special support from
SP
d) first page of a process
Answer: a
G
hardware or operating system Explanation: None.
LO
Explanation: None.
b) fatal error occurs
c) page fault occurs
1. Because of virtual memory, the memory d) no error occurs
C
M
a) oldest page is chosen c) a program to be larger than the secondary
b) newest page is chosen storage
O
c) random page is chosen d) execution of a process without being in
d) none of the mentioned physical memory
C
Answer: a Answer: a
T.
Explanation: None. Explanation: None.
8. Which algorithm chooses the page that has 2. The instruction being executed, must be in
O
not been used for the longest period of time ____________
whenever the page required to be replaced? a) physical memory
a) first in first out algorithm
b) additional reference bit algorithm
c) least recently used algorithm
SP
b) logical memory
c) physical & logical memory
d) none of the mentioned
G
d) counting based page replacement
algorithm Answer: a
LO
Explanation: None.
Answer: c
Explanation: None. 3. Error handler codes, to handle unusual
errors are ____________
.B
M
valid indicates?
Answer: b a) the page is not legal
O
Explanation: None. b) the page is illegal
c) the page is in memory
C
6. Virtual memory is normally implemented d) the page is not in memory
by ________
T.
a) demand paging Answer: c
b) buses Explanation: None.
c) virtualization
O
d) all of the mentioned 11. A page fault occurs when?
a) a page gives inconsistent data
Answer: a
Explanation: None. SPb) a page cannot be accessed due to its
absence from memory
c) a page is invisible
G
7. Segment replacement algorithms are more d) all of the mentioned
complex than page replacement algorithms
LO
Answer: c b) invalid
Explanation: None. c) saved
d) none of the mentioned
8. A swapper manipulates ___________
-R
b) all the pages of a process, segments 13. When a process begins execution with no
c) the entire process, pages pages in memory?
d) none of the mentioned a) process execution becomes impossible
C
M
Answer: c Answer: c
O
Explanation: None. Explanation: None.
C
15. When the page fault rate is low 3. In question 2, if the number of page frames
____________ is increased to 4, then the number of page
T.
a) the turnaround time increases transfers ____________
b) the effective access time increases a) decreases
c) the effective access time decreases b) increases
O
d) turnaround time & effective access time c) remains the same
increases d) none of the mentioned
Answer: c
Explanation: None.
SP
Answer: b
Explanation: None.
G
16. Locality of reference implies that the page 4. A memory page containing a heavily used
LO
reference being made by a process variable that was initialized very early and is
____________ in constant use is removed, then the page
a) will always be to the page used in the replacement algorithm used is ____________
previous page reference a) LRU
.B
Answer: b
Explanation: None. 5. A virtual memory system uses First In First
SE
M
running on a paged system.
a) are aware Answer: a
O
b) are unaware Explanation: None.
c) may unaware
C
d) none of the mentioned 11. What is the Optimal page – replacement
algorithm?
T.
Answer: b a) Replace the page that has not been used for
Explanation: None. a long time
b) Replace the page that has been used for a
O
7. If no frames are free, _____ page long time
transfer(s) is/are required. c) Replace the page that will not be used for a
a) one
b) two
c) three
SP
long time
d) None of the mentioned
G
d) four Answer: c
Explanation: None.
LO
Answer: b
Explanation: None. 12. Optimal page – replacement algorithm is
difficult to implement, because
8. When a page is selected for replacement, ____________
.B
14. For 3 page frames, the following is the and all new pages are added to the top
reference string: d) none of the mentioned
70120304230321201701
How many page faults does the LRU page Answer: b
replacement algorithm produce? Explanation: None.
a) 10
b) 15 3. There is a set of page replacement
c) 11 algorithms that can never exhibit Belady’s
d) 12 Anomaly, called ____________
M
a) queue algorithms
Answer: d b) stack algorithms
O
Explanation: None. c) string algorithms
d) none of the mentioned
C
15. What are the two methods of the LRU
page replacement policy that can be Answer: b
T.
implemented in hardware? Explanation: None.
a) Counters
b) RAM & Registers 4. Applying the LRU page replacement to the
O
c) Stack & Counters following reference string.
d) Registers 12452124
Answer: c
Explanation: None.
SP
The main memory can accommodate 3 pages
and it already has pages 1 and 2. Page 1 came
in before page 2.
G
How many page faults will occur?
a) 2
LO
copied into the time-of-use field in the page- a) Virtual memory increases
table entry for that page. In this way, we b) Larger RAMs are faster
SE
always have the time of the last reference to c) Fewer page faults occur
each page. d) None of the mentioned
Answer: b Answer: c
Explanation: None. Explanation: None.
M
____________ a) a segment number & offset
a) the instruction set architecture b) an offset & value
O
b) page size c) a value & segment number
c) physical memory size d) a key & value
C
d) number of processes in memory
Answer: a
T.
Answer: a Explanation: None.
Explanation: None.
2. In paging the user provides only ________
O
8. What is the reason for using the LFU page which is partitioned by the hardware into
replacement algorithm? ________ and ______
a) an actively used page should have a large
reference count
b) a less used page has more chances to be
SP
a) one address, page number, offset
b) one offset, page number, address
c) page number, offset, address
G
used again d) none of the mentioned
c) it is extremely efficient and optimal
LO
____________
9. What is the reason for using the MFU page a) segment base
17
M
Explanation: None. a) 13 bits
b) 14 bits
O
6. The offset ‘d’ of the logical address must c) 15 bits
be ____________ d) 16 bits
C
a) greater than segment limit
b) between 0 and segment limit Answer: a
T.
c) between 0 and the segment number Explanation: To specify a particular segment,
d) greater than the segment number 5 bits are required. To select a particular byte
after selecting a page, 10 more bits are
O
Answer: b required. Hence 15 bits are required.
Explanation: None.
d) 8
Answer: a
17
Answer: b Answer: c
Explanation: None. Explanation: None.
M
d) rotational latency
1. In _______ information is recorded
O
magnetically on platters. Answer: d
a) magnetic disks Explanation: None.
C
b) electrical disks
6. When the head damages the magnetic
c) assemblies
T.
surface, it is known as _________
d) cylinders
a) disk crash
b) head crash
O
Answer: a
c) magnetic damage
Explanation: None.
d) all of the mentioned
2. The heads of the magnetic disk are
attached to a _____ that moves all the heads
SP
Answer: b
Explanation: None.
as a unit.
G
a) spindle
7. A floppy disk is designed to rotate
b) disk arm
LO
Answer: b
c) at the same speed
Explanation: None.
d) none of the mentioned
17
M
b) total time between the first request for Explanation: None.
service and the completion on the last transfer
O
c) the total number of bytes transferred 4. Consider a disk queue with requests for I/O
divided by the total time between the first to blocks on cylinders.
C
request for service and the completion on the 98 183 37 122 14 124 65 67
last transfer Considering SSTF (shortest seek time first)
T.
d) none of the mentioned scheduling, the total number of head
movements is, if the disk head is initially at
Answer: c 53 is?
O
Explanation: None. a) 224
b) 236
c) a special procedure
d) all of the mentioned 5. Random access in magnetic tapes is
_________ compared to magnetic disks.
Answer: b a) fast
.B
M
8. SSTF algorithm, like SJF __________ of
some requests.
O
a) may cause starvation 1. The process of dividing a disk into sectors
b) will cause starvation that the disk controller can read and write,
C
c) does not cause starvation before a disk can store data is known as
d) causes aging ____________
T.
a) partitioning
Answer: a b) swap space creation
Explanation: None. c) low-level formatting
O
d) none of the mentioned
9. In the ______ algorithm, the disk arm starts
at one end of the disk and moves toward the
other end, servicing requests till the other end
of the disk. At the other end, the direction is
SP
Answer: c
Explanation: None.
G
reversed and servicing continues. 2. The data structure for a sector typically
a) LOOK contains ____________
LO
b) SCAN a) header
c) C-SCAN b) data area
d) C-LOOK c) trailer
d) all of the mentioned
.B
Answer: b
Explanation: None. Answer: d
17
Explanation: None.
10. In the _______ algorithm, the disk head
moves from one end to the other, servicing 3. The header and trailer of a sector contain
requests along the way. When the head information used by the disk controller such
-R
any requests on the return trip. b) error correcting codes (ECC) & sector
a) LOOK number
b) SCAN c) sector number & main section
c) C-SCAN d) disk identifier & sector number
C
d) C-LOOK
Answer: b
Answer: c Explanation: None.
Explanation: None.
4. The two steps the operating system takes to
11. In the ______ algorithm, the disk arm use a disk to hold its files are _______ and
goes as far as the final request in each ________
M
of the system, from CPU registers to device b) bad blocks, partitioning
controllers and the contents of main memory, c) bad blocks, low level formatting
O
and then starts the operating system. d) destroyed blocks, partitioning
a) main
C
b) bootloader Answer: c
c) bootstrap Explanation: None.
T.
d) rom
10. The scheme used in the above question is
Answer: c known as _______ or ________
O
Explanation: None. a) sector sparing & forwarding
b) forwarding & sector utilization
6. For most computers, the bootstrap is stored
in ________
a) RAM
SP
c) backwarding & forwarding
d) sector utilization & backwarding
G
b) ROM Answer: a
c) Cache Explanation: None.
LO
d) Tertiary storage
11. An unrecoverable error is known as
Answer: b _________
Explanation: None. a) hard error
.B
b) tough error
7. A disk that has a boot partition is called a c) soft error
17
as __________ b) Monitor
a) good blocks c) Wirefull
b) destroyed blocks d) Bus
c) bad blocks
d) none of the mentioned Answer: d
Explanation: None.
2. A ____ a set of wires and a rigidly defined 6. An I/O port typically consists of four
protocol that specifies a set of messages that registers status, control, ________ and
can be sent on the wires. ________ registers.
a) port a) system in, system out
b) node b) data in, data out
c) bus c) flow in, flow out
d) none of the mentioned d) input, output
Answer: c Answer: b
M
Explanation: None. Explanation: None.
O
3. When device A has a cable that plugs into 7. The ______ register is read by the host to
device B, and device B has a cable that plugs get input.
C
into device C and device C plugs into a port a) flow in
on the computer, this arrangement is called a b) flow out
T.
_________ c) data in
a) port d) data out
b) daisy chain
O
c) bus Answer: c
d) cable Explanation: None.
Answer: b
Explanation: None.
SP
8. The ______ register is written by the host
to send output.
G
a) status
4. The _________ present a uniform device- b) control
LO
M
b) device driver
c) interrupt handler 3. The interrupt vector contains
O
d) all of the mentioned ____________
a) the interrupts
C
Answer: c b) the memory addresses of specialized
Explanation: None. interrupt handlers
T.
c) the identifiers of interrupts
12. In general the two interrupt request lines d) the device addresses
are ____________
O
a) maskable & non maskable interrupts Answer: b
b) blocked & non maskable interrupts Explanation: None.
c) maskable & blocked interrupts
d) none of the mentioned
SP
4. Division by zero, accessing a protected or
non existent memory address, or attempting
G
Answer: a to execute a privileged instruction from user
Explanation: None. mode are all categorized as ________
LO
a) errors
13. The _________ are reserved for events b) exceptions
such as unrecoverable memory errors. c) interrupt handlers
a) non maskable interrupts d) all of the mentioned
.B
b) blocked interrupts
c) maskable interrupts Answer: b
17
b) programmed I/O
c) controller register
1. The ________ can be turned off by the
SE
a) nonmaskable interrupt
b) blocked interrupt 6. A character stream device transfers
c) maskable interrupt ____________
d) none of the mentioned a) bytes one by one
b) block of bytes as a unit
Answer: c c) with unpredictable response times
Explanation: None. d) none of the mentioned
M
Answer: b b) does not return immediately and waits for
Explanation: None. the I/O to complete
O
c) consumes a lot of time
8. What is a dedicated device? d) is too slow
C
a) opposite to a sharable device
b) same as a sharable device Answer: a
T.
c) can be used concurrently by several Explanation: None.
processes
d) none of the mentioned
O
1. Buffering is done to ____________
Answer: a a) cope with device speed mismatch
Explanation: None.
b) is fast memory
Answer: a c) holds the only copy of the data
Explanation: None. d) holds output for a device
C
M
b) OS a) interrupt driven I/O is more efficient than
c) kernel programmed I/O
O
d) shell b) programmed I/O is more efficient than
interrupt driven I/O
C
Answer: c c) both programmed and interrupt driven I/O
Explanation: None. are equally efficient
T.
d) none of the mentioned
6. The kernel data structures include
____________ Answer: b
O
a) process table Explanation: None.
b) open file table
c) close file table
d) all of the mentioned SP
G
Answer: b
Explanation: None. UNIT V CASE STUDY
LO
Answer: a
8. A ________ is a full duplex connection Explanation: None.
between a device driver and a user level
SE
3. Which one of the following linux file 8. Standard set of functions through which
system does not support journaling feature? interacts with kernel is defined by
a) ext2 ___________
b) ext3 a) system libraries
c) ext4 b) kernel code
d) none of the mentioned c) compilers
d) utility programs
Answer: a
Explanation: None. Answer: a
M
Explanation: None.
4. Which binary format is supported by linux?
O
a) a.out 9. What is Linux?
b) elf a) single user, single tasking
C
c) both a.out and ELF b) single user, multitasking
d) none of the mentioned c) multi user, single tasking
T.
d) multi user, multitasking
Answer: c
Explanation: None. Answer: d
O
Explanation: None.
5. Which one of the following bootloader is
not used by linux?
a) GRUB
b) LILO
SP
10. Which one of the following is not a linux
distribution?
a) debian
G
c) NTLDR b) gentoo
d) None of the mentioned c) open SUSE
LO
d) multics
Answer: c
Explanation: None. Answer: d
Explanation: None.
.B
Answer: c
7. Which desktop environment is not used in Explanation: None.
any linux distribution?
C
M
c) any other thread can not read from that file
d) all of the mentioned 8. Which one of the following is not a valid
O
state of a thread?
Answer: b a) running
C
Explanation: None. b) parsing
c) ready
T.
4. The time required to create a new thread in d) blocked
an existing process is ___________
a) greater than the time required to create a Answer: b
O
new process Explanation: None.
b) less than the time required to create a new
process
c) equal to the time required to create a new
process
SP
9. The register context and stacks of a thread
are deallocated when the thread?
a) terminates
G
d) none of the mentioned b) blocks
c) unblocks
LO
Answer: b d) spawns
Explanation: None.
Answer: a
5. When the event for which a thread is Explanation: None.
.B
blocked occurs?
a) thread moves to the ready queue 10. Thread synchronization is required
17
files
6. The jacketing technique is used to d) all of the mentioned
___________
a) convert a blocking system call into non Answer: d
C
M
a) other process similar to the one that the process to which the threads belong
thread belongs to b) an application have several different
O
b) other threads that belong to similar threads of activity all within the same address
processes space
C
c) other threads that belong to the same c) reduce the address space that a process
process could potentially use
T.
d) all of the mentioned d) all of the mentioned
Answer: c Answer: d
O
Explanation: None. Explanation: None.
Answer: b Answer: b
Explanation: None. Explanation: None.
.B
Answer: a
Explanation: None. 9. If the kernel is single threaded, then any
user level thread performing a blocking
C
other threads are available to run 1. The model in which one kernel thread is
d) none of the mentioned mapped to many user-level threads is called
___________
Answer: c a) Many to One model
Explanation: None. b) One to Many model
c) Many to Many model
10. Because the kernel thread management is d) One to One model
done by the Operating System itself
___________ Answer: a
M
a) kernel threads are faster to create than user Explanation: None.
threads
O
b) kernel threads are slower to create than 2. The model in which one user-level thread
user threads is mapped to many kernel level threads is
C
c) kernel threads are easier to manage as well called ___________
as create then user threads a) Many to One model
T.
d) none of the mentioned b) One to Many model
c) Many to Many model
Answer: b d) One to One model
O
Explanation: None.
Answer: b
11. If a kernel thread performs a blocking
system call, ____________
a) the kernel can schedule another thread in
SP
Explanation: None.
in the same application for execution b) a part of the process will stay blocked, with
c) the kernel must schedule another thread of the rest running
a different application for execution c) the entire process will run
d) the kernel must schedule another thread of d) none of the mentioned
.B
M
makes a blocking system call ___________
a) other threads are strictly prohibited from 10. In the Many to Many models when a
O
running thread performs a blocking system call
b) other threads are allowed to run ___________
C
c) other threads only from other processes are a) other threads are strictly prohibited from
allowed to run running
T.
d) none of the mentioned b) other threads are allowed to run
c) other threads only from other processes are
Answer: b allowed to run
O
Explanation: None. d) none of the mentioned
Answer: d
Explanation: None. Answer: b
Explanation: None.
8. When is the Many to One model at an
-R
multithreading
b) When the program has to be multi- main()
threaded {
c) When there is a single processor
C
Answer: a sleep(100);
Explanation: None.
}
9. In the Many to Many model true
a) an orphan process
concurrency cannot be gained because
b) a zombie process
M
a) fork
b) exec 7. If a thread invokes the exec system call
O
c) ioctl ____________
d) longjmp a) only the exec executes as a separate
C
process
Answer: b b) the program specified in the parameter to
T.
Explanation: None. exec will replace the entire process
c) the exec is ignored as it is invoked by a
4. How many times the following C program thread
O
prints yes? d) none of the mentioned
main()
{
SP
Answer: b
Explanation: None.
G
fork();fork();printf("yes"); 8. If exec is called immediately after forking
____________
LO
Answer: a
Answer: c Explanation: None.
Explanation: None.
9. If a process does not call exec after forking
-R
Answer: a Answer: b
Explanation: None. Explanation: The new process is purely
based on fork, due to no exec command,
6. A fork system call will fail if
duplication will be done.
______________
a) the previously executed statement is also a
fork call
M
Answer: c ____________
Explanation: None. a) the thread can be cancelled – safely or
O
otherwise doesn’t matter
2. When a web page is loading, and the user b) the thread can be cancelled safely
C
presses a button on the browser to stop c) the whole process can be cancelled safely
loading the page? d) none of the mentioned
T.
a) the thread loading the page continues with
the loading Answer: b
b) the thread loading the page does not stop Explanation: None.
O
but continues with another task
c) the thread loading the page is paused 7. If multiple threads are concurrently
d) the thread loading the page is cancelled
Answer: d
SP
searching through a database and one thread
returns the result then the remaining threads
must be ____________
G
Explanation: None. a) continued
b) cancelled
LO
4. When the target thread periodically checks b) one at a time, in no particular order
if it should terminate and terminates itself in c) all at a time
SE
d) Deferred cancellation
2. Which of the following is not TRUE?
Answer: d a) Processes may send each other signals
Explanation: None. b) Kernel may send signals internally
c) A field is updated in the signal table when
5. Cancelling a thread asynchronously the signal is sent
____________ d) Each signal is maintained by a single bit
Answer: c a) CPU
Explanation: A field is updated in the b) Memory
process table when the signal is sent. c) Process
d) Kernel
3. Signals of a given type ____________
a) are queued Answer: d
b) are all sent as one Explanation: None.
c) cannot be queued
d) none of the mentioned 8. In UNIX, the set of masked signals can be
M
set or cleared using the ________ function.
Answer: b a) sigmask
O
Explanation: The signal handler will be b) sigmaskproc
invoked only once. c) sigprocmask
C
d) sigproc
4. The three ways in which a process
T.
responds to a signal are ____________ Answer: c
a) ignoring the signal Explanation: None.
b) handling the signal
O
c) performing some default action 9. The usefulness of signals as a general inter
d) all of the mentioned process communication mechanism is limited
Answer: d
Explanation: None.
SPbecause ____________
a) they do not work between processes
b) they are user generated
G
c) they cannot carry information directly
5. Signals are identified by ____________ d) none of the mentioned
LO
a) signal identifiers
b) signal handlers Answer: c
c) signal actions Explanation: None.
d) none of the mentioned
.B
unblocked
d) The signals are received by the process 11. In UNIX, the abort() function sends the
once they are delivered ________ signal to the calling process,
C
Answer: d Answer: a
Explanation: None. Explanation: None.
12. In most cases, if a process is sent a signal 2. Instead of starting a new thread for every
while it is executing a system call task to execute concurrently, the task can be
____________ passed to a ___________
a) the system call will continue execution and a) process
the signal will be ignored completely b) thread pool
b) the system call is interrupted by the signal, c) thread queue
M
and the signal handler comes in d) none of the mentioned
c) the signal has no effect until the system
O
call completes Answer: b
d) none of the mentioned Explanation: None.
C
Answer: c 3. Each connection arriving at multi threaded
T.
Explanation: None. servers via network is generally
____________
13. A process can never be sure that a signal a) is directly put into the blocking queue
O
it has sent _____________ b) is wrapped as a task and passed on to a
a) has which identifier thread pool
b) has not been lost
c) has been sent
d) all of the mentioned
SP
c) is kept in a normal queue and then sent to
the blocking queue from where it is dequeued
d) none of the mentioned
G
Answer: b Answer: b
LO
14. In UNIX, the ______________ system 4. What is the idea behind thread pools?
call is used to send a signal. a) a number of threads are created at process
.B
threads running in the application at the same 5. If the thread pool contains no available
time thread ____________
b) when we need to limit the number of a) the server runs a new process
threads running in the application as a whole b) the server goes to another thread pool
c) when we need to arrange the ordering of c) the server demands for a new pool creation
threads d) the server waits until one becomes free
d) none of the mentioned
M
thread rather than waiting to create a new be decided on factors such as ____________
thread a) number of CPUs in the system
O
d) none of the mentioned b) amount of physical memory
c) expected number of concurrent client
C
Answer: c requests
Explanation: None. d) all of the mentioned
T.
7. Thread pools limit the number of threads Answer: d
that exist at any one point, hence Explanation: None.
O
____________
a) not letting the system resources like CPU
time and memory exhaust
SP
G
LO
.B
17
-R
SE
C