Professional Documents
Culture Documents
Dep. of IT
Operating
Systems
Lecture 2: Processes
Process Concept
Process Scheduling
Operations on Processes
http://apps.uttyler.edu/Rainwater/COSC3355/Animations/dynamicprocess.htm
Process Control Block (PCB)
7
registers
4. CPU scheduling information- priorities, scheduling
queue pointers
5. Memory-management information – memory
allocated to the process
6. Accounting information – CPU used, clock time
CPU Switch From Process to Process
8
Threads
9
Ready
Queue
And
Various
I/O Device
Queues
Representation of Process Scheduling
12
(must be fast)
Long-term scheduler (or job scheduler) – selects
multiprogramming
Schedulers
14
Execution options
A Tree of Processes in Linux
19
ii ni
ni tt
pi
pi dd = = 11
ll ogi
ogi nn kthreadd
kt hreadd sshd
sshd
pi
pi dd = = 8415
8415 pi
pi dd =
= 22 pi
pi dd =
= 3028
3028
bash khel
khel per
per pdfl
pdfl ush
ush sshd
sshd
bash
pi pi
pi dd =
= 66 pi
pi dd =
= 200
200 pi
pi d =
d = 3610
3610
pi d =
d = 8416
8416
emacs tcsch
t csch
ps
ps em acs
pi pi
pi d =
d = 4005
4005
pi
pi d = 9298
d = 9298 pi dd =
= 9204
9204
Process Creation (Cont.)
20
UNIX examples
fork() system call creates new process
exec() system call used after a fork() to replace the process’
memory space with a new program
Process Termination
21
are terminated.
The termination is initiated by the operating system.
Information sharing
Computation speedup
Modularity
Convenience
communication (IPC)
Communications Models
28
Implementation issues:
How are links established?
communicating processes?
What is the capacity of a link?
fixed or variable?
Communications in Client-Server
30
Systems
Sockets
Remote Procedure Calls
Pipes
Remote Method Invocation (Java)
Producer-Consumer Problem
31