Process-Threads

Question 1
User level threads are threads that are visible to the programmer and are unknown to the kernel. The operating system kernel supports and manages kernel level threads. Three different types of models relate user and kernel level threads. Which of the following statements is/are true ?
(a) (i) The Many - to - one model maps many user threads to one kernel thread
    (ii) The one - to - one model maps one user thread to one kernel thread
    (iii) The many - to - many model maps many user threads to smaller or equal kernel threads
(b) (i) Many - to - one model maps many kernel threads to one user thread
    (ii) One - to - one model maps one kernel thread to one user thread
    (iii) Many - to - many model maps many kernel threads to smaller or equal user threads
A
(a) is true; (b) is false
B
(a) is false; (b) is true
C
Both (a) and (b) are true
D
Both (a) and (b) are false
Question 1 Explanation: 

Question 2
If an operating system does not allow a child process to exist when the parent process has been terminated, this phenomenon is calls as-
A
Threading
B
Cascading termination
C
Zombie termination
D
Process killing
Question 2 Explanation: 
Whenever the process finishes executing its final statement and asks the operating system to delete it by using exit() system call.
If a process terminates either normally or abnormally, then all its children have to be terminated. This concept is referred to as cascading termination.
Question 3
Five jobs A, B, C, D and E are waiting in Ready Queue. Their expected runtimes are 9, 6, 3,5 and x respectively. All jobs entered in Ready queue at time zero. They must run in _____order to minimize average response time if 3 < x < 5.
A
B, A, D, E, C
B
C, E, D, B, A
C
E, D, C, B, A
D
C, B, A, E, D
Question 3 Explanation: 
Shortest job first is the way to minimize average response time.
0 < X ≤ 3: X, 3, 5, 6, 9
3 < X ≤ 5: 3, X, 5, 6, 9
5 < X ≤ 6: 3, 5, X, 6, 9
6 < X ≤ 9: 3, 5, 6, X, 9
X > 9: 3, 5, 6, 9, X
C, E, D, B, A
So, option B is correct.
Question 4
Which module gives control of the CPU to the process selected by the short - term scheduler ?
A
Dispatcher
B
Interrupt
C
Schedular
D
Threading
Question 4 Explanation: 
The CPU-scheduling function is the dispatcher, which is the module that gives control of the CPU to the process selected by the short-term scheduler. It receives control in kernel mode as the result of an interrupt or system call. The functions of a dispatcher involve the following:
1. Context switches, in which the dispatcher saves the state (also known as context) of the process or thread that was previously running; the dispatcher then loads the initial or previously saved state of the new process.
2. Switching to user mode.
3. Jumping to the proper location in the user program to restart that program indicated by its new state.
The dispatcher should be as fast as possible, since it is invoked during every process switch. During the context switches, the processor is virtually idle for a fraction of time, thus unnecessary context switches should be avoided. The time it takes for the dispatcher to stop one process and start another is known as the dispatch latency.
There are 4 questions to complete.

Access quiz wise question and answers by becoming as a solutions adda PRO SUBSCRIBER with Ad-Free content

Register Now

If you have registered and made your payment please contact solutionsadda.in@gmail.com to get access