Search PPTs

Friday, August 16, 2013

PPT On Process

Download

Process Presentation Transcript:
1.Introduction to Process

2.Outline Process Concept
Process Scheduling
Operations on Processes
Cooperating Processes
Threads
Inter process Communication

3.Process Concept
An operating system executes a variety of programs
batch systems - jobs
time-shared systems - user programs or tasks
job and program used interchangeably
Process - a program in execution
process execution proceeds in a sequential fashion
A process contains
program counter, stack and data section

4.Process Control Block
Contains information associated with each process
Process State - e.g. new, ready, running etc.
Program Counter - address of next instruction to be executed
CPU registers - general purpose registers, stack pointer etc.
CPU scheduling information - process priority, pointer
Memory Management information - base/limit information
Accounting information - time limits, process number
I/O Status information - list of I/O devices allocated

5.Process 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.
Queue Structures - typically linked list, circular list etc.

6.Schedulers
Long-term scheduler (or job scheduler) -
selects which processes should be brought into the ready queue.
invoked very infrequently (seconds, minutes); may be slow.
controls the degree of multiprogramming
Short term scheduler (or CPU scheduler) -
selects which process should execute next and allocates CPU.
invoked very frequently (milliseconds) - must be very fast
Medium Term Scheduler
swaps out process temporarily
balances load for better throughput

7.Process Profiles
I/O bound process -
spends more time in I/O,  short CPU bursts, CPU underutilized.
CPU bound process -
spends more time doing computations; few very long CPU bursts, I/O underutilized.
The right job mix:
Long term scheduler - admits jobs to keep load balanced between I/O and CPU bound processes

8.Context Switch
Task that switches CPU from one process to another process
the CPU must save the PCB state of the old process and load the saved PCB state of the new process.
Context-switch time is overhead;
system does no useful work while switching
can become a bottleneck
Time for context switch is dependent on hardware support ( 1- 1000 microseconds).

9.Process Creation
Resource sharing
Parent and children share all resources.
Children share subset of parent’s resources - prevents many processes from overloading the system.
Parent and children share no resources.
Execution
Parent and child execute concurrently.
Parent waits until child has terminated.
Address Space
Child process is duplicate of parent process.
Child process has a program loaded into it.

10.Process Termination
Process executes last statement and asks the operating system to delete it (exit).
Output data from child to parent (via wait).
Process’ resources are deallocated by operating system.
Parent may terminate execution of child processes.
Child has exceeded allocated resources.
Task assigned to child is no longer required.
Parent is exiting
OS does not allow child to continue if parent terminates
Cascading termination

11.Benefits
Responsiveness
Resource Sharing
Economy
Utilization of MP Architectures

12.Kernel Threads
Supported by the Kernel
Examples
Windows XP/2000
Solaris
Linux
Tru64 UNIX
Mac OS X
Mach, OS/2

13.Multithreading Models
Many-to-One
One-to-One
Many-to-Many

14.Many user-level threads mapped to single kernel thread
Examples:
Solaris Green Threads
GNU Portable Threads

15.One-to-One
Each user-level thread maps to kernel thread
Examples
Windows NT/XP/2000
Linux
Solaris 9 and later

No comments:

Related Posts Plugin for WordPress, Blogger...

Blog Archive