C06 Operating System With Unix Vtu
C06 Operating System With Unix Vtu
C06 Operating System With Unix Vtu
Program
Hardware
process
Switch to
another
program
Process Mgr
Process Abstraction Layers
pi, pj, and pk each
Pi Pj Pk
have their own
Virt Term Virt Term Virt Term
virtual terminal
Window Mgr interface
Synchronization
Device Memory Resource
Manager Manager Scheduler Resource
Resource
Manager
Manager
Manager
Synchronization
Device Memory Resource
Manager Manager Scheduler Resource
Resource
Manager
Manager
Monolithic Kernel Manager
UNIX kernel
Process Table
…
Process Descriptor
Creating a Process in NT
CreateProcess(…);
Win32 Subsystem
ntCreateProcess(…);
…
ntCreateThread(…);
NT Executive
Handle Table
NT Kernel
…
Process Descriptor
Handles
Application
Handle
User Space
Supervisor Space
Executive Object
NT Executive
Kernel
Object
NT Kernel
NT Process Descriptor
User Space
Supervisor Space
NT Executive
EPROCESS ETHREAD
NT Kernel
KPROCESS
(PCB)
KTHREAD
NT Process Descriptor
Kernel process object including:
Pointer to the page directory
Kernel & user time
Process base priority
Process state
List of the Kernel thread descriptors that are
using this process
NT Process Descriptor (cont)
Parent identification
Exit status
Creation and termination times.
Memory status
Security information
executable image
Process priority class used by the thread
scheduler.
A list of handles used by this process
A pointer to Win32-specific information
Resource Model
Resource: Anything that a process can request, then be
blocked because that thing is not available.
allocate
release
Process
Resource Manager Design
Mgr(Rj)
request release
allocate
release
allocate
release
Process
allocate
Resource Pool
Address Space
Primary
Memory
Address Space
Process Mailboxes
Files
System services
Other objects
Defining the Address Space
• Some parts are built into the environment
– Files
– System services
• Some parts are imported at runtime
– Mailboxes
– Network connections
• Memory addresses are created at compile
(and run) time
The Compile Time Component
Source
Modules
Translator Relocatable
Modules
Loader Executable
Program
Address Space
Map
Map
State
Resources
State
Program Stack
Process State (Version 1)
Request
Done
Running
Request Schedule
Allocate Start
Blocked Ready
Process State (UNIX)
Request
Wait by
parent Done
Running
zombie Schedule
Request
Sleeping I/O Request
Allocate
Start
Runnable
I/O Complete Resume