






















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!























z Process Control Block (PCB) z Process State Information z Process Control Information z Functions of an Operating-System Kernel z Switch a Process z Change of Process State z Execution of the Operating System
z Schedules and dispatches processed for execution by the processor z Allocates resources to processes
z Responds to requests by user programs
z Tables are constructed for each entity the operating system manages
z I/O device is available or assigned z Status of I/O operation z Location in main memory being used as the source or destination of the I/O transfer
z Existence of files z Location on secondary memory z Current Status z Attributes z Sometimes this information is maintained by a file-management system
Process State Transition Diagram with Two Suspend States - Seven- State Process Model New Admit Admit^ Suspend Dispatch
Time out
Ready, suspend Ready
Blocked,suspend Blocked
Event Occurs
Activate
Event Occurs
Activate
Suspend
Running Exit
Event Wait
Suspend Docsity.com
return to user
return^ preempt reschedule process
interrupt, exit^ sleep interrupt return
system call, interrupt wakeup swap out
wakeup
swap in
swap out
enoughmemory^ not enough memory(swapping system only)
fork
Zombie
KernelRunning
Running^ User
Preempted
Asleep inMemory
Ready to Runin Memory
Created
Swapped^ Sleep,
Ready to Run Swapped
z Asleep in memory: unable to execute until an event occurs; process in main memory. z Ready to run, swapped: process is ready to run, but the the swapper must swap the process into main memory before the kernel can schedule it to execute. z Sleeping, swapped: The process is awaiting an event and has been swapped to secondary storage.
z Preempted: process is returning from kernel to user mode, but the kernel preempts it and does a process switch to schedule another process. z Created: process is newly created and not yet ready to run. z Zombie: process no longer exists, but it leaves a record for its parent process to collect.
z Process Identifiers ID of this process and ID of parent process. z User Identifiers real user ID, effective user ID z Pointers To U area and process memory (text, data, stack) z Process Size, Priority, Signal, Timers, ......Docsity.com
z Contents of processor registers y User-visible registers (data/address register). y Control and status registers (program counter, instruction register. y Stack pointers ( points to the top of the stack). z Program status word (PSW) y contains status information - indicate the mode of execution (user or kernel mode) ?????? Docsity.com
Question 1 Process Control - Exercise/Home Work
z a) A number of operating systems have two modes (UNIX), kernel and user. What are the advantages and disadvantages of providing four mode instead of two?
z b) Can you make a case for even more than four modes?
Memory Management z Allocation of address space to processes z Page and segment management I/O Management z Allocation of I/O channels and devices to processes Support Functions z Interrupt handling and accounting
wait( ) System Call
Status Information of wait( )
Example: communication between parent process and child processes (jg73.cc and jg74.cc)
z Additional information needed by the operating system to control and coordinate the various active processes y scheduling and state information y data structuring y interprocess communication y process privileges y resource ownership and utilization ??????