MCQ in operating systems with answers, OS interview questions, solved Gate questions in OS


Operating Systems Multiple Choice Questions - Set 7



1. Which of the following is a disadvantage of user level threads?

(a) User-level thread does not require modification to operating systems.
(b) Thread switching is not expensive than a procedure call.
(c) User-level threads can be implemented on a OS that does not support threads.
(d) User level threads require non blocking system calls

Click here to view answer and explanation

 
2. What is normally meant by a “context switch”?

(a) Any change in state of a process as it executes.
(b) Saving the state of one process and restoring the state of another process so that the CPU moves from running one process to running the other.
(c) The switch between a process running in user mode to running in kernel mode. This can happen as the result of a system call or an exception.
(d) The change which occurs on the stack of a running process as it makes a function call, including the allocation of memory for any parameters and the local variables.

Click here to view answer and explanation


3. Given three processes A, B, and C with corresponding burst times 20, 5, and 2, what is the average waiting time with a first come first served (FCFS) scheduler? All processes are ready to run at the same time but they arrived in the order A, B, then C.

(a) 3
(b) 15
(c) 9
(d) 25

Click here to view answer and explanation


4. Which of the following is NOT an advantage of system-level threads over user-level threads?

(a) Threads from the same process can run simultaneously on different cores/processors
(b) Each thread can be scheduled separately
(c) Switching between threads is faster
(d) Blocking threads don’t stop the entire process

Click here to view answer and explanation


5. The definition “an instance of a program in execution” best applies to which of the following?

(a) a thread
(b) a process
(c) a system-level resource
(d) a user-level resource

Click here to view answer and explanation


****************