Beruflich Dokumente
Kultur Dokumente
Chapter 3
All multiprogramming OS are build around the concept
of processes
A process is sometimes called a task
Normal completion
Time limit exceeded
Memory unavailable
Memory bounds violation
Protection error
Arithmetic error
Time overrun
I/O failure
Invalid instruction
Privileged instruction
Operating system intervention
Process States
10
Process Transitions
11
Process Transitions
12
13
A Queuing Discipline
14
15
16
17
18
User program
User data
Stack(s)
19
20
21
User identifier
22
23
24
25
interprocess communication
process privileges
memory management
26
Modes of Execution
27
User mode
Process Creation
28
Supervisor Call
Trap
Interrupt
29
Examples of interrupts
Clock
I/O
first move the processes that where waiting for
this event to the ready (or ready suspend) state
then resume the running process or choose a
process of higher priority
Memory fault
memory address is in virtual memory so it must
bring corresponding block into main memory
thus move this process to a blocked state
(waiting for the I/O to complete)
30
Mode Switching
31
32
33
34
35
36
37
System processes
User processes
run in user mode for user programs
run in kernel modes for system calls, traps, and
interrupts
38
39
40
41
42
User-level context
Process Text (ie: code: read-only)
Process Data
User Stack (calls/returns in user mode)
Shared memory (for IPC)
43
Register context
System-level context
U (user) area
44