GATE CS Processes and Threads questions
Practise Processes and Threads questions for GATE CS. Explore official PYQs and original topic-wise quizzes, check answers and view available solutions. Free, no sign-in.
Subject, topic, year and type filter the full library. Match any choice within a filter, and all selected filter categories. Search, source and sort apply to this page.
17 on this page
Which of the following statements about threads is/are TRUE?
Consider the following two threads and that update two shared variables and . Assume that initially . Though context switching between threads can happen at any time, each statement of or is executed atomically without interruption. …
Consider a process running on a . Which one or more of the following events will always trigger a context switch by the that results in process moving to a non-running state (e.g., ready, blocked)?
Which one or more of the following need to be saved on a context switch from one thread of a process to another thread of the same process?
Consider the following multi-threaded code segment (in a mix of C and pseudo-code), invoked by two processes and , and each of the processes spawns two threads and : int x = 0; // global Lock L1; // global main () { create a thread to execute foo(); // Thread T1 create a thread to execute foo(); // Thread T2 wait for the …
Threads of a process share
Which of the following is/are shared by all the threads in a process? Program counter Stack Address space Registers
Which one of the following is FALSE?
A thread is usually defined as a "light weight process" because an Operating System (OS) maintains smaller data structure for a thread than for a process. In relation to this, which of the following statement is TRUE?
Let the time taken to switch from user mode to kernel mode of execution be while time taken to switch between two user processes be . Which of the following is correct?
Consider the following statements about user level threads and kernel level threads. Which one of the following statements is FALSE?
Consider the following statements with respect to user-level threads and kernel-supported threads context switch is faster with kernel-supported threads for user-level threads, a system call can block the entire process Kernel supported threads can be scheduled independently User level threads are transparent to the kernel Which of the above statements are …
Which combination of the following features will suffice to characterize an OS as a multi-programmed OS? More than one program may be loaded into main memory at the same time for execution If a program waits for certain events such as I/O, another program is immediately scheduled for execution If the execution of a program terminates, another program is …
Which of the following does not interrupt a running process?
Which of the following need not necessarily be saved on a context switch between processes?
Which of the following actions is/are typically not performed by the operating system when switching context from process to process ?
The process state transition diagram in the below figure is representative of
