{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

OS_ch03_F07 - I-C Lin Assistant Professor Textbook...

Info iconThis preview shows pages 1–18. Sign up to view the full content.

View Full Document Right Arrow Icon
I.-C. Lin, Assistant Professor. Textbook: Operating System Principles 7ed CHAPTER 3: PROCESSES CONCEPT PROCESSES-CONCEPT
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Chapter 3: Processes Concept Processes-Concept Overview Process Scheduling Operations on Processes I t C i ti Interprocess Communication Examples of IPC Systems Communication in Client-Server Systems
Background image of page 2
Process Concept An operating system executes a variety of programs An operating system executes a variety of programs: Batch system jobs Time-shared systems user programs or tasks Textbook uses the terms job and process almost interchangeably Process a program in execution; process execution must progress in sequential fashion A process includes: program counter stack data section ……
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Process in Memory
Background image of page 4
Process State As a process executes, it changes state new : The process is being created i I i b i d running : Instructions are being executed waiting : The process is waiting for some event to occur ready : The process is waiting to be assigned to a process terminated : The process has finished execution
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Diagram of Process State
Background image of page 6
Process Control Block (PCB) Information associated with each process Process state Program counter CPU registers CPU scheduling information Memory-management information Accounting information I/O status information
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Process Control Block (PCB)
Background image of page 8
CPU Switch From Process to Process
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Process Scheduling Queues Job e e t f ll i th t Job queue set of all processes in the system R d f ll idi i i 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 Processes migrate among the various queues
Background image of page 10
Ready Queue And Various I/O Device Queues
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Representation of Process Scheduling
Background image of page 12
Schedulers Long term scheduler (or job scheduler) Long-term scheduler selects which processes should be brought into the ready queue Short-term scheduler (or CPU scheduler) Short term scheduler selects which process should be executed next and allocates CPU
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Addition of Medium Term Scheduling
Background image of page 14
Schedulers (Cont.) Short term scheduler is invoked very frequently (milliseconds) Short-term scheduler is invoked very frequently (milliseconds) (must be fast) Long-term scheduler is invoked very infrequently (seconds, minutes) (may be slow) The long-term scheduler controls the degree of multiprogramming Processes can be described as either: I/O-bound process spends more time doing I/O than computations, many short CPU bursts CPU-bound process spends more time doing computations; few very long CPU bursts
Background image of page 15

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Context Switch When CPU switches to another process, the system must save the state of the old process and load the saved state for the new process C t t it h ti i h d th t d f l Context-switch time is overhead; the system does no useful work while switching Time dependent on hardware support
Background image of page 16
Process Creation P t t hild hi h i t t
Background image of page 17

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 18
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}