Operating systems miscellaneous


Operating systems miscellaneous

  1. Consider the following statements about user level threads and kernel level threads :
    Which one of the following statements if false?









  1. View Hint View Answer Discuss in Forum

    Blocking one kernel level threads does not block all related threads. In kernel level threads, in blocking system call, it can happen with the kernel that another thread is scheduled while kernel is executing.

    Correct Option: D

    Blocking one kernel level threads does not block all related threads. In kernel level threads, in blocking system call, it can happen with the kernel that another thread is scheduled while kernel is executing.


  1. A process executes the following code for (i = 0 ; i < n; i ++) for ();
    The total number of child processes created is









  1. View Hint View Answer Discuss in Forum

    We know that the total number of processes is 2n but we subtract the main process therefore, total number of children = 2(n – 1) .

    Correct Option: B

    We know that the total number of processes is 2n but we subtract the main process therefore, total number of children = 2(n – 1) .



  1. 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:
    1. If a process makes a transition D, it would result in another process making transition A immediately.
    2. A process P2 is blocked state can make transition E while another process P1 is in running state.
    3. The operating system uses pre-emptive scheduling.
    4. The operating system uses non-pre-emptive scheduling. Which of the above statements are true?









  1. View Hint View Answer Discuss in Forum

    1. is false. If a process makes a transition D, it would result in another process making transition B, not A. 2. is true. A process can move to ready state when I/O completes irrespective of other process being in running state or not.
    3. is true because there is a transition from running to ready state.
    4. is false as the OS uses preemptive scheduling

    Correct Option: C

    1. is false. If a process makes a transition D, it would result in another process making transition B, not A. 2. is true. A process can move to ready state when I/O completes irrespective of other process being in running state or not.
    3. is true because there is a transition from running to ready state.
    4. is false as the OS uses preemptive scheduling


  1. 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?









  1. View Hint View Answer Discuss in Forum

    t1 < t2
    Process switching involves mode switch. Context switching can occur only in kernel mode.

    Correct Option: C

    t1 < t2
    Process switching involves mode switch. Context switching can occur only in kernel mode.



  1. 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?









  1. View Hint View Answer Discuss in Forum

    Threads are called 'light weight process' because they only need storage for stack and registers. They don't need separate space for other things like code segment, global data, etc.

    Correct Option: A

    Threads are called 'light weight process' because they only need storage for stack and registers. They don't need separate space for other things like code segment, global data, etc.