2019529628044_PATIENCE FERO_Homework_2 Version 0 | |
👤 Author: by feropatienceoutlookcom 2021-09-21 15:20:15 |
Program and process have a close relation because :
Program contains a set of instructions designed to complete a specific task. And it is a passive entity as it resides in the secondary memory. Programs exists at a single place and continues to exist until it is deleted. while Process is an instance of an executing program. And it is a active entity as it is created during execution and loaded into the main memory. Process exists for a limited span of time as it gets terminated after the completion of task.
Because if all the processes in the Not-running state are ready for execution but this may not be true. Some processes in the Not-running state might be waiting for some event or I/O operation. Thus, the dispatcher cannot simply select the process from the front of the queue. The dispatcher would have to scan the queue to search for the process to execute. It degrades performance. Because a large number of processes can lead to thrashing which results in low CPU utilization. The CPU only keeps some information about the new process in the main memory. The program is not yet loaded. The program waits for long term scheduler to move it to the main memory. So the best way to solve this problem is to split the Not-running state into two states: Ready State and Blocked State.
Please login to reply. Login