1 Pertemuan 8 Penjadwalan (lanjutan) Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.

Slides:



Advertisements
Similar presentations
Scheduling Introduction to Scheduling
Advertisements

Uniprocessor Scheduling Chapter 9 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
CPU Scheduling Tanenbaum Ch 2.4 Silberchatz and Galvin Ch 5.
CSC 322 Operating Systems Concepts Lecture - 11: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
CH 5. CPU Scheduling Basic Concepts F CPU Scheduling  context switching u CPU switching for another process u saving old PCB and loading.
Chapter 5 CPU Scheduling. CPU Scheduling Topics: Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
CPU Scheduling Section 2.5.
1 Threads CSCE 351: Operating System Kernels Witawas Srisa-an Chapter 4-5.
© Ibrahim Korpeoglu Bilkent University
CS 311 – Lecture 23 Outline Kernel – Process subsystem Process scheduling Scheduling algorithms User mode and kernel mode Lecture 231CS Operating.
1 Pertemuan 18 Input / Output (lanjutan) Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.
1 Pertemuan 24 Sistem Operasi Unix Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.
Scheduling in Batch Systems
CS 3013 & CS 502 Summer 2006 Scheduling1 The art and science of allocating the CPU and other resources to processes.
1 Pertemuan 16 Isu-Isu pada Sistem Paging dan Segmentasi Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.
1 Pertemuan 7 Masalah-masalah pada Komunikasi antar Proses dan Penjadwalan Batch Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.
1 Pertemuan 11 Manajemen Memori Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5 OFFCLASS02.
Chapter 2 Processes and Threads Scheduling Classical Problems.
1 Pertemuan 20 Time & Condition Clauses with Future reference Matakuliah: G0134 – Grammar III Tahun: 2005 Versi: revisi 1.
5: CPU-Scheduling1 Jerry Breecher OPERATING SYSTEMS SCHEDULING.
April 1, 2002 ECEN Software Engineering of Multi-Program Systems -- University of Colorado -- Scheduling 1 Process Management -- Scheduling ECEN5043.
Wk 2 – Scheduling 1 CS502 Spring 2006 Scheduling The art and science of allocating the CPU and other resources to processes.
1 Pertemuan #3 Clocks and Realtime Matakuliah: H0232/Sistem Waktu Nyata Tahun: 2005 Versi: 1/5.
Course Syllabus 1. Introduction - History; Views; Concepts; Structure
1 Lecture 10: Uniprocessor Scheduling. 2 CPU Scheduling n The problem: scheduling the usage of a single processor among all the existing processes in.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Operating Systems CMPSCI 377 Lecture.
1 Pertemuan 8 The Object Definition Language (Lanjutan) Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0.
1 Processes and Threads Chapter Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
Chapter 2 Processes and Threads Scheduling Classical Problems.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-3 CPU Scheduling Department of Computer Science and Software Engineering.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Lecture 5 Operating Systems.
Processes and Threads.
1 Process States (1) Possible process states –running –blocked –ready Transitions between states shown.
OPERATING SYSTEMS CPU SCHEDULING.  Introduction to CPU scheduling Introduction to CPU scheduling  Dispatcher Dispatcher  Terms used in CPU scheduling.
More Scheduling cs550 Operating Systems David Monismith.
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.
Chapter 6 Scheduling. Basic concepts Goal is maximum utilization –what does this mean? –cpu pegged at 100% ?? Most programs are I/O bound Thus some other.
Scheduling. Alternating Sequence of CPU And I/O Bursts.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 2 Processes and Threads Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
1 Pertemuan 3 Konsep Sistem Operasi Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.
Review Questions on Chapter III—Scheduling COSC 4330/6310 Summer 2013.
1 Pertemuan 5 Software: System Software Matakuliah: T0604-Pengantar Teknologi Informasi Tahun: 2008 Versi: 2.0/0.0 Williams, B.K, Stacy C. Sawyer (2007).
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.
CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Operating Systems Examples Algorithm.
1 Pertemuan 10 Deadlock (lanjutan) Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.
2.5 Scheduling Given a multiprogramming system. Given a multiprogramming system. Many times when more than 1 process is waiting for the CPU (in the ready.
Lecture 7: Scheduling preemptive/non-preemptive scheduler CPU bursts
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.
Uniprocessor Scheduling
ITFN 2601 Introduction to Operating Systems Lecture 4 Scheduling.
1 Pertemuan 22 Implementasi Sistem File Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.
2.5 Scheduling. Given a multiprogramming system, there are many times when more than 1 process is waiting for the CPU (in the ready queue). Given a multiprogramming.
Uniprocessor Scheduling Chapter 9. Aim of Scheduling Assign processes to be executed by the processor or processors: –Response time –Throughput –Processor.
1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
1 Uniprocessor Scheduling Chapter 3. 2 Alternating Sequence of CPU And I/O Bursts.
Chapter 4 CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
Lecture 5 Scheduling. Today CPSC Tyson Kendon Updates Assignment 1 Assignment 2 Concept Review Scheduling Processes Concepts Algorithms.
Uniprocessor Scheduling Chapter 9 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
CPU Scheduling Scheduling processes (or kernel-level threads) onto the cpu is one of the most important OS functions. The cpu is an expensive resource.
CPU SCHEDULING.
Pertemuan 12 Manajemen Memory (Lanjutan)
Chapter 2 Scheduling.
Scheduling in Interactive Systems
Chapter 6: CPU Scheduling
Lecture 23: Process Scheduling for Interactive Systems
Processes and Threads Part III
CPU SCHEDULING.
Outline Scheduling algorithms Multi-processor scheduling
Process Scheduling B.Ramamurthy 2/23/2019.
Shortest-Job-First (SJR) Scheduling
Presentation transcript:

1 Pertemuan 8 Penjadwalan (lanjutan) Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5

2 Learning Outcomes Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : mendemonstrasikan penjadwalan proses pada sistem interactive, real-time, dan thread (C3)

3 Outline Materi Interactive Scheduling: –Round Robin Scheduling –Penjadwalan dengan prioritas –Multiple Queues –Shortest process next –Guaranteed Scheduling –Lottery Scheduling –Fair-share Scheduling Penjadwalan pada sistem Real-time Policy versus Mechanism Penjadwalan Thread

4 Scheduling in Interactive Systems (1) Round Robin Scheduling –list of runnable processes –list of runnable processes after B uses up its quantum Each process is assigned a time interval, called quantum Process switch or context switch  times to do switching

5 Scheduling in Interactive Systems (2) Priority scheduling Each process is assigned a priority, and the runnable process with the highest priority is allowed to run The scheduler may decrease the priority of currently running process Priority scheduling is used among classes and round-robin scheduling within each class

6 Scheduling in Interactive Systems (3) Multiple Queues Priority class of queuing processes Quantum given: 1, 2, 4, 8, 16 … Why? To reduce swapping i.e.long CPU-bound process eventually get large quantum short, interactive process get small quantum Example: Process with quantum 100 Quantum given: 1, 2, 4, 8, 16, 32, 64 (used 37)  only 7 swap

7 Scheduling in Interactive Systems (4) Shortest process next Need to estimate the time of the next processes i.e. aT 0 + (1  a)T 1 where T 0 is the estimated time of the first command T 1 is that of the next command … With a = ½, add the new value to the current estimate and divide the sum by 2 Estimates: T 0, T 0 /2+ T 1 /2, T 0 /4+ T 1 /4+ T 2 /2, T 0 /8+ T 1 /8+ T 2 /4+ T 3 /2

8 Scheduling in Interactive Systems (5) Guaranteed Scheduling On a single user system with n processes running, each one should get 1/n of the CPU cycles Ratio of 0.5 means that process only had half of what it should have had Ratio of 2.0 means that process has had twice as much as it was entitled to

9 Scheduling in Interactive Systems (6) Lottery Scheduling Simpler implementation Give process lottery tickets for various system resources, such as CPU time A lottery ticket is chosen at random, but the process holding more tickets gets better chance to be chosen Can be used to solve problems that are difficult to handle with other methods Eg. Video server with several process at different frame rates

10 Scheduling in Interactive Systems (7) Fair Share Scheduling Take into account who owns a process Each user is allocated some fraction of the CPU Thus, if 2 users have been promised 50% of the CPU, they will each get that, no matter how many processes they have Example: User 1 has 4 processes: A, B, C, D User 2 has 1 process: E If both users are promised 50% of CPU time, the possible scheduling sequence would be A E B E C E D E A E … if user 1 entitled twice as much CPU time as user 2, we might get: A B E C D E A B E C D E …

11 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 Example: –A soft real time system with three periodic event, with periods of 100, 200, and 500 ms. If these events require 50, 30, and 100 ms of CPU time per event  the system is schedulable because < 1

12 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

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

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