Question: Old MathJax webview This question is from Computer Science. 23 As a process executes, it changes its state. The state of a process is defined
Old MathJax webview


This question is from Computer Science.
23 As a process executes, it changes its state. The state of a process is defined in part by the current activity of that process. Draw a process state diagram. A process P changes its state as mentioned in the table below. Perform the following- a) Identify each state of the process P (S. No. 1-5) b) In the process diagram, mark each state of the Process P (S.No. 1-5). S. No Current Activity 1 P arrives in main memory 2 P starts execution 3 Process Q preempts P 4 P resumes execution 5 P needs to accept some input from user Consider the following code, for creating a child process using fork() system call. Mention the value of 'a' printed by each process at statement (1), (2) and (3). Explain your answer with the help of a parent-child tree diagram. - void main() { int a = 7; int pid1 = fork(); if ( pidl == 0 ) { a++; cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
