250+ TOP MCQs on Virtual Memory – Thrashing and Answers

Operating System Multiple Choice Questions on “Virtual Memory – Thrashing”.

1. A process is thrashing if ____________
a) it spends a lot of time executing, rather than paging
b) it spends a lot of time paging than executing
c) it has no memory allocated to it
d) none of the mentioned

Answer: b

2. Thrashing _______ the CPU utilization.
a) increases
b) keeps constant
c) decreases
d) none of the mentioned

Answer: c

3. What is a locality?
a) a set of pages that are actively used together
b) a space in memory
c) an area near a set of processes
d) none of the mentioned

Answer: a

4. When a subroutine is called ____________
a) it defines a new locality
b) it is in the same locality from where it was called
c) it does not define a new locality
d) none of the mentioned

Answer: a

5. A program is generally composed of several different localities, which _____ overlap.
a) may
b) must
c) do not
d) must not

Answer: a

6. In the working set model, for:
2 6 1 5 7 7 7 7 5 1 6 2 3 4 1 2 3 4 4 4 3 4 3 4 4 4 1 3 2 3
if DELTA = 10, then the working set at time t1 (….7 5 1) is?
a) {1, 2, 4, 5, 6}
b) {2, 1, 6, 7, 3}
c) {1, 6, 5, 7, 2}
d) {1, 2, 3, 4, 5}

Answer: c
Clarification: None.

7. The accuracy of the working set depends on the selection of ____________
a) working set model
b) working set size
c) memory size
d) number of pages in memory

Answer: b
Clarification: None.

8. If working set window is too small ____________
a) it will not encompass entire locality
b) it may overlap several localities
c) it will cause memory problems
d) none of the mentioned

Answer: a
Clarification: None.

9. If working set window is too large ____________
a) it will not encompass entire locality
b) it may overlap several localities
c) it will cause memory problems
d) none of the mentioned

Answer: b
Clarification: None.

10. If the sum of the working – set sizes increases, exceeding the total number of available frames ____________
a) then the process crashes
b) the memory overflows
c) the system crashes
d) the operating system selects a process to suspend

Answer: d
Clarification: None.

11. Consider the following page reference string.
1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6
For LRU page replacement algorithm with 4 frames, the number of page faults is?
a) 10
b) 14
c) 8
d) 11

Answer: a
Clarification: None.

12. Consider the following page reference string.
1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6
For LRU page replacement algorithm with 5 frames, the number of page faults is?
a) 10
b) 14
c) 8
d) 11

Answer: c
Clarification: None.

13. Consider the following page reference string.
1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6
For FIFO page replacement algorithms with 3 frames, the number of page faults is?
a) 16
b) 15
c) 14
d) 11

Answer: a
Clarification: None.

14. Consider the following page reference string.
1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6
For FIFO page replacement algorithms with 4 frames, the number of page faults is?
a) 16
b) 15
c) 14
d) 11

Answer: c
Clarification: None.

15. Consider the following page reference string.
1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6
For Optimal page replacement algorithms with 3 frames, the number of page faults is?
a) 16
b) 15
c) 14
d) 11

Answer: d

250+ TOP MCQs on I/O Subsystem and Answers

Operating System Multiple Choice Questions on “I/O Subsystem”.

1. I/O hardware contains ____________
a) Bus
b) Controller
c) I/O port and its registers
d) All of the mentioned

Answer: d
Clarification: None.

2. The data-in register of I/O port is ____________
a) Read by host to get input
b) Read by controller to get input
c) Written by host to send output
d) Written by host to start a command

Answer: a
Clarification: None.

3. The host sets _____ bit when a command is available for the controller to execute.
a) write
b) status
c) command-ready
d) control

Answer: c
Clarification: None.

4. When hardware is accessed by reading and writing to the specific memory locations, then it is called ____________
a) port-mapped I/O
b) controller-mapped I/O
c) bus-mapped I/O
d) none of the mentioned

Answer: d
Clarification: It is called memory-mapped I/O.

5. Device drivers are implemented to interface ____________
a) character devices
b) block devices
c) network devices
d) all of the mentioned

Answer: d
Clarification: None.

6. Which hardware triggers some operation after certain programmed count?
a) programmable interval timer
b) interrupt timer
c) programmable timer
d) none of the mentioned

Answer: a
Clarification: None.

7. The device-status table contains ____________
a) each I/O device type
b) each I/O device address
c) each I/O device state
d) all of the mentioned

Answer: d
Clarification: None.

8. Which buffer holds the output for a device?
a) spool
b) output
c) status
d) magic

Answer: a
Clarification: None.

9. Which one of the following connects high-speed high-bandwidth device to memory subsystem and CPU.
a) Expansion bus
b) PCI bus
c) SCSI bus
d) None of the mentioned

Answer: a
Clarification: None.

10. A process is moved to wait queue when I/O request is made with ____________
a) non-blocking I/O
b) blocking I/O
c) asynchronous I/O
d) synchronous I/O

Answer: b

250+ TOP MCQs on Distributed Operating System – Robustness of Distributed Systems

Operating System Multiple Choice Questions on “Robustness of Distributed Systems”.

1. How many layers does the Internet model ISO consist of?
a) Three
b) Five
c) Seven
d) Eight

Answer: c

2. Which layer is responsible for The process-to-process delivery?
a) Network
b) Transport
c) Application
d) Physical

Answer: b
Clarification: None.

3. Which layer is the layer closest to the transmission medium?
a) Physical
b) Data link
c) Network
d) Transport

Answer: a
Clarification: None.

4. Header are ______ when data packet moves from upper to the lower layers?
a) Modified
b) Removed
c) Added
d) All of the mentioned

Answer: c
Clarification: None.

5. Which layer lies between the transport layer and data link layer?
a) Physical
b) Network
c) Application
d) Session

Answer: b
Clarification: None.

6. Which of the following is an application layer service?
a) Mail service
b) File transfer
c) Remote access
d) All of the mentioned

Answer: d
Clarification: None.

7. What are the different ways distributed may suffer?
a) Failure of a link
b) Failure of a site
c) Loss of message
d) All of the mentioned

Answer: d
Clarification: None.

8. What are design issues in distributed system structure?
a) Scalability
b) Fault-tolerance
c) Clustering
d) All of the mentioned

Answer: d
Clarification: None.

9. In which OSI layer encryption and decryption happens?
a) Application
b) Presentation
c) Transport
d) Data Link

Answer: b
Clarification: None.

10. What are the important steps followed when recovery from failure happens?
a) Post repairing integration with main system should happen smoothly and gracefully
b) Upon link failure both parties at end must not be notified
c) Fault recovery system must me adjusted
d) Failures are logged systematically

Answer: a

250+ TOP MCQs on Process Control Block and Answers

Operating System Multiple Choice Questions on “Process Control Block”.

1. A Process Control Block(PCB) does not contain which of the following?
a) Code
b) Stack
c) Bootstrap program
d) Data

Answer: c
Clarification: Process Control Block (PCB) contains information related to a process such as Process State, Program Counter, CPU Register, etc. Process Control Block is also known as Task Control Block. Bootstrap program is a program which runs initially when the system or computer is booted or rebooted.

2. The number of processes completed per unit time is known as __________
a) Output
b) Throughput
c) Efficiency
d) Capacity

Answer: b
Clarification: The number of processes completed per unit time is known as Throughput. Suppose there are 4 processes A, B, C & D they are taking 1, 3, 4 & 7 units of time respectively for their executions. For 10 units of time, throughput is high if process A, B & C are running first as 3 processes can execute. If process C runs first then throughput is low as maximum only 2 processes can execute. Throughput is low for processes which take a long time for execution. Throughput is high for processes which take a short time for execution.

3. The state of a process is defined by __________
a) the final activity of the process
b) the activity just executed by the process
c) the activity to next be executed by the process
d) the current activity of the process

Answer: d
Clarification: The state of a process is defined by the current activity of the process. A process state changes when the process executes. The process states are as New, Ready, Running, Wait, Terminated.

4. Which of the following is not the state of a process?
a) New
b) Old
c) Waiting
d) Running

Answer: b
Clarification: There is no process state such as old. When a process is created then the process is in New state. When the process gets the CPU for its execution then the process is in Running state. When the process is waiting for an external event then the process is in a Waiting state.

5. What is a Process Control Block?
a) Process type variable
b) Data Structure
c) A secondary storage section
d) A Block in memory

Answer: b
Clarification: A Process Control Block (PCB) is a data structure. It contains information related to a process such as Process State, Program Counter, CPU Register, etc. Process Control Block is also known as Task Control Block.

6. The entry of all the PCBs of the current processes is in __________
a) Process Register
b) Program Counter
c) Process Table
d) Process Unit

Answer: c
Clarification: The entry of all the PCBs of the current processes is in Process Table. The Process Table has the status of each and every process that is created in OS along with their PIDs.

7. What is the degree of multiprogramming?
a) the number of processes executed per unit time
b) the number of processes in the ready queue
c) the number of processes in the I/O queue
d) the number of processes in memory

Answer: d
Clarification: Multiprogramming means the number of processes are in the ready states. To increase utilization of CPU, Multiprogramming is one of the most important abilities of OS. Generally, a single process cannot use CPU or I/O at all time, whenever CPU or I/O is available another process can use it. By doing this CPU utilization is increased.

8. A single thread of control allows the process to perform __________
a) only one task at a time
b) multiple tasks at a time
c) only two tasks at a time
d) all of the mentioned

Answer: a
Clarification: A single thread of control allows the process to perform only one task at a time. In the case of multi-core, multiple threads can be run simultaneously and can perform multiple tasks at a time.

9. What is the objective of multiprogramming?
a) Have a process running at all time
b) Have multiple programs waiting in a queue ready to run
c) To increase CPU utilization
d) None of the mentioned

Answer: c
Clarification: The objective of multiprogramming is to increase CPU utilization. Generally, a single process cannot use CPU or I/O at all time, whenever CPU or I/O is available another process can use it. Multiprogramming offers this ability to OS by keeping multiple programs in a ready queue.

250+ TOP MCQs on Atomic Transactions and Answers

Operating System Multiple Choice Questions on “Atomic Transactions”.

1. A collection of instructions that performs a single logical function is called ____________
a) transaction
b) operation
c) function
d) all of the mentioned

Answer: a
Clarification: None.

2. A terminated transaction that has completed its execution successfully is ____________ otherwise it is __________
a) committed, destroyed
b) aborted, destroyed
c) committed, aborted
d) none of the mentioned

Answer: c
Clarification: None.

3. The state of the data accessed by an aborted transaction must be restored to what it was just before the transaction started executing. This restoration is known as ________ of transaction.
a) safety
b) protection
c) roll – back
d) revert – back

Answer: c
Clarification: None.

4. Write ahead logging is a way ____________
a) to ensure atomicity
b) to keep data consistent
c) that records data on stable storage
d) all of the mentioned

Answer: d
Clarification: None.

5. In the write ahead logging a _____________ is maintained.
a) a memory
b) a system
c) a disk
d) a log record

Answer: d
Clarification: None.

6. An actual update is not allowed to a data item ____________
a) before the corresponding log record is written out to stable storage
b) after the corresponding log record is written out to stable storage
c) until the whole log record has been checked for inconsistencies
d) all of the mentioned

Answer: a
Clarification: None.

7. The undo and redo operations must be _________ to guarantee correct behaviour, even if a failure occurs during recovery process.
a) idempotent
b) easy
c) protected
d) all of the mentioned

Answer: a
Clarification: Idempotent – Multiple executions of an operation have the same result as does one execution.

8. The system periodically performs checkpoints that consists of the following operation(s) ____________
a) Putting all the log records currently in main memory onto stable storage
b) putting all modified data residing in main memory onto stable storage
c) putting a log record onto stable storage
d) all of the mentioned
View Answer

Answer: d
Clarification: None.

9. Consider a transaction T1 that committed prior to checkpoint. The record appears in the log before the record. Any modifications made by T1 must have been written to the stable storage either with the checkpoint or prior to it. Thus at recovery time ____________
a) There is a need to perform an undo operation on T1
b) There is a need to perform a redo operation on T1
c) There is no need to perform an undo and redo operation on T1
d) All of the mentioned

Answer: c
Clarification: None.

10. Serializable schedules are ones where ____________
a) concurrent execution of transactions is equivalent to the transactions executed serially
b) the transactions can be carried out one after the other
c) a valid result occurs after execution transactions
d) none of the mentioned

Answer: a
Clarification: None.

11. A locking protocol is one that ____________
a) governs how locks are acquired
b) governs how locks are released
c) governs how locks are acquired and released
d) none of the mentioned

Answer: c
Clarification: None.

12. The two phase locking protocol consists of ____________
a) growing & shrinking phase
b) shrinking & creation phase
c) creation & growing phase
d) destruction & creation phase

Answer: a
Clarification: None.

13. The growing phase is a phase in which?
a) A transaction may obtain locks, but does not release any
b) A transaction may obtain locks, and releases a few or all of them
c) A transaction may release locks, but does not obtain any new locks
d) A transaction may release locks, and does obtain new locks

Answer: a
Clarification: None.

14. The shrinking phase is a phase in which?
a) A transaction may obtain locks, but does not release any
b) A transaction may obtain locks, and releases a few or all of them
c) A transaction may release locks, but does not obtain any new locks
d) A transaction may release locks, and does obtain new locks

Answer: c
Clarification: None.

15. Which of the following concurrency control protocols ensure both conflict serializability and freedom from deadlock?
I) 2-phase locking
II) Timestamp ordering
a) I only
b) II only
c) Both I and II
d) Neither I nor II

Answer: b

250+ TOP MCQs on I/O System – Kernel I/O Subsystems and Answers

Operating System Multiple Choice Questions on “I/O System – Kernel I/O Subsystems”.

1. Buffering is done to ____________
a) cope with device speed mismatch
b) cope with device transfer size mismatch
c) maintain copy semantics
d) all of the mentioned

Answer: d
Clarification: None.

2. Caching is ________ spooling.
a) same as
b) not the same as
c) all of the mentioned
d) none of the mentioned

Answer: b
Clarification: None.

3. Caching ____________
a) holds a copy of the data
b) is fast memory
c) holds the only copy of the data
d) holds output for a device

Answer: a
Clarification: None.

4. Spooling ____________
a) holds a copy of the data
b) is fast memory
c) holds the only copy of the data
d) holds output for a device

Answer: c
Clarification: None.

5. The ________ keeps state information about the use of I/O components.
a) CPU
b) OS
c) kernel
d) shell

Answer: c
Clarification: None.

6. The kernel data structures include ____________
a) process table
b) open file table
c) close file table
d) all of the mentioned

Answer: b
Clarification: None.

7. Windows NT uses a __________ implementation for I/O.
a) message – passing
b) draft – passing
c) secondary memory
d) cache

Answer: a
Clarification: None.

8. A ________ is a full duplex connection between a device driver and a user level process.
a) Bus
b) I/O operation
c) Stream
d) Flow

Answer: c
Clarification: None.

9. I/O is a _________ in system performance.
a) major factor
b) minor factor
c) does not matter
d) none of the mentioned

Answer: a
Clarification: None.

10. If the number of cycles spent busy – waiting is not excessive, then ____________
a) interrupt driven I/O is more efficient than programmed I/O
b) programmed I/O is more efficient than interrupt driven I/O
c) both programmed and interrupt driven I/O are equally efficient
d) none of the mentioned

Answer: b