8. In a multi-tasking OS (such as Linux or MacOS) a process may be “Running” but
ID: 3899635 • Letter: 8
Question
8. In a multi-tasking OS (such as Linux or MacOS) a process may be “Running” but before completing is moved to “Ready” or “Wait”. When would that happen?
9. Creating and saving files takes time. The amount of time varies greatly depending on the system used. There is a Unix utility program “echo”, used like “echo a >b” which creates a file called “b” with the file contents being the single letter “a”. (the “a” can be any letter or word, the b can be any file name). We want to create files with names “00.txt” through “99.txt” each with the contents of it’s name (“00.txt” has contents 00) in the subdirectory “test” (which you create), and calculate and print how many seconds that takes. Then delete all the files created.
Explanation / Answer
Please Note: As per Chegg Answering Guidelines, I have answered the first question. Please Post Separate for Separate Questions.
Q8)
Answer)
In a multi-tasking OS, a process may have several states such as:
“Running”
“Ready”
“Wait” etc.
Now the question is when the process is in “Running” state but goes into the “Ready” state. This occurs when the OS uses a preemptive schedule where the process puts on hold the currently executing process and selects another process to execute instead by preempting the currently executing process which is moved from Running to Ready State.
Now the case where “Running” state process is moved to “Wait” may occur in cases where the process running goes into Waiting when the process needs to perform and waiting for the IO operations or is waiting for some event to occur which will trigger the Waiting state.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.