Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider an operating system that executes within user processes. Consider (1) a procedure call that passes in two arguments and returns a result, and (2)
- Consider an operating system that executes within user processes. Consider (1) a procedure call that passes in two arguments and returns a result, and (2) a system call that passes in one argument of type char and displays the character (e.g., E) on the screen. Both the procedure and the system call are executed in process P1, and each take a little less than a time slice. Consider that after P1, process P2 is in the ready queue. After execution, P1 will join the ready queue. No other processes are in the ready queue.
Using diagrams and explanations answer the following questions:
- Enumerate the steps performed in the case of the procedure call. Assume that the procedure is called during the first half of a time slice and returns in the same time slice.
- Enumerate the steps performed in the case of the procedure call. Assume that the procedure is called during the second half of a time slice and returns in the next time slice assigned to P1.
- Enumerate the steps performed in the case of the system call. Consider that the system call is called during the second half of a time slice and finishes in the next time slice assigned to P1.
- Which is more expensive: the procedure call or the system call if a) return is in the same time slice b) return is in a different time slice? Why? Elaborate.
Step 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