os4 - Modified from Lecture Slides for Operating System...

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

View Full Document Right Arrow Icon
Operating Systems : Processes (Chapter 4) Sung-Yong Park, Ph.D. Department of Computer Science Sogang University Modified from Lecture Slides for Operating System Concepts (6 th Edition) by Silberschatz et. al. Page 2 What is a Process ? ± 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 1

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

View Full DocumentRight Arrow Icon
Page 3 Process State ± As a process executes, it changes state ± new : The process is being created. ± ready : The process is waiting to be assigned to a process. ± running : Instructions are being executed. ± waiting : The process is waiting for some event to occur. ± terminated : The process has finished execution. Page 4 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 2
Page 5 Process Control Block in Linux Page 6 Concept of Process Scheduling ± The objective of multiprogramming is to have some process running at all times, to maximize CPU utilization. ± The objective of time-sharing is to switch the CPU among processes so frequently that users can interact with each program while it is running. ± A uni-processor system can have only one running process. ± If more processes exist, the rest must wait until the CPU is free and can be rescheduled. ± This requires process scheduling .
Background image of page 3

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

View Full DocumentRight Arrow Icon
Page 7 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 (I/O queue) – set of processes waiting for an I/O device. ± Processes migrate between the various queues. Page 8 Representation of Process Scheduling
Background image of page 4
Page 9 Types of Schedulers ± Long-term scheduler (or job scheduler) – selects which processes should be brought into the ready queue. ± Short-term
Background image of page 5

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

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 22

os4 - Modified from Lecture Slides for Operating System...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online