Unix SVR4 (Open Solaris and illumos distributions) CPU Scheduling

Similar documents
operating system Spring 2017 Prof.Dr. Hasan Balik Student Name : Walid.W. Ramadan mansour Student ID :

Interactive Scheduling

Two Level Scheduling. Interactive Scheduling. Our Earlier Example. Round Robin Scheduling. Round Robin Schedule. Round Robin Schedule

Comparison of soft real-time CPU scheduling in Linux kernel 2.6 series with Solaris 10

Properties of Processes

1.1 CPU I/O Burst Cycle

Chapter 5: CPU Scheduling

Subject Name: OPERATING SYSTEMS. Subject Code: 10EC65. Prepared By: Kala H S and Remya R. Department: ECE. Date:

LECTURE 3:CPU SCHEDULING

CSCI-GA Operating Systems Lecture 3: Processes and Threads -Part 2 Scheduling Hubertus Franke

8: Scheduling. Scheduling. Mark Handley

Practice Exercises 305

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition

Scheduling in the Supermarket

Uniprocessor Scheduling

Chapter 6: CPU Scheduling

Lecture 17: Threads and Scheduling. Thursday, 05 Nov 2009

CPU Scheduling. Daniel Mosse. (Most slides are from Sherif Khattab and Silberschatz, Galvin and Gagne 2013)

Course Syllabus. Operating Systems

MEMORY MANAGEMENT IN UNIX. STUDENT NAME : AMAL ISWIASI STUDENT NO: PRESENT TO : Prof. Dr. Hasan Huseyin Balik

Chap 7, 8: Scheduling. Dongkun Shin, SKKU

CS370 Operating Systems

High level scheduling: Medium level scheduling: Low level scheduling. Scheduling 0 : Levels

Lecture Topics. Announcements. Today: Operating System Overview (Stallings, chapter , ) Next: Processes (Stallings, chapter

Operating System Concepts Ch. 5: Scheduling

Chapter 9. Uniprocessor Scheduling

Real-Time Operating Systems Issues. Realtime Scheduling in SunOS 5.0

CPU Scheduling. Basic Concepts. Histogram of CPU-burst Times. Dispatcher. CPU Scheduler. Alternating Sequence of CPU and I/O Bursts

Lecture 5 / Chapter 6 (CPU Scheduling) Basic Concepts. Scheduling Criteria Scheduling Algorithms

Chapter 5: CPU Scheduling

ALL the assignments (A1, A2, A3) and Projects (P0, P1, P2) we have done so far.

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition

UNIX / LINUX - GETTING STARTED

ECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective. Part I: Operating system overview: Processes and threads

Chapter 5: CPU Scheduling. Operating System Concepts Essentials 8 th Edition

Last class: Today: CPU Scheduling. CPU Scheduling Algorithms and Systems

by Maria Lima Term Paper for Professor Barrymore Warren Mercy College Division of Mathematics and Computer Information Science

LAST LECTURE ROUND-ROBIN 1 PRIORITIES. Performance of round-robin scheduling: Scheduling Algorithms: Slide 3. Slide 1. quantum=1:

Operating Systems CS 323 Ms. Ines Abbes

Processes and Threads

Scheduling - Overview

Scheduling. Scheduling. Scheduling. Scheduling Criteria. Priorities. Scheduling

OPERATING SYSTEMS CS3502 Spring Processor Scheduling. Chapter 5

Chapter 5 CPU scheduling

CPU Scheduling: Objectives

238P: Operating Systems. Lecture 14: Process scheduling

SMD149 - Operating Systems

CS 153 Design of Operating Systems Winter 2016

Chapter 5: Process Scheduling

UNIX rewritten using C (Dennis Ritchie) UNIX (v7) released (ancestor of most UNIXs).

Multiprocessor and Real-Time Scheduling. Chapter 10

Overview of Unix / Linux operating systems

W4118: advanced scheduling

CS370 Operating Systems

Chapter 5: CPU Scheduling

Chap 7, 8: Scheduling. Dongkun Shin, SKKU

Lecture Topics. Announcements. Today: Uniprocessor Scheduling (Stallings, chapter ) Next: Advanced Scheduling (Stallings, chapter

CHAPTER 2: PROCESS MANAGEMENT

Preview. Process Scheduler. Process Scheduling Algorithms for Batch System. Process Scheduling Algorithms for Interactive System

CSE120 Principles of Operating Systems. Prof Yuanyuan (YY) Zhou Scheduling

HIGH PERFORMANCE COMPUTING: MODELS, METHODS, & MEANS OPERATING SYSTEMS 1

Uniprocessor Scheduling. Aim of Scheduling

Uniprocessor Scheduling. Aim of Scheduling. Types of Scheduling. Long-Term Scheduling. Chapter 9. Response time Throughput Processor efficiency

Assignment 3 (Due date: Thursday, 10/15/2009, in class) Part One: Provide brief answers to the following Chapter Exercises questions:

Operating System Review Part

Operating Systems. Scheduling

CS307: Operating Systems

CSE 120 Principles of Operating Systems Spring 2017

ò mm_struct represents an address space in kernel ò task represents a thread in the kernel ò A task points to 0 or 1 mm_structs

Chapter 5: CPU Scheduling. Operating System Concepts 9 th Edit9on

Scheduling. Scheduling 1/51

Scheduling. Don Porter CSE 306

Uniprocessor Scheduling. Chapter 9

PROCESS SCHEDULING II. CS124 Operating Systems Fall , Lecture 13

Operating Systems: Quiz2 December 15, Class: No. Name:

Multiprocessor and Real- Time Scheduling. Chapter 10

Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras

The UNIX operating system is a set of programs that act as a link between the computer and the user.

Chapter 19: Real-Time Systems. Operating System Concepts 8 th Edition,

Last Class: Processes

CS370 Operating Systems

Scheduling Mar. 19, 2018

Scheduling policy. Reference: ULK3e 7.1. Scheduling in Linux 1 / 20

Ch 4 : CPU scheduling

CPU Scheduling. Operating Systems (Fall/Winter 2018) Yajin Zhou ( Zhejiang University

Uniprocessor Scheduling. Basic Concepts Scheduling Criteria Scheduling Algorithms. Three level scheduling

Processes. Overview. Processes. Process Creation. Process Creation fork() Processes. CPU scheduling. Pål Halvorsen 21/9-2005

CPU Scheduling. The scheduling problem: When do we make decision? - Have K jobs ready to run - Have N 1 CPUs - Which jobs to assign to which CPU(s)

CMPSC 311- Introduction to Systems Programming Module: UNIX/Operating Systems

COSC243 Part 2: Operating Systems

Scheduling of processes

CS370 Operating Systems

CPU Scheduling Algorithms

Announcements. Program #1. Program #0. Reading. Is due at 9:00 AM on Thursday. Re-grade requests are due by Monday at 11:59:59 PM.

Scheduling. Scheduling 1/51

Multi-Level Feedback Queues

Introduction to Linux Overview and Some History

Round Robin (RR) ACSC 271 Operating Systems. RR Example. RR Scheduling. Lecture 9: Scheduling Algorithms

(MCQZ-CS604 Operating Systems)

Scheduling II. Today. Next Time. ! Proportional-share scheduling! Multilevel-feedback queue! Multiprocessor scheduling. !

Transcription:

Unix SVR4 (Open Solaris and illumos distributions) CPU Scheduling

outline Definition the Unix SVR4 Definition the OpenSolaris Definition the Illumos Scheduling review Unix SVR4 Scheduling SVR4 priority classes CPU Scheduling

UNIX SVR4 The Unix operating system is a set of programs that act as a link between the computer and the user. The computer programs that allocate the system resources and coordinate all the details of the computer's internals is called the operating system or the kernel. Users communicate with the kernel through a program known as the shell. The shell is a command line interpreter; it translates commands entered by the user and converts them into a language that is understood by the kernel. There are various Unix variants available in the market. Solaris Unix, AIX, HP Unix and BSD are a few examples. Linux is also a flavor of Unix which is freely available.

UNIX SVR4 Unix was originally developed in 1969 by a group of AT&T employees (Ken Thompson, Dennis Ritchie, and Douglas McIlroy) and in 1983. Four major versions of System V were released, numbered 1, 2, 3, and 4. System V Release 4, or SVR4, was commercially the most successful version. Several people can use a Unix computer at the same time; hence Unix is called a multiuser system. A user can also run multiple programs at the same time; hence Unix is a multitasking environment.

OpenSolaris OpenSolaris is an open source operating system,which is developed and sponsored by Sun Microsystems Inc. and a community of contributors. It is based on an development version of an enterprise Solaris OS, which was open sourced by Sun in 2005. More precisely, the OpenSolaris now represents an operating system, a community and a source base and in 2010, Oracle decided to discontinue open development of the core software, and replaced the OpenSolaris distribution model with the proprietary Solaris Express

illumos Illumos is a free and open-source unix operating system it is derives from opensolaris which in turn derives from SVR4 unix and berkeley software distribution (BSD) illumos comprises a kernel, device drivers, system libraries and utility software for system administration. This core is now the base for many different opensourced opensolaris distribution. Illumos is a consolidation of software that forms the core of an operating system.

illumos Finally OpenSolaris and its derivatives are the only SVR4 descendants that are opensource software. Core system software continues to be developed as illumos used in illumos distributions such as SmartOS, OpenIndiana and others.

Scheduling review Scheduling mechanism is the part of the process manager that handles the removal of the running process of CPU and the selection of another process on the basis of a particular strategy. Scheduler chooses one from the ready threads to use the CPU when it is available. Scheduling policy determines when it is time for a thread to be removed from the CPU and which ready thread should be allocated the CPU next.

UNIX SVR4 Scheduling The scheduling algorithm used in UNIX SVR4 is a complete overhaul of the scheduling algorithm used in earlier UNIX systems Goal: give preference in the following order Highest preference to real-time processes. Next-highest to kernel-mode processes. Lowest preference to other user-mode processes (time-shared processes). Major enhancements The addition of a preemptable static priority scheduler. The introduction of (160) priority levels divided into three priority classes. The introduction of preemption points in the kernel (points where the kernel can safely interrupt and schedule a new process).

UNIX SVR4 Scheduling (cont.) Implementation A dispatch queue is associated with each priority level; processes at that level are executed round-robin (dispq) A bit-map vector, dqactmap, contains one bit for each priority level; the bit is set to one for any priority level with a nonempty queue. When a process leaves the Running state (block, timeslice expiration, or preemption), the dispatcher checks dqactmap and dispatches a ready process from the highest-priority nonempty queue.

Dispatch Queues 0 0 dqactmap 1 0 0 1... dispq 160 159 158 P P P 157 156 155 P P... Figure (1) SVR4 dispatch queues

UNIX SVR4 Scheduling (cont.) When a defined preemption point is reached, the kernel Checks the flag kprunrun If set this indicates that (at least one real-time process is in the Ready state), preempts the current process if it is of lower priority than the highest-priority real-time ready process A real-time process has a fixed priority and a fixed quantum A time-sharing process has a variable priority and a variable time (100ms for priority 0, 10ms for 59)

UNIX SVR4 Scheduling (cont.) quantum The priority is reduced every time the process uses up the time quantum and is raised when the process blocks on an event or resource The time quantum changes with the priority

SVR4 Priority Classes Priority classes and levels Real-time (159-100) Guaranteed execution before kernel or time-sharing processes Preemption points can be used to preempt kernel or user processes Lowest-priority processes: user applications other than real-time Kernel (99-60) Guaranteed execution before timesharing processes Time-shared (59-0) Lowest-priority processes: user applications other than real-time Figure (2) SVR4 Priority Classes

SVR4 Priority Classes Real-time class Soft real-time capabilities are needed for quality of service sensitive applications - video, audio, multimedia, virtual reality require bounded dispatch latency, and response time dispatch latency - time from the moment the process becomes runnable to the moment it begins to run response time = interrupt processing + dispatch latency + real-time process execution

SVR4 Priority Classes Time-sharing class changes process priorities dynamically round-robin scheduling with the same priority event driven scheduling reduces process priority each time it uses up its time slice boosts the priority of the process if it blocks on an event or resource, or if it takes a long time to use up it quantum

CPU Scheduling The CPU is a resource that must be shared by all processes. The part of the kernel that apportions CPU time between processes is called the scheduler. The traditional UNIX scheduler uses preemptive round-robin scheduling. Processes of equal priority are scheduled in a round-robin manner, each running for a fixed quantum of time( typically 100 milliseconds). If a higher priority process becomes runnable, it will preempt the current process (unless the current process is running in kernel mode), even if the current process has not used up its time quantum. In traditional UNIX systems, the process priority is determined by two factors-the nice value and the usage factor.

CPU Scheduling When a process receives some CPU time, the kernel reduces its priority. This scheme prevents starvation of any process, since eventually the priority of any process that is waiting to run will rise high enough for it to be scheduled. A process executing in kernel mode may relinquish the CPU if it must block for a resource or event. When it becomes runnable again, it is assigned a kernel priority. In 4.3BSD, for instance, the kernel priorities range from 0 to 49, and user priorities from 50 to 127. While user priorities vary with CPU usage, kernel priorities are fixed, and depend on the reason for sleeping. Because of this, kernel priorities are also known as sleep priorities. Table 2-2 lists the sleep priorities in 4.3BSD UNIX.