Operating System Structure
Operating System Structure
Structure
PROCESS
•
Differences between Process and Program
Process Program
Process is a dynamic object Program is a static object
Process is sequence of instruction
Program is a sequence of instructions
execution
•
Process Control Block
1. ProcessState : The State may be new, ready, running, and waiting,Terminated…
2. ProgramCounter : indicates the Address of the next Instruction to be executed.
3. CPUregisters : registers include accumulators, stack pointers,
General purpose Registers….
4. CPU-SchedulingInfo : includes a process pointer, pointers to
schedulingQueues,other scheduling parametersetc.
5. Memory management Info: includes page tables, segmentation tables, value of
base and limit registers.
6. AccountingInformation: includes amount of CPU used, time limits, Jobs(or)Process numbers.
7. I/O StatusInformation: Includes the list of I/O Devices Allocated to theprocesses, list of open
files.
Threads:
• A process is divide into number of light weight process, each light weight
process is said to be a Thread. The Thread has a program counter (Keeps track
of which instruction to execute next), registers (holds its current working
variables), stack (execution History).
Thread States:
1. born State : A thread is just created.
2. ready state : The thread is waiting for CPU.
3. running : System assigns the processor to the thread.
4. sleep : A sleeping thread becomes ready after the designated sleep time
expires.
5. dead : The Execution of the thread finished.
Eg: Word processor.
Typing, Formatting, Spell check, saving are threads.
Differences between Process and Thread
•
FILE CONCEPTS: