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 Concepts and Answers

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

1. ______ is a unique tag, usually a number identifies the file within the file system.
a) File identifier
b) File name
c) File type
d) None of the mentioned

Answer: a

2. To create a file ____________
a) allocate the space in file system
b) make an entry for new file in directory
c) allocate the space in file system & make an entry for new file in directory
d) none of the mentioned

Answer: c

3. By using the specific system call, we can ____________
a) open the file
b) read the file
c) write into the file
d) all of the mentioned

Answer: d

4. File type can be represented by ____________
a) file name
b) file extension
c) file identifier
d) none of the mentioned

Answer: b

5. Which file is a sequence of bytes organized into blocks understandable by the system’s linker?
a) object file
b) source file
c) executable file
d) text file

Answer: a
Clarification: None.

6. What is the mounting of file system?
a) crating of a filesystem
b) deleting a filesystem
c) attaching portion of the file system into a directory structure
d) removing the portion of the file system into a directory structure

Answer: c
Clarification: None.

7. Mapping of file is managed by ____________
a) file metadata
b) page table
c) virtual memory
d) file system

Answer: a
Clarification: None.

8. Mapping of network file system protocol to local file system is done by ____________
a) network file system
b) local file system
c) volume manager
d) remote mirror

Answer: a
Clarification: None.

9. Which one of the following explains the sequential file access method?
a) random access according to the given byte number
b) read bytes one at a time, in order
c) read/write sequentially by record
d) read/write randomly by record

Answer: b
Clarification: None.

10. When will file system fragmentation occur?
a) unused space or single file are not contiguous
b) used space is not contiguous
c) unused space is non-contiguous
d) multiple files are non-contiguous

Answer: a

250+ TOP MCQs on Disk Scheduling and Answers

Operating System Multiple Choice Questions on “Disk Scheduling”.

1. In _______ information is recorded magnetically on platters.
a) magnetic disks
b) electrical disks
c) assemblies
d) cylinders

Answer: a
Clarification: None.

2. The heads of the magnetic disk are attached to a _____ that moves all the heads as a unit.
a) spindle
b) disk arm
c) track
d) none of the mentioned

Answer: b
Clarification: None.

3. The set of tracks that are at one arm position make up a ___________
a) magnetic disks
b) electrical disks
c) assemblies
d) cylinders

Answer: d
Clarification: None.

4. The time taken to move the disk arm to the desired cylinder is called the ____________
a) positioning time
b) random access time
c) seek time
d) rotational latency

Answer: c
Clarification: None.

5. The time taken for the desired sector to rotate to the disk head is called ____________
a) positioning time
b) random access time
c) seek time
d) rotational latency

Answer: d
Clarification: None.

6. When the head damages the magnetic surface, it is known as _________
a) disk crash
b) head crash
c) magnetic damage
d) all of the mentioned

Answer: b
Clarification: None.

7. A floppy disk is designed to rotate ___________ as compared to a hard disk drive.
a) faster
b) slower
c) at the same speed
d) none of the mentioned

Answer: b
Clarification: None.

8. What is the host controller?
a) controller built at the end of each disk
b) controller at the computer end of the bus
c) all of the mentioned
d) none of the mentioned

Answer: b
Clarification: None.

9. ______ controller sends the command placed into it, via messages to the _____ controller.
a) host, host
b) disk, disk
c) host, disk
d) disk, host

Answer: c
Clarification: None.

10. What is the disk bandwidth?
a) the total number of bytes transferred
b) total time between the first request for service and the completion on the last transfer
c) the total number of bytes transferred divided by the total time between the first request for service and the completion on the last transfer
d) none of the mentioned

Answer: c