Escolar Documentos
Profissional Documentos
Cultura Documentos
Management
Fred Kuhns
fredk@cse.wustl.edu
Applied Research Laboratory,
Department of Computer Science and Engineering,
Washington University in St. Louis
Washington
WASHINGTON UNIVERSITY IN ST LOUIS
Recall the Model
execution environment
application
libraries
trap
user
System call interface
kernel System Services
Kernel interface
Synchronization
And deadlock Scheduler
char block Memory
Other
Subsystem Process table Resources
Device drivers
hardware
Fred Kuhns (01/17/09) CS422 – Operating Systems Concepts 2
The Process Abstraction
• Process: program in execution
– Sequential execution, characterized by trace.
…
Process P2
Memory mappings
Queue
(Running)
(Ready)
Enter Dispatch Exit
Processor
(Create) (Terminate)
Pause
event terminate
wait
Blocked
Exit
P1
P2
P3
System ...
(dispatch)
time
suspend
admit dispatch
New Ready Running
preempt
suspend terminate
admit event wait
activate
suspend
Ready Blocked
Blocked Exit
Suspend event Suspend activate
Suspended Processes
(possibly on backing store)
Memory Tables
Process Image
Memory
I/O Tables User data
I/O User program
System stack
File File Tables PCB
Processes
Primary Table
Process 1
Process 2
…
Process N
Fred Kuhns (01/17/09) CS422 – Operating Systems Concepts 10
Process Management Structures
• Process Control Block
– Process state
– Program counter
– CPU registers
– CPU scheduling information
– Memory-management information
– Accounting information
– I/O status information
• Scheduling Queues
– Job queue – set of all processes in the system.
– Ready queue – set of all processes residing in main memory, ready
and waiting to execute.
– Device queues – set of processes waiting for an I/O device.
– Process migration between the various queues.
• Medium-term scheduler
– allocates memory for process.
– invoked periodically or as needed.
• Execution models:
– Parent and children execute concurrently.
– Parent waits until children terminate.
0xffffffff
Kernel stack
0x7fffffff
stack
Data
0x00000000 Text (shared)