Operating System

Submitted by: Submitted by

Views: 463

Words: 3110

Pages: 13

Category: Other Topics

Date Submitted: 12/01/2010 06:09 AM

Report This Essay

Process Scheduling Process Scheduling The Operating System Kernel • Basic set of primitive operations and processes – Primitive: ∗ Like a subroutine call or macro expansion ∗ Part of the calling process ∗ Critical section for the process – Process ∗ Synchronous execution with respect to the calling process ∗ Can block itself or continuously poll for work ∗ More complicated than primitives and more time and space • Provides a way to provide protected system services, like supervisor call instruction

30

– Protects the OS and key OS data structures (like process control blocks) from interference by user programs – The fact that a process is executing in kernel mode is indicated by a bit in program status word (PSW) • Set of kernel operations – Process Management: Process creation, destruction, and interprocess communication; scheduling and dispatching; process switching; management of process control blocks – Resource Management: Memory (allocation of address space; swapping; page and segment management), secondary storage, I/O devices, and files – Input/Output: Transfer of data between memory and I/O devices; buffer management; allocation of I/O channels and devices to processes – Interrupt handling: Process termination, I/O completion, service requests, software errors, hardware malfunction • Kernel in Unix – Controls the execution of processes by allowing their creation, termination, suspension, and communication – Schedules processes fairly for execution on cpu ∗ ∗ ∗ ∗ cpu executes a process Kernel suspends process when its time quantum elapses Kernel schedules another process to execute Kernel later reschedules the suspended process

– Allocates main memory for an executing process

Process Scheduling ∗ Swapping system: Writes entire process to the swap device ∗ Paging system: Writes pages of memory to the swap device – Allocates secondary memory for efficient storage and retrieval of user data – Allows controlled peripheral device access to processes •...