Font size
WorksheetsOperating System Concepts Quiz
Total questions: 123
Worksheet time: 1hrs 2mins
What does the term "cold boot" refer to?
Rebooting the system
Turning on the system after it was completely powered off
Shutting down the system
Putting the system in sleep mode
The process of transferring control from BIOS/UEFI to the bootloader is called:
Bootstrapping
Handshaking
Context switching
Preemption
Which of the following is not a valid state in a process state diagram?
Ready
Blocked
Waiting
Suspended
The Process Control Block (PCB) contains information about the process, except:
Process ID
Program Counter
CPU registers
System clock
Which of the following is used for communication between processes?
Memory mapping
Paging
Shared memory
Virtual memory
What is the main purpose of a process scheduler?
Allocate resources to processes
Manage memory
Schedule processes for CPU execution
Handle file I/O operations
A thread is also referred to as a:
Process Control Block
Lightweight process
Independent process
Kernel process
Which system call is used to create a new process in UNIX-like systems?
exec()
fork()
wait()
clone()
What does the ‘parent process’ do when it terminates a child process?
Releases memory
Sends a termination signal
Deallocates resources
All of the above
The mechanism where processes communicate using messages is called:
Shared memory system
Message passing system
Paging system
Virtual memory system
In a multi-threaded environment, each thread has its own:
Heap memory
Code section
Stack
Data section
In shared memory systems, synchronization between processes is achieved using:
Mutexes
Message queues
Signals
Page tables
Which of the following is a non-preemptive scheduling algorithm?
Round Robin
Shortest Job First
Priority Scheduling
First Come First Served
What is the turnaround time of a process?
Time spent in the ready queue
Time spent in execution
Time from submission to completion
Time in waiting state
Which scheduling algorithm is most suitable for time-sharing systems?
Round Robin
Priority Scheduling
Shortest Job First
First Come First Served
The CPU scheduling criteria that ensures the system is responsive is:
Turnaround time
Waiting time
Throughput
Response time
In Round Robin scheduling, the performance heavily depends on:
Context switch time
Priority levels
Quantum size
Process size
The Shortest Job First (SJF) scheduling algorithm is optimal when:
All jobs arrive at the same time
Jobs arrive in decreasing order of burst time
Jobs are of equal size
Jobs arrive in increasing order of priority
Priority scheduling may cause:
Deadlock
Starvation
High waiting time
Context switching overhead
Which scheduling algorithm ensures that each process gets a fair share of CPU time?
Shortest Job First
Priority Scheduling
Round Robin
First Come First Served
In preemptive scheduling, a process can be interrupted and moved to the ready queue when:
A higher priority process arrives
The process finishes execution
The process requests I/O
All of the above
Throughput is defined as:
Number of processes completed per unit time
Total execution time of all processes
Average waiting time of processes
CPU utilization percentage
Which of the following scheduling algorithms may lead to convoy effect?
Round Robin
First Come First Served
Shortest Job First
Priority Scheduling
The context switching time between processes is considered as:
CPU utilization time
Overhead
Idle time
Throughput
What happens when a process is terminated?
Resources are deallocated
PCB is removed
Parent process is notified
All of the above
Which of the following is true for the preemptive version of Shortest Job First?
It is also known as Shortest Remaining Time First
It is equivalent to First Come First Served
It has the highest waiting time
None of the above
In Priority Scheduling, the process with the highest priority:
Gets the CPU last
Gets the CPU first
Runs in parallel with other processes
Is moved to the waiting queue
Which of the following scheduling algorithms always executes the process that arrived first?
Round Robin
First Come First Served
Priority Scheduling
Shortest Job First
A scheduling algorithm where all processes are executed cyclically is called:
Priority Scheduling
Round Robin Scheduling
Shortest Job First
First Come First Served
In the context of scheduling, aging is a technique used to:
Prevent starvation
Reduce response time
Avoid deadlock
Optimize throughput
What is the main disadvantage of First Come First Served scheduling?
Low throughput
High context switch time
Convoy effect
Starvation
If a process in Round Robin scheduling has a burst time of 10 ms and the time quantum is 4 ms, how many context switches will occur to complete the process?
1
2
3
4
What is the main cause of a race condition?
Improper synchronization
High CPU utilization
Deadlock
Excessive paging
The critical section problem involves:
Process scheduling
Synchronization of shared resources
Deadlock resolution
Virtual memory management
Which of the following is not a requirement for a solution to the critical section problem?
Mutual exclusion
Progress
Bounded waiting
Preemption
Peterson's solution is applicable for:
Any number of processes
Two processes
Three processes
N processes with priority
A race condition occurs when:
Two processes compete for the same resource
Two processes access shared data concurrently without synchronization
Processes enter the critical section simultaneously
All of the above
Which of the following is used to implement mutual exclusion?
Critical section
Mutex locks
Paging
Virtual memory
What is a semaphore?
A special type of process
A synchronization tool
A CPU scheduling algorithm
A deadlock prevention mechanism
Which type of semaphore allows at most one process in the critical section?
Binary semaphore
Counting semaphore
Monitors
Deadlock semaphore
Monitors are high-level synchronization constructs that:
Use semaphores internally
Enforce mutual exclusion automatically
Avoid busy waiting
All of the above
In the Producer-Consumer problem, a buffer is implemented as:
Shared memory
Queue
Stack
Both a and b
The Dining Philosophers problem is used to illustrate:
Process synchronization issues
Deadlock prevention
Resource allocation
All of the above
In the Readers-Writers problem, which condition leads to starvation?
Writer starvation
Reader starvation
Both a and b
Neither a nor b
In synchronization problems, busy waiting can be avoided by:
Mutex locks
Semaphores
Monitors
All of the above
The main purpose of synchronization hardware is to:
Prevent starvation
Avoid race conditions
Resolve deadlocks
Optimize CPU scheduling
The main purpose of synchronization hardware is to:
Prevent starvation
Avoid race conditions
Resolve deadlocks
Optimize CPU scheduling
Which synchronization problem uses a bounded buffer?
Producer-Consumer
Dining Philosophers
Readers-Writers
Deadlock detection
Which of the following is not a necessary condition for deadlock?
Mutual exclusion
Circular wait
Preemption
Hold and wait
In a resource allocation graph, a deadlock exists if:
There is no cycle
There is a cycle, and each resource has one instance
There is a cycle, and at least one resource has multiple instances
None of the above
Deadlock prevention ensures that:
Deadlocks never occur
Deadlocks occur occasionally
Resources are used more efficiently
System throughput increases
In deadlock avoidance, the system must have:
Resource allocation graph
Safe state
Deadlock detection algorithm
Recovery mechanism
The Banker's algorithm is used for:
Deadlock prevention
Deadlock avoidance
Deadlock detection
Process synchronization
In the Banker's algorithm, a state is considered safe if:
The system has sufficient resources
There exists a sequence of processes that can execute to completion
There are no deadlocks
The resource allocation graph has no cycles
Deadlock detection is necessary when:
Deadlocks occur frequently
Deadlock prevention is not possible
Deadlock avoidance is not implemented
Both b and c
What is the main drawback of deadlock prevention techniques?
High memory usage
System underutilization
Complex algorithms
Starvation
Which of the following strategies is used to recover from deadlock?
Resource preemption
Process termination
Rollback
All of the above
In deadlock detection, the wait-for graph is used when:
Each resource has a single instance
Multiple instances of resources exist
There are no resources
All processes are independent
Which algorithm involves releasing resources of terminated processes to break deadlocks?
Deadlock prevention
Deadlock avoidance
Deadlock recovery
Starvation handling
The circular wait condition can be eliminated by:
Assigning priorities to resources
Preventing hold and wait
Allowing preemption
Ensuring safe state
In deadlock prevention, hold and wait can be avoided by:
Allocating all resources at once
Allowing preemption
Using a safe sequence
Detecting cycles in the resource allocation graph
Which of the following is a limitation of the Banker's algorithm?
Requires prior knowledge of resource needs
Cannot handle dynamic resource allocation
Low system utilization
All of the above
What happens if a process requests a resource that results in an unsafe state?
The request is denied
The process is terminated
The system enters deadlock
Resources are reallocated
What is the difference between a logical address and a physical address?
Logical address is generated by the CPU; physical address is a reference in memory
Logical address is a reference in memory; physical address is generated by the CPU
Both are generated by the operating system
Both are generated by the CPU
The term "swapping" refers to:
Moving processes between main memory and secondary storage
Exchanging pages between processes
Allocating contiguous memory blocks
Replacing old data with new data in memory
Which memory allocation method divides memory into fixed-size partitions?
Paging
Fixed partitioning
Segmentation
Dynamic partitioning
In variable partitioning, the main drawback is:
External fragmentation
Internal fragmentation
Inefficient CPU utilization
Poor process scheduling
The concept of "address space" includes:
Logical address space only
Physical address space only
Both logical and physical address spaces
Neither logical nor physical address spaces
In paging, a page table maps:
Logical addresses to physical addresses
Pages to frames
Virtual memory to physical memory
Processes to memory blocks
The size of a page is determined by:
The operating system
The hardware
The application program
Both a and b
Which of the following is true for segmentation?
Divides memory into fixed-sized blocks
Divides memory into variable-sized blocks based on logical divisions
Eliminates external fragmentation
Maps pages directly to physical memory
In a paging system, the frame size is:
Equal to the page size
Equal to the block size
Variable depending on the process size
Independent of page size
The main disadvantage of paging is:
Internal fragmentation
External fragmentation
Inefficient memory utilization
Increased CPU overhead
In segmentation, the logical address consists of:
Page number and offset
Segment number and offset
Frame number and offset
Base address and offset
Which memory allocation method best supports dynamic memory allocation?
Paging
Fixed partitioning
Segmentation
Swapping
The page table is stored in:
CPU registers
Main memory
Cache memory
Virtual memory
Virtual memory is:
A memory management technique that allows execution of processes larger than physical memory
Used only in distributed systems
Based on fixed partitioning
Independent of paging and segmentation
Demand paging involves:
Loading all pages of a process into memory before execution
Loading pages only when they are required
Allocating contiguous memory for processes
Eliminating internal fragmentation
Which of the following is not a valid page replacement algorithm?
FIFO
LRU
Optimal
Shortest Job First
Page faults occur when:
The page is not in memory
The page is in memory but inaccessible
The page size is too small
The page table is full
What is thrashing?
Excessive swapping of processes
High CPU utilization
Multiple page faults due to insufficient memory
Allocating contiguous memory to a process
The optimal page replacement algorithm:
Replaces the page that will not be used for the longest period of time
Replaces the least recently used page
Replaces the first page loaded into memory
Replaces the page most frequently used
In the FIFO page replacement algorithm, which page is replaced?
The page that has been in memory the longest
The page that has been in memory the shortest
The page with the least usage
The page that causes the most page faults
The Least Recently Used (LRU) algorithm replaces:
The page that was used least recently
The page with the highest frequency of use
The page that will not be used in the future
The first page loaded into memory
Which of the following algorithms may suffer from Belady's anomaly?
FIFO
LRU
Optimal
Random
What is the primary goal of page replacement algorithms?
Reduce the number of page faults
Minimize memory usage
Maximize CPU utilization
Improve process synchronization
In demand paging, pages are loaded into memory:
Before execution
Only when needed
During compilation
At fixed intervals
A page table entry does not contain:
Frame number
Process priority
Present/absent bit
Access control information
Which page replacement algorithm uses a reference bit?
FIFO
Optimal
Clock
LRU
In segmentation, external fragmentation occurs because:
Memory is divided into variable-sized segments
Memory is divided into fixed-sized pages
Pages are swapped frequently
Processes share the same memory
A TLB (Translation Lookaside Buffer) is used to:
Speed up address translation
Allocate memory dynamically
Perform page replacement
Reduce external fragmentation
The "working set" model is used to:
Predict future page references
Measure CPU utilization
Detect deadlocks
Optimize process scheduling
Page replacement policies aim to:
Minimize CPU overhead
Minimize page faults
Eliminate external fragmentation
Improve disk access speed
Which of the following is not an attribute of a file?
File name
File size
File access control
File disk allocation
Which of the following file operations does not involve modifying the contents of the file?
Write
Delete
Read
Append
Which file type is generally used for storing executable programs?
Data files
Directory files
Executable files
Configuration files
Which access method is used for sequential reading of data in a file?
Direct access
Indexed access
Sequential access
Random access
What is the purpose of file protection mechanisms?
To ensure integrity and restrict unauthorized access
To improve file access time
To allocate memory to files
To compress file content
Which of the following is not a valid file type in file systems?
Regular files
Directory files
Socket files
Reserved files
The 'access time' of a file refers to:
The time it takes to write data to the file
The time it takes to read data from the file
The time required to find the file
The total time for all operations on the file
Which of the following is the main difference between a file and a directory?
A file stores data, while a directory stores other files and directories
A file cannot be accessed sequentially, while a directory can
A file has a fixed size, while a directory has a variable size
A file can store only text, while a directory can store binary data
Which data structure is most commonly used for implementing a file directory?
Linked list
Hash table
Binary tree
Inverted list
Which file allocation method minimizes external fragmentation?
Contiguous allocation
Linked allocation
Indexed allocation
File block allocation
In which allocation method does the file allocation table (FAT) play a central role?
Contiguous allocation
Linked allocation
Indexed allocation
Hybrid allocation
Which of the following is an advantage of indexed allocation over contiguous allocation?
Faster file access
Lower external fragmentation
Easier to implement
Lower internal fragmentation
Which of the following directory implementation methods supports efficient searching?
Linear list
Hash table
Binary search tree
Linked list
In a directory structure, what is the function of a root directory?
It stores all files in the system
It points to the file system metadata
It acts as the starting point for directory traversal
It stores the file allocation table
Which of the following file allocation methods suffers the most from external fragmentation?
Contiguous allocation
Linked allocation
Indexed allocation
Hybrid allocation
What is the main disadvantage of using contiguous file allocation?
Internal fragmentation
High overhead for file operations
External fragmentation
Complex directory structure
Which of the following is not a type of disk storage device?
Magnetic disks
Solid-state disks
Optical disks
Dynamic RAM
Which disk scheduling algorithm minimizes seek time in disk access operations?
First Come First Serve (FCFS)
Shortest Seek Time First (SSTF)
Elevator algorithm (LOOK)
Circular algorithm
In disk scheduling, the SCAN algorithm is also known as the:
Shortest Seek Time First
LOOK algorithm
Elevator algorithm
Circular algorithm
Which of the following is a characteristic of solid-state disks (SSDs) over magnetic disks?
Higher access time
Higher durability
Larger storage capacity
Slower read/write speeds
Which of the following is true for magnetic disks?
Magnetic disks provide faster data access than SSDs
Magnetic disks have no moving parts
Magnetic disks are more durable than SSDs
Magnetic disks use magnetic heads to read/write data
Which of the following disk scheduling algorithms can be described as moving the disk arm toward the end of the disk and then reversing direction when the end is reached?
SCAN
LOOK
C-SCAN
FCFS
The primary advantage of using disk formatting is:
To reduce disk fragmentation
To initialize the disk and prepare it for use
To optimize the disk read/write speeds
To manage the disk sectors efficiently
Which of the following is an advantage of solid-state disks (SSDs) over magnetic disks?
Higher storage capacity
No mechanical parts
Slower read/write speeds
More prone to wear and tear
In the disk structure, the tracks are divided into smaller units known as:
Sectors
Blocks
Clusters
Pages
Which of the following is a method for managing data in a magnetic disk?
Disk partitioning
Data mirroring
Disk defragmentation
Disk formatting
Which of the following techniques is used to allocate data evenly across multiple disks?
Disk striping
Disk mirroring
Disk RAID
Disk formatting
The term "seek time" refers to:
The time it takes to rotate the disk
The time taken to access a specific sector of the disk
The time to format the disk
The time taken to read the data
In a disk drive, the term "cylinder" refers to:
A group of sectors on a single track
A set of tracks that lie at the same position on different platters
A group of platters stacked together
The number of tracks on a single platter
Which of the following is the most widely used disk scheduling algorithm in modern operating systems?
FCFS
SSTF
SCAN
C-SCAN
