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

250+ TOP MCQs on Security – Cryptography and Answers

Operating System Multiple Choice Questions on “Security – Cryptography”.

1. What is the preferred way of encryption?
a) pre shared secret key
b) using key distribution center (KDC)
c) public key-encryption
d) symmetric key

Answer: c
Clarification: Pre Shared key can be compromised and either party can be suspected. Likewise KDC or symmetric key can have breach which are undesirable. Public and private key encryption is a known industry standard.

2. What is not a role of encryption?
a) It is used to protect data from unauthorized access during transmission
b) It is used to ensure user authentication
c) It is used to ensure data integrity
d) It is used to ensure data corruption doesn’t happens

Answer: d
Clarification: Encryption doesn’t have error correction or detection facility thus cannot be used to safeguard from data corruption.

3. What is cipher-block chaining?
a) Data is logically ‘ANDed’ with previous block
b) Data is logically ‘ORed’ with previous block
c) Data is logically ‘XORed’ with previous block
d) None of the mentioned

Answer: c
Clarification: None.

4. What is not an encryption standard?
a) AES
b) TES
c) Triple DES
d) DES

Answer: b
Clarification: None.

5. Which of the following is not a stream cipher?
a) Two fish
b) RC5
c) RC4
d) TBONE

Answer: d
Clarification: None.

6. What is a Hash Function?
a) It creates a small flexible block of data
b) It creates a small,fixed block of data
c) It creates a encrypted block of data
d) None of the mentioned

Answer: b
Clarification: None.

7. MD5 produces __________ bits hash data.
a) 128
b) 150
c) 160
d) 112

Answer: a
Clarification: None.

8. SHA-1 produces __________ bit of hash.
a) 128
b) 160
c) 150
d) 112

Answer: b
Clarification: None.

9. Which two of the following are authentication algorithms?
a) MAC
b) AES
c) DAS
d) Digital-signature

Answer: a
Clarification: None.

10. What is the role of Key Distribution Center?
a) It is used to distribute keys to everyone in world
b) It intended to reduce the risks inherent in exchanging keys
c) All of the mentioned
d) None of the mentioned

Answer: b

250+ TOP MCQs on File System Implementation and Answers

Operating System Multiple Choice Questions on “File System Implementation”.

1. Management of metadata information is done by ____________
a) file-organisation module
b) logical file system
c) basic file system
d) application programs

Answer: b
Clarification: None.

2. A file control block contains the information about ____________
a) file ownership
b) file permissions
c) location of file contents
d) all of the mentioned

Answer: d
Clarification: None.

3. Which table contains the information about each mounted volume?
a) mount table
b) system-wide open-file table
c) per-process open-file table
d) all of the mentioned

Answer: d
Clarification: None.

4. To create a new file application program calls ____________
a) basic file system
b) logical file system
c) file-organisation module
d) none of the mentioned

Answer: b
Clarification: None.

5. What will happens when a process closes the file?
a) per-process table entry is not removed
b) system wide entry’s open count is decremented
c) all of the mentioned
d) none of the mentioned

Answer: b
Clarification: None.

6. What is raw disk?
a) disk without file system
b) empty disk
c) disk lacking logical file system
d) disk having file system

Answer: a
Clarification: None.

7. The data structure used for file directory is called ____________
a) mount table
b) hash table
c) file table
d) process table

Answer: b
Clarification: None.

8. In which type of allocation method each file occupy a set of contiguous block on the disk?
a) contiguous allocation
b) dynamic-storage allocation
c) linked allocation
d) indexed allocation

Answer: a
Clarification: None.

9. If the block of free-space list is free then bit will ____________
a) 1
b) 0
c) any of 0 or 1
d) none of the mentioned

Answer: a
Clarification: None.

10. Which protocol establishes the initial logical connection between a server and a client?
a) transmission control protocol
b) user datagram protocol
c) mount protocol
d) datagram congestion control protocol

Answer: c

250+ TOP MCQs on Disk Scheduling and Answers

Operating System online quiz on “Disk Scheduling”.

1. Whenever a process needs I/O to or from a disk it issues a ______________
a) system call to the CPU
b) system call to the operating system
c) a special procedure
d) all of the mentioned

Answer: b
Clarification: None.

2. If a process needs I/O to or from a disk, and if the drive or controller is busy then ____________
a) the request will be placed in the queue of pending requests for that drive
b) the request will not be processed and will be ignored completely
c) the request will be not be placed
d) none of the mentioned

Answer: a
Clarification: None.

3. Consider a disk queue with requests for I/O to blocks on cylinders.
98 183 37 122 14 124 65 67
Considering FCFS (first cum first served) scheduling, the total number of head movements is, if the disk head is initially at 53 is?
a) 600
b) 620
c) 630
d) 640

Answer: d
Clarification: None.

4. Consider a disk queue with requests for I/O to blocks on cylinders.
98 183 37 122 14 124 65 67
Considering SSTF (shortest seek time first) scheduling, the total number of head movements is, if the disk head is initially at 53 is?
a) 224
b) 236
c) 245
d) 240

Answer: b
Clarification: None.

5. Random access in magnetic tapes is _________ compared to magnetic disks.
a) fast
b) very fast
c) slow
d) very slow

Answer: d
Clarification: None.

6. Magnetic tape drives can write data at a speed ________ disk drives.
a) much lesser than
b) comparable to
c) much faster than
d) none of the mentioned

Answer: b
Clarification: None.

7. On media that use constant linear velocity (CLV), the _____________ is uniform.
a) density of bits on the disk
b) density of bits per sector
c) the density of bits per track
d) none of the mentioned

Answer: c
Clarification: The farther a track is from the center of the disk.

8. SSTF algorithm, like SJF __________ of some requests.
a) may cause starvation
b) will cause starvation
c) does not cause starvation
d) causes aging

Answer: a
Clarification: None.

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 reversed and servicing continues.
a) LOOK
b) SCAN
c) C-SCAN
d) C-LOOK

Answer: b
Clarification: None.

10. In the _______ algorithm, the disk head moves from one end to the other, servicing requests along the way. When the head reaches the other end, it immediately returns to the beginning of the disk without servicing any requests on the return trip.
a) LOOK
b) SCAN
c) C-SCAN
d) C-LOOK

Answer: c
Clarification: None.

11. In the ______ algorithm, the disk arm goes as far as the final request in each direction, then reverses direction immediately without going to the end of the disk.
a) LOOK
b) SCAN
c) C-SCAN
d) C-LOOK

Answer: a