Operating System MCQs - Processes, CPU Scheduling and Deadlocks (Set 1)

Operating System MCQs - Processes, CPU Scheduling and Deadlocks (Set 1) - CodingHumans

This set covers the core Operating System topics asked in GATE, placement tests and university exams: process states, context switching, CPU scheduling algorithms, synchronisation and deadlocks.

How to practise: read each question and tap the option you think is correct. You will see right away whether you got it, along with a short explanation, and your score is tracked at the bottom of the screen. This set has 16 questions.

Q1. Which of these is NOT a standard process state?

a) Ready

b) Running

c) Waiting (Blocked)

d) Compiling

Q2. Where does the operating system keep a process's state, program counter and register values?

a) Page table

b) Process Control Block (PCB)

c) File allocation table

d) Interrupt vector

Q3. Saving the state of the current process and loading the saved state of another is called:

a) Swapping

b) Context switching

c) Paging

d) Spooling

Q4. Which scheduling algorithm can cause the convoy effect?

a) First Come First Served (FCFS)

b) Round Robin

c) Shortest Remaining Time First

d) Multilevel feedback queue

Q5. Which algorithm gives the minimum average waiting time for a given set of processes that all arrive at time 0?

a) FCFS

b) Shortest Job First (SJF)

c) Round Robin

d) Priority scheduling with random priorities

Q6. Three processes arrive at time 0 with CPU bursts P1 = 6, P2 = 2, P3 = 4. Using SJF, what is the average waiting time?

a) 2.67

b) 3.33

c) 4.67

d) 6

Q7. Round Robin scheduling is mainly designed for:

a) Batch systems

b) Time-sharing (interactive) systems

c) Real-time hard deadlines only

d) Single-process systems

Q8. In Round Robin, if the time quantum is made very large, the algorithm behaves like:

a) SJF

b) FCFS

c) Priority scheduling

d) Shortest Remaining Time First

Q9. Starvation in priority scheduling is commonly solved by:

a) Aging

b) Paging

c) Thrashing

d) Spooling

Q10. Which of the following is NOT one of the four necessary conditions for deadlock?

a) Mutual exclusion

b) Hold and wait

c) Preemption

d) Circular wait

Q11. The Banker's algorithm is used for:

a) Deadlock prevention

b) Deadlock avoidance

c) Deadlock detection only

d) CPU scheduling

Q12. A semaphore whose value can only be 0 or 1 is called a:

a) Counting semaphore

b) Binary semaphore

c) Monitor

d) Spinlock

Q13. The part of a program where shared resources are accessed is called the:

a) Critical section

b) Entry section

c) Kernel section

d) Remainder section

Q14. A process that has finished execution but still has an entry in the process table because its parent has not read its exit status is a:

a) Orphan process

b) Zombie process

c) Daemon process

d) Idle process

Q15. Which system call creates a new process in UNIX/Linux?

a) exec()

b) fork()

c) spawn()

d) create()

Q16. Threads of the same process share which of the following?

a) Stack

b) Program counter

c) Registers

d) Code and global data (address space)

Recommended MCQs

More Operating Systems posts on CodingHumans

All MCQ sets

MCQ Practice hub - every subject in one place

Comments

Answered 0/0Correct 0