Question

11. Draw the process state transition diagram that involves new, ready, running, block/wait, suspend ready, and...

11. Draw the process state transition diagram that involves new, ready, running, block/wait, suspend ready, and suspend block/wait states. You may copy from the Powerpoint slides posted on Blackboard. However, you need to explain the following information in your own words. Only reproducing the diagram will not give you any points. (4 points)

a) Explain each state where it is located (disk or memory)

b) What are the roles of short term (ST), long term (LT), and Medium term (MT) schedulers? Which type of scheduler is responsible for swapping? Which one controls degree of multiprogramming?

c) Explain each transition of the process from one state to another state

0 0
Add a comment Improve this question Transcribed image text
Answer #1

a)

new: In this step, the process is about to be created but not yet created, it is the program which is present in secondary memory that will be picked up by OS to create the process.

ready: Ready to run. After the creation of a process, the process enters the ready state i.e. the process is loaded into the main memory. The process here is ready to run and is waiting to get the CPU time for its execution. Processes that are ready for execution by the CPU are maintained in a queue for ready processes.

running: The process is chosen by CPU for execution and the instructions within the process are executed by any one of the available CPU cores.

Blocked or wait: Whenever the process requests access to I/O or needs input from the user or needs access to a critical region(the lock for which is already acquired) it enters the blocked or wait state. The process continues to wait in the main memory and does not require CPU. Once the I/O operation is completed the process goes to the ready state.

terminated or completed: Process is killed as well as PCB is deleted. Process Control Block(PCB) is a data structure in the operating system kernel containing the information needed to manage the scheduling of a particular process.

suspend ready: Process that was initially in the ready state but were swapped out of main memory and placed onto external storage by scheduler are said to be in suspend ready state. The process will transition back to ready state whenever the process is again brought onto the main memory. This generally happens when there is lack of storage in man memory.

suspend blocked: Similar to suspend ready. A process can be suspended for a number of reasons; the most significant of which arises from the process being swapped out of memory by the memory management system in order to free memory for other processes. Other common reasons for a process being suspended are when one suspends execution while debugging a program, or when the system is monitoring processes.
When work is finished it may go to suspend ready.

A process in the SUSPEND BLOCKED* state is moved to the SUSPEND READY state when the event for which it has been waiting occurs.

b)

long term scheduler: It is also called job scheduler. A long-term scheduler determines which programs are admitted to the system for processing. It selects processes from the queue and loads them into memory for execution. Process loads into the memory for CPU scheduling. Primary aim of the Job Scheduler is to maintain a good degree of Multiprogramming. An optimal degree of Multiprogramming means the average rate of process creation is equal to the average departure rate of processes from the execution memory.

short term scheduler: It is also called as CPU scheduler. Its main objective is to increase system performance in accordance with the chosen set of criteria. It is the change of ready state to running state of the process. CPU scheduler selects a process among the processes that are ready to execute and allocates CPU to one of them.

Short-term schedulers, also known as dispatchers, make the decision of which process to execute next. Short-term schedulers are faster than long-term schedulers.

medium term scheduler: Medium-term scheduling is a part of swapping. It removes the processes from the memory. It reduces the degree of multiprogramming. The medium-term scheduler is in-charge of handling the swapped out-processes.

A running process may become suspended if it makes an I/O request. A suspended processes cannot make any progress towards completion. In this condition, to remove the process from memory and make space for other processes, the suspended process is moved to the secondary storage. This process is called swapping, and the process is said to be swapped out or rolled out. Swapping may be necessary to improve the process mix.

as already explained above

medium term scheduler is responsible for swapping

long term scheduler controls the degree of multi programming

c)

new processes enter into the new state

when a process is ready to execute enters into the ready state

if that process requires any i/o operation to be done then that will be moved to the blocked state, if there is lack of storage in main memory that process will be moved to suspend blocked state

when the i/o is completed then that process again moved to ready state

when i/o operation of the process in suspend blocked completes it will be moved to suspend ready or blocked state (according the situation will happen)

processes will be moved from suspend ready to ready when that is moved again to main memory from secondary memory

when the process completes its execution then it exits

Add a comment
Know the answer?
Add Answer to:
11. Draw the process state transition diagram that involves new, ready, running, block/wait, suspend ready, and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT