Questions & Answers of Processes, Threads

Question No. 18

Threads of a process share 

Question No. 27

A multithreaded program P executes with x number of threads and uses y number of locks for ensuring mutual exclusion while operating on shared memory locations. All locks in the program are non-reentrant, i.e., if a thread holds a lock l, then it cannot re-acquire lock l without releasing it. If a thread is unable to acquire a lock, it blocks until the lock becomes avilable. The minimum value of x and the minimum value of y together for which execution of P can result in a deadlock are:

Question No. 107

Which of the following is/are shared by all the threads in a process?

I. Program counter

II. Stack

III. Address space

IV. Registers

Question No. 30

Consider an arbitrary set of CPU-bound processes with unequal CPU burst lengths submitted at the same time to a computer system. Which one of the following process scheduling algorithms would minimize the average waiting time in the ready queue?

Question No. 214

The maximum number of processes that can be in Ready state for a computer system with n CPUs is

Question No. 30

Which one of the following is FALSE?

Question No. 8

A process executes the code


The total number of child processes created is

Question No. 6

Let the time taken to switch between user and kernel modes of execution be t1 while the time taken to switch between two processes be t2. Which of the following is TRUE?

Question No. 11

A computer handles several interrupt sources of which the following are relevant for this question.

• Interrupt from CPU temperature sensor (raises interrupt if CPU temperature is too high)

• Interrupt from Mouse (raises interrupt if the mouse is moved or a button is pressed)

• Interrupt from Keyboard (raises interrupt when a key is pressed or released)

• Interrupt from Hard Disk (raises interrupt when a disk read is completed)

Which one of these will be handled at the HIGHEST priority?

Question No. 16

A thread is usually defined as a "light weight process" because an operating system (OS) maintains smaller data structures for a thread than for a process. In relation to this, which of the following is TRUE?

Question No. 32

In the following process state transition diagram for a uniprocessor system, assume that there are always some processes in the ready state:

Now consider the following statements:

I. If a process makes a transition D, it would result in another process making transition A immediately.
II. A process P2 in blocked state can make transition E while another process P1 is in running state.
III. The OS uses preemptive scheduling.
IV. The OS uses non-preemptive scheduling.

Which of the above statements are TRUE?

Question No. 17

Which of the following system calls results in the sending of SYN packets?

Question No. 64

Which of the following statements about synchronous and asynchronous I/O is NOT true?

Question No. 66

A process executes the following code

for (i = 0; i < n; i + +)   fork ( );

The total number of child processes created is

Question No. 17

Consider the following statements about user level threads and kernel level threads. Which one of the following statements is FALSE?

Question No. 55

An operating system uses Shortest Remaining Time first (SRT) process scheduling algorithm. Consider the arrival times and execution times for the following processes:

Process Execution
P1 20 0
P2 25 15
P3 10 30
P4 15 45

What is the total waiting time for process P2?