Professional Documents
Culture Documents
Process: 8/26/2022 Dr. Kanthi.M, Professor, ECE Dept., MIT 1
Process: 8/26/2022 Dr. Kanthi.M, Professor, ECE Dept., MIT 1
Process: 8/26/2022 Dr. Kanthi.M, Professor, ECE Dept., MIT 1
• The OS must allocate resources to processes in conformance with a specific policy while
at the same time avoiding deadlock.
A process consists of a program code and associated data plus control block
When a new process is CREATED the OS builds the data structures that are used to manage
the process and allocates address space in main memory to the process.
• In interactive environment, a process is created when a new user attempts to log on.
This using a single queue, the dispatcher could not just select the process at the oldest end of the
queue.
Solutions:
Rather, dispatcher would have to scan the list blocking for the process that has been in the queue
the longest.
This could be possible by splitting not running state in to TWO states: READY and BLOCKED.
When the event occurs, all the processes in the Blocked queue, waiting for that event are
moved to the Ready queue.
8/26/2022 Dr. Kanthi.M, Professor, ECE Dept., MIT 18
8/26/2022 Dr. Kanthi.M, Professor, ECE Dept., MIT 19
The OS must scan the entire blocked queue, when an event occurs, searching for those
processes waiting on that event.
In a large OS, there will be more number of events, and hence it would be more efficient to
have number of queues, one for each event.
Flaws:
Processor is much faster than the I/O, and it is common for all of the processes in memory to
be waiting for an I/O.
By memory (main) expansion, cost will be increased.
Solution:
Swapping, which involves moving part or all of the process from main memory to disk.
( NOTE:- Time consuming but disk I/O is the fastest I/O on the system).
8/26/2022 Dr. Kanthi.M, Professor, ECE Dept., MIT 20
When all of the processes in main memory are in the Blocked state, the operating system
can suspend one process by putting it in the suspended state by transferring it to disk.
The process may or may not be waiting on an event. If it is , this blocked condition is
independent of suspend condition, and occurrence of the blocking event does not enable the
process to be executed.
The process was placed in a suspended state by an agent; either itself, a parent process, or
the operating system, for the purpose of preventing its execution
The process may not be removed from this state until the agent explicitly orders the
removal.