Thursday, July 16, 2009

Processing Scheduling

a. Scheduling Queues
  • Job queue – set of all processes in the system.
  • Ready queue – set of all processes residing in main memory,
    ready and waiting to execute.
  • Device queues – set of processes waiting for an I/O device.
  • Process migration between the various queues.

b.Schedulers

Scheduler is a tool that is intented to help understand how real-time algorithms work.

As of release 10.0, HP-UX implements four schedulers, two time-share and two real-time.
To choose a scheduler, you can use the user command, rtsched(1), which executes processes with your choice of scheduler and enables you to change the real-time priority of currently executing process ID.

rtsched -s scheduler -p priority command [arguments] rtsched [ -s scheduler ] -p priority -P pid

Likewise, the system call rtsched(2) provides programmatic access to POSIX real-time scheduling operations.

c. Context Switch

A context switch is the computing process of storing and restoring the state (context) of a CPU such that multiple processes can share a single CPU resource. The context switch is an essential feature of a multitasking operating system. Context switches are usually computationally intensive and much of the design of operating systems is to optimize the use of context switches. A context switch can mean a register context switch, a task context switch, a thread context switch, or a process context switch. What constitutes the context is determined by the processor and the operating system.



No comments: