Chap5 Flashcards
Thread specific data
Program counter
Status of the thread
Processor registers
Stack space
Thread shares
Program code
Data
Resources
UNIX Processes’s address space
Subdivided into text, data, & stack segment
Program file describes the address space
Benefits of multithreaded
programming
Responsiveness
Resource sharing
Ease of memory and resource allocation
Utilization of multiprocessor architectures
Process Manager implementations
Calls like fork() in UNIX and CreateProcess() in windows to create processes.
Calls like pthread_create() in Linux and CreateThread() in Windows to support threading.
Calls like close() in Unix and CloseHandle() in Windows to close processes/threads to release resources.
Process Descriptors
OS creates/manages process abstraction
Also known as Process Control Block (PCB)
Process Descriptors’s data structure for each process
Process ID
Program counter
Register values
Process state
Type & location of resources it holds
List of resources it needs
Security keys
Process States (draw the diagram)
Running: Instructions are being executed
Blocked: The process is waiting for some event to
occur (eg, I/O completion)
Ready: The process is waiting to be assigned to a
processor.
Done: The process has finished execution
Linux State Transition Diagram (draw diagram)