Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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++; coutStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started