0% found this document useful (0 votes)
5 views4 pages

OS MCQS123

The document contains a series of questions and answers related to operating system concepts, including process scheduling, deadlock, memory management, concurrency, file systems, and disk scheduling algorithms. Each question is presented with multiple-choice options, and the correct answer is indicated. It serves as a study guide or quiz format for understanding key operating system principles.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views4 pages

OS MCQS123

The document contains a series of questions and answers related to operating system concepts, including process scheduling, deadlock, memory management, concurrency, file systems, and disk scheduling algorithms. Each question is presented with multiple-choice options, and the correct answer is indicated. It serves as a study guide or quiz format for understanding key operating system principles.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

Question Statement Option One Option Two Option Three Option Four

Correct Option
Which of the following best describes a process in an operating system?
Program in execution Stored program Instruction Procedure A
What is the main objective of scheduling algorithms in OS? Maximize CPU utilization
Minimize memory usage Increase system calls Reduce network latency A
Which scheduling policy selects the process that arrives first? Shortest Job First
First-Come First-Served Priority Scheduling Round Robin B
What does SJF stand for in process scheduling? Simple Job Finish Shortest Job First
Shortest Jump First Simple Job First B
"In STCF, a process with ____ is scheduled next." Longest remaining time
Shortest remaining time Highest priority Lowest priority B
Which scheduling algorithm assigns time slices to each process? Priority
Scheduling Round Robin MLFQ First-Come First-Served B
Which of these is not a process scheduling metric? Turnaround Time Waiting Time
Response Time Execution Instruction D
Turnaround time is calculated as: Finish Time - Arrival Time Arrival Time -
Start Time Start Time - Finish Time Finish Time - Execution Time A
Which scheduling method favors shorter jobs? FIFO SJF Priority Scheduling
Round Robin B
"In Priority Scheduling, the CPU is assigned to the process with:" Lowest ID
Highest priority Lowest priority Longest execution time B
Round Robin scheduling is most suitable for: Batch systems Real-time systems
Time-sharing systems Multiprocessing systems C
Which one is not a necessary condition for deadlock? Mutual Exclusion Hold and
Wait No Preemption Interruptible execution D
Which of the following can lead to a deadlock? Mutual exclusion Preemption
Spooling Thread yielding A
Deadlock prevention can be achieved by eliminating: Hold and Wait condition All
threads Semaphores Memory paging A
Deadlock avoidance is implemented using which method? Resource Allocation Graph
Bankers Algorithm Spinlocks Mutex B
Which algorithm is used for deadlock avoidance? Banker's Algorithm Dijkstra's
Algorithm Kruskal's Algorithm Floyd's Algorithm A
What happens in a circular wait deadlock? Each process waits for a resource held by
next process A resource is not released A process locks two resources
Resources are infinitely produced A
What is a safe state in deadlock avoidance? A state where deadlock is
impossible A state where deadlock has occurred A state where processes are
terminated A state with all resources free A
Which of the following is a non-preemptive scheduling algorithm? Round Robin
Priority Scheduling First-Come First-Served MLFQ C
Which scheduling metric measures the time a process spends waiting in the ready
queue? Turnaround Time Waiting Time Response Time Execution Time
B
Which scheduling policy allows a running process to be interrupted? Non-
preemptive Preemptive Sequential Serial B
"In Priority Scheduling, which process gets scheduled first if two processes have
the same priority?" First entered Last entered Shortest job
Longest job A
"In MLFQ, a process using more CPU is moved to:" Lower priority queue Higher
priority queue Suspended state Blocked state A
Which of the following is an example of starvation? A low-priority process
waiting indefinitely A deadlock situation A preemptive switch A blocked
thread A
What defines Response Time in a process? First Response - Arrival Time First
Response - Completion Time First CPU Allocation - Arrival Time Execution Time
A
A job arrives at time 2 ms and completes at 12 ms. What is the turnaround time?
10 ms 12 ms 8 ms 6 ms A
"Process P1 needs 4 ms CPU time, P2 needs 3 ms CPU time, both arrive at same time.
FCFS average waiting time?" 1.5 ms 2 ms 3 ms 3.5 ms B
"In SJF, processes have burst times 5ms, 3ms, 8ms. Average turnaround time is
closest to:" 9 ms 10 ms 11 ms 12 ms B
"Given 3 processes with arrival times (0ms, 2ms, 4ms) and burst times (5ms each),
average waiting time with FCFS?" 5 ms 4 ms 6 ms 7 ms B
"In RR with quantum 4 ms, P1 burst=10ms. How many times is P1 scheduled before
completion?" 2 3 4 5 B
"In Priority Scheduling, if P1(priority=2) and P2(priority=1), which executes
first?" P1 P2 Random Depends on Arrival B
Deadlock can occur if system has ___ resources and ___ processes. "More, Less"
"Equal, Equal" "Less, More" None C
"Process P1 arrives at 0ms needs 7ms CPU, P2 arrives at 2ms needs 4ms CPU. In FCFS,
what is average turnaround time?" 10ms 13ms 12ms 11.5ms D
"If Turnaround Time = 20ms, Waiting Time = 12ms, what is CPU burst time?" 8ms
10ms 12ms 14ms A
What is the main function of the main memory? Store data permanently Temporary
storage of data and instructions Perform calculations Manage I/O devices
B
Which memory allocation technique suffers from external fragmentation? Paging
Segmentation Contiguous Memory Allocation Virtual Memory C
Which dynamic memory allocation algorithm searches the entire list for the smallest
free suitable partition? First Fit Best Fit Worst Fit Next Fit B
"In contiguous memory allocation, which method allocates memory blocks first that
fit the process size?" First Fit Best Fit Worst Fit Next Fit A
Paging helps in solving which of the following problems? External Fragmentation
Internal Fragmentation Both None A
The mapping from logical to physical address is done by: CPU Operating System
Memory Management Unit Compiler C
Which algorithm replaces the page that has not been used for the longest period of
time? FIFO LRU Optimal NONE B
"In FIFO page replacement, which page is removed?" Oldest loaded page Least
used page Random page Smallest page A
"A system has 4 frames. A page reference string 1,2,3,4,1,2,5. How many page faults
with FIFO?" 4 5 6 7 B
"If a system uses LRU replacement, the least recently accessed page is:"
Replaced Locked Moved Pinned A
Which of the following is a fixed partition allocation scheme? Paging
Segmentation Contiguous Allocation Virtual Memory A
The main advantage of dynamic partitioning over fixed partitioning is: Less
complexity Less fragmentation Better utilization Less memory requirement
C
External fragmentation occurs in: Paging Contiguous Memory Allocation
Virtual Memory Pure Demand Paging B
"In FIFO page replacement, increasing number of frames sometimes increases page
faults. This is called:" Thrashing Belady's Anomaly Overhead
Fragmentation B
Which memory management scheme requires relocation of processes during execution?
Segmentation Swapping Paging Contiguous Allocation B
Page replacement occurs when: A process requests a page not in memory Page is
removed from main memory A page is loaded into memory from disk Frame is
locked A
"In contiguous memory allocation, which strategy always allocates the largest
available block?" First Fit Best Fit Worst Fit Next Fit C
"In paging, what is the main advantage compared to contiguous memory allocation?"
Eliminates internal fragmentation Increases execution speed Reduces page
faults Eliminates external fragmentation D
The basic unit of data exchange between secondary memory and main memory is called:
Segment Frame Block Page D
What is concurrency in operating systems? Multiple tasks running simultaneously
Single task execution Single-threaded processing Sequential processing
A
Which of the following helps manage concurrency? Deadlock Lock Cache
Virtual memory B
A lock is used to: Prevent unauthorized access Ensure exclusive access to a
shared resource Increase CPU speed Manage disk scheduling B
What is a critical section? A section of code accessing shared resources A
program header A memory location A CPU register A
Which of the following is NOT a lock-based synchronization mechanism? Spinlock
Mutex Semaphore Cache D
What is a mutex? A mutual exclusion object A memory address An interrupt
handler A paging algorithm A
When does a thread spin in a spinlock? While waiting to acquire the lock When
releasing the lock When scheduling While executing critical section A
Which condition must be satisfied for mutual exclusion? Only one thread can
access the critical section at a time Multiple threads access simultaneously
All threads must sleep Threads must terminate A
Which function is commonly associated with condition variables? wait()
execute() release() fork() A
Which two operations are associated with condition variables? lock and unlock
wait and signal create and destroy read and write B
What is a semaphore? An encryption algorithm A scheduling method A type of
memory A signaling mechanism D
A binary semaphore can take values: Any integer 0 and 1 0 and 2 1 and 2
B
What is a file system interface responsible for? Managing files and
directories Memory management Network communication Managing disk blocks B
Which operation creates a new file? mkdir create link open B
Which system call is used to open a file in C? open() close() fork()
unlink() A
Which system call reads data from a file? read() open() write() fork()
A
Which system call writes data to a file? write() read() fork() dup()
A
The fork() system call is used to: Create new processes Duplicate a file
descriptor Clone a memory segment Copy file content A
The dup() system call is used to: Copy file content Create a process Create a new
memory block D
Which command deletes a directory? rmdir mkdir unlink cd A
Which system call removes a file in UNIX? unlink() open() mkdir() link()
A
What happens to open file descriptors after fork()? They are duplicated They
are copied independently They are closed They are deleted A
Which operation lists files in a directory? rmdir mkdir rm ls D
Which data structure stores metadata about a file in UNIX? data block inode file
content buffer B
Which operation must happen before writing to a file? Opening the file Deleting the
file Forking a process Closing another file A
Which of the following is used to organize files? Superblock inode Directory
Scheduler C
Which is NOT a disk scheduling algorithm? SSTF Round Robin LOOK SCAN B
Which algorithm services request closest to current head position? SSTF FCFS
SCAN LOOK A
Purpose of disk scheduling is: Increase memory Maximize CPU load Reduce seek
time Save bandwidth C
Which scheduling moves head from one end to another and back? LOOK SSTF SCAN
FCFS C
What does SCAN algorithm do? Moves disk head in one direction then back Jumps
to first request Moves head randomly Only moves clockwise A
Why is C-SCAN better than SCAN? Provides uniform wait time Moves faster
Reduces CPU load Skips requests A
Which algorithm gives best average seek time? SSTF SCAN C-SCAN LOOK A

You might also like