Académique Documents
Professionnel Documents
Culture Documents
Processes - A System View Only one process can use the CPU at
a time
… But we want the appearance of every
Concurrency & Context Switching process running at the same time
Process Control Block How can we manage CPU usage?
What's in it and why? How is it used? Who sees it?
5 State Process Model “Resource Management”
State Labels. Causes of State Transitions. Impossible
Transitions.
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Kravets, Gupta Copyright ©: Nahrstedt, Angrave, Abdelzaher, Kravets, Gupta
1
9/10/2008
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Kravets, Gupta Copyright ©: Nahrstedt, Angrave, Abdelzaher, Kravets, Gupta
Wait until system call Wait until the process gives up the
CPU
Advantages?
long count = 0;
Disadvantages? Advantages? while(count >=0) {
count ++;
Disadvantages? if(count % 10000 == 0)
yield();
}
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Kravets, Gupta Copyright ©: Nahrstedt, Angrave, Abdelzaher, Kravets, Gupta
2
9/10/2008
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Kravets, Gupta Copyright ©: Nahrstedt, Angrave, Abdelzaher, Kravets, Gupta
3
9/10/2008
Identifiers Privileges
CPU instructions, memory
pid & ppid
Processor State Information Memory Management
Segments, VM control 'page tables'
User-visible registers, control and status, stack
Scheduling information Resource Ownership and utilization
Process state, priority, …, waiting for event info
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Kravets, Gupta Copyright ©: Nahrstedt, Angrave, Abdelzaher, Kravets, Gupta
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Kravets, Gupta Copyright ©: Nahrstedt, Angrave, Abdelzaher, Kravets, Gupta
4
9/10/2008
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Kravets, Gupta Copyright ©: Nahrstedt, Angrave, Abdelzaher, Kravets, Gupta
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Kravets, Gupta Copyright ©: Nahrstedt, Angrave, Abdelzaher, Kravets, Gupta
5
9/10/2008
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Kravets, Gupta Copyright ©: Nahrstedt, Angrave, Abdelzaher, Kravets, Gupta
I/O complete
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Kravets, Gupta Copyright ©: Nahrstedt, Angrave, Abdelzaher, Kravets, Gupta
6
9/10/2008
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Kravets, Gupta Copyright ©: Nahrstedt, Angrave, Abdelzaher, Kravets, Gupta