1 Process States (1) Possible process states –running –blocked –ready Transitions between states shown.

Slides:



Advertisements
Similar presentations
1 Processes and Threads Creation and Termination States Usage Implementations.
Advertisements

Scheduling Introduction to Scheduling
Uniprocessor Scheduling Chapter 9 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
1 Processes and Threads Chapter Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved OPERATING SYSTEMS DESIGN.
CS 149: Operating Systems February 3 Class Meeting
CPU Scheduling Section 2.5.
1 Threads CSCE 351: Operating System Kernels Witawas Srisa-an Chapter 4-5.
Chapter 2: Processes Topics –Processes –Threads –Process Scheduling –Inter Process Communication (IPC) Reference: Operating Systems Design and Implementation.
CS 3013 & CS 502 Summer 2006 Scheduling1 The art and science of allocating the CPU and other resources to processes.
Avishai Wool lecture Priority Scheduling Idea: Jobs are assigned priorities. Always, the job with the highest priority runs. Note: All scheduling.
1 Processes and Threads Chapter Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
1 Pertemuan 8 Penjadwalan (lanjutan) Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.
1 Thursday, June 15, 2006 Confucius says: He who play in root, eventually kill tree.
3.5 Interprocess Communication
Chapter 2 Processes and Threads Scheduling Classical Problems.
Chapter 2 Processes and Threads Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved
CS533 Concepts of Operating Systems Class 3 Integrated Task and Stack Management.
Wk 2 – Scheduling 1 CS502 Spring 2006 Scheduling The art and science of allocating the CPU and other resources to processes.
1 Lecture 10: Uniprocessor Scheduling. 2 CPU Scheduling n The problem: scheduling the usage of a single processor among all the existing processes in.
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION Third Edition ANDREW S. TANENBAUM ALBERT S. WOODHULL Yan hao (Wilson) Wu University of the Western.
1 Processes and Threads Chapter Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
Processes and threads Processes Threads Scheduling
Chapter 2 Processes and Threads Scheduling Classical Problems.
Processes and Threads.
Scheduling Chap 2. Scheduling Introduction to Scheduling (1) Bursts of CPU usage alternate with periods of I/O wait –a CPU-bound process –an I/O bound.
1 Processes Chapter Processes 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
10/16/ Realizing Concurrency using the thread model B. Ramamurthy.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 2 Processes and Threads Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
1 Processes, Threads, Race Conditions & Deadlocks Operating Systems Review.
1 Scheduling The part of the OS that makes the choice of which process to run next is called the scheduler and the algorithm it uses is called the scheduling.
B. RAMAMURTHY 10/24/ Realizing Concurrency using the thread model.
1 Processes Management 1 Processes 2 Threads 3 IPC problems 4 Processes Scheduling 5 Deadlock.
ITEC 502 컴퓨터 시스템 및 실습 Chapter 2-1: Process Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
Practice four Chapter six. 1. A CPU-scheduling algorithm determines an order for the execution of its scheduled processes. Given n processes to be scheduled.
Operating Systems Scheduling. Bursts of CPU usage alternate with periods of waiting for I/O. (a) A CPU-bound process. (b) An I/O-bound process. Scheduling.
Chapter 2 Processes and Threads Introduction 2.2 Processes A Process is the execution of a Program More specifically… – A process is a program.
ITFN 3601 Introduction to Operating Systems Lecture 3 Processes, Threads & Scheduling Intro.
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION Third Edition ANDREW S. TANENBAUM ALBERT S. WOODHULL Yan hao (Wilson) Wu University of the Western.
Processes, Threads, and Process States. Programs and Processes  Program: an executable file (before/after compilation)  Process: an instance of a program.
CSE 153 Design of Operating Systems Winter 2015 Midterm Review.
Cs431-cotter1 Processes and Threads Tanenbaum 2.1, 2.2 Crowley Chapters 3, 5 Stallings Chapter 3, 4 Silberschaz & Galvin 3, 4.
Shahriar Pirnia Operating system سيستم عامل.
1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
ITEC 502 컴퓨터 시스템 및 실습 Chapter 2-2: Threads Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
操作系统原理 OPERATING SYSTEM Chapter 2 Processes and Threads 进程与线程.
Advanced Operating Systems CS6025 Spring 2016 Processes and Threads (Chapter 2)
B. RAMAMURTHY 5/10/2013 Amrita-UB-MSES Realizing Concurrency using the thread model.
7/9/ Realizing Concurrency using Posix Threads (pthreads) B. Ramamurthy.
Uniprocessor Scheduling Chapter 9 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Realizing Concurrency using the thread model
Realizing Concurrency using the thread model
Chapter 2 Scheduling.
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Realizing Concurrency using Posix Threads (pthreads)
Message Passing, Scheduler
Realizing Concurrency using the thread model
Implementing Threads in User Space
Realizing Concurrency using the thread model
Processes and Threads Part III
Process Description and Control
Chapter 2 Processes and Threads 2.1 Processes 2.2 Threads
Process Description and Control
Realizing Concurrency using the thread model
Realizing Concurrency using Posix Threads (pthreads)
Realizing Concurrency using the thread model
Realizing Concurrency using Posix Threads (pthreads)
Uniprocessor scheduling
Thread Model for Work Unit
Presentation transcript:

1 Process States (1) Possible process states –running –blocked –ready Transitions between states shown

2 Process States (2) Lowest layer of process-structured OS –handles interrupts, scheduling Above that layer are sequential processes

3 Implementation of Processes (1) Fields of a process table entry

4 Implementation of Processes (2) Skeleton of what lowest level of OS does when an interrupt occurs

5 Threads The Thread Model (1) (a) Three processes each with one thread (b) One process with three threads

6 The Thread Model (2) Items shared by all threads in a process Items private to each thread

7 The Thread Model (3) Each thread has its own stack

8 Thread Usage (2) A multithreaded Web server

9 Scheduler Activations Goal – mimic functionality of kernel threads –gain performance of user space threads Avoids unnecessary user/kernel transitions Kernel assigns virtual processors to each process –lets runtime system allocate threads to processors Problem: Fundamental reliance on kernel (lower layer) calling procedures in user space (higher layer)

10 Semaphores The producer-consumer problem using semaphores

11 Monitors (1) Example of a monitor

12 Monitors (2) Outline of producer-consumer problem with monitors –only one monitor procedure active at one time –buffer has N slots

13 Monitors (3) Solution to producer-consumer problem in Java (part 1)

14 Monitors (4) Solution to producer-consumer problem in Java (part 2)

15 Message Passing The producer-consumer problem with N messages

16 Scheduling Introduction to Scheduling (1) Bursts of CPU usage alternate with periods of I/O wait –a CPU-bound process –an I/O bound process

17 Introduction to Scheduling (2) Scheduling Algorithm Goals

18 Scheduling in Batch Systems (1) An example of shortest job first scheduling

19 Scheduling in Batch Systems (2) Three level scheduling

20 Scheduling in Interactive Systems (1) Round Robin Scheduling –list of runnable processes –list of runnable processes after B uses up its quantum

21 Scheduling in Interactive Systems (2) A scheduling algorithm with four priority classes

22 Scheduling in Real-Time Systems Schedulable real-time system Given –m periodic events –event i occurs within period P i and requires C i seconds Then the load can only be handled if

23 Policy versus Mechanism Separate what is allowed to be done with how it is done –a process knows which of its children threads are important and need priority Scheduling algorithm parameterized –mechanism in the kernel Parameters filled in by user processes –policy set by user process

24 Thread Scheduling (1) Possible scheduling of user-level threads 50-msec process quantum threads run 5 msec/CPU burst

25 Thread Scheduling (2) Possible scheduling of kernel-level threads 50-msec process quantum threads run 5 msec/CPU burst