1. M. DHARANI M.SC(CS),
NADAR SARASWATHI COLLEGE
OF ARTS AND SCIENCE,
THENI.
PROCESS SCHUDELING &
MEMORY MANAGEMENT
2. DEFINITION
Process management is an integral
part of any modern day operation
system. The OS must allocate
resources to processes, enable
processes to share and exchange
information, protect the resources
of each process from other
processes and enable synchronization
among processes.
3. To meet these requirements the
OS must maintain a data
structure for each process,
which describes the state and
resource ownership of that
process and which enables the
OS to exert control over each
process.
4. A process goes through a series of discrete
process states. Various events can cause a
process to change states:
Submit state
Hold state
Ready state
Running state
Wait state
Complete state
5. Process scheduling is one of the most important
functions of an operating system that supports
multiprogramming. This function is heavily
dependent on queues. There are three types of
queues that are used in process scheduling:
Job Queue
Ready Queue
Device Queue
6. Job Queue:
Contains all processes that have been
introduced into the system.
Ready Queue:
Contains processes that are waiting for CPU
time, and can be selected to run at any time.
Device Queue:
Contains processes waiting on a certain
device. Each device has its own queue for
processes that need I/O from it.
7. DIFFERENT ALGORITHMS USED FOR
HANDLING PROCESSES
Deterministic Scheduling:
An algorithm where in all characteristics of
a process are known in advance or before
execution.
Non-Deterministic Scheduling:
An algorithm where in characteristics of
processes are not known in advance.
8. TYPES OF QUEUE BEING USED
Single Queuing:
All process arrives at the same time with
their corresponding burst time.
Multiple Queuing:
Each process has its won arrival time in the
processor.
9. PROCESS SCHEDULING
Good policies to schedule processes:
1. Maximum Throughput
2. Minimize Response Time
3. Minimize Turnaround time
4. Minimize Waiting time
5. Maximize CPU Efficiency
6. Ensure fairness for All Jobs
10. PROCESS SCHEDULING ALGORITHM
Here, are six commonly used process scheduling
algorithms,
1. First come, First Served (FCFS)
2. Shortest job Next (SJN)
3. Priority Scheduling
4. Shortest Remaining Time (SRT)
5. Round Robin
6. Multi-Level Queues
11. DEAD LOCK
Dead lock can be said to occur when a process is
allocated some non-sharable resources but is
forced to wait for other non-sharable resources.
program proc A;
begin
open (File);
Do more stuff;
open (File2);
Do stuff;
End
12. PROGRAM Proc A:
BEGIN
Do stuff;
Open (file1);
Do more stuff;
Open(File 2);
Do stuff;
END
PROGRAM PROC B:
BEGIN
Do stuff;
Open (File 2);
Do more stuff;
Open (File 1);
Do stuff;
END
14. SEVEN TYPES OF DEADLOCK
Deadlock on file requests
Deadlock in databases
Deadlock in dedicated device allocation
Deadlock in multiple device allocation
Deadlock in spooling
Deadlock in a network
Deadlock in disk sharing