CHAPTER 7 IMPLEMENTATION OF DYNAMIC VOLTAGE SCALING IN LINUX SCHEDULER

Size: px
Start display at page:

Download "CHAPTER 7 IMPLEMENTATION OF DYNAMIC VOLTAGE SCALING IN LINUX SCHEDULER"

Transcription

1 73 CHAPTER 7 IMPLEMENTATION OF DYNAMIC VOLTAGE SCALING IN LINUX SCHEDULER 7.1 INTRODUCTION The proposed DVS algorithm is implemented on DELL INSPIRON 6000 model laptop, which has Intel Pentium Mobile Processor with maximum frequency of 1.86 GHz. The algorithm is implemented as extension modules to the Fedora core Linux kernel version The experimentation results conclude that the UBFG based algorithm achieves better energy savings than the existing algorithms. This chapter explains the implementation and experimental set up in detail. 7.2 LINUX SCHEDULER Multitasking kernels (like Linux) allow more than one process to exist at any given time, and furthermore each process is allowed to run as if it were the only process on the system. Processes do not need to be aware of any other processes unless they are explicitly designed to be. This makes programs easier to develop, maintain, and port. Though each CPU in a system can execute only one thread within a process at a time, many threads from many processes appear to be executing at the same time. This is because threads are scheduled to run for very short periods of time and then other threads are given a chance to run. A kernel s scheduler enforces a thread scheduling policy, including when, for how long, and in some cases where

2 74 (on Symmetric Multiprocessing (SMP) systems) threads can execute. Normally the scheduler runs in its own thread, which is woken up by a timer interrupt. Otherwise it is invoked via a system call or another kernel thread that wishes to yield the CPU. A thread will be allowed to execute for a certain amount of time, then a context switch to the scheduler thread will occur, followed by another context switch to a thread of the scheduler s choice. This cycle continues, and in this way a certain policy for CPU usage is carried out. An important goal for the Linux scheduler is efficiency. This means that it must try to allow as much real work as possible to be done while staying within the restraints of other requirements. For example - since context switching is expensive, allowing tasks to run for longer periods of time increases efficiency. Also, since the scheduler s code is run quite often, its own speed is an important factor in scheduling efficiency.the code making scheduling decisions should run as quickly and efficiently as possible. Efficiency suffers for the sake of other goals such as interactivity, because interactivity essentially means having more frequent context switches. However, once all other requirements have been met, overall efficiency is the most important goal for the scheduler. The Linux 2.6 scheduler does not contain any algorithm that runs in worse than O (1) time. That is, every part of the scheduler is guaranteed to execute within a certain constant amount of time regardless of how many tasks are on the system. This allows the Linux kernel to efficiently handle massive number of tasks without increasing overhead costs as the number of tasks grows. There are two key data structures in the Linux 2.6 scheduler that allow for it to perform its duties in O (1) time and its design revolves around them run queues and priority arrays. The Linux scheduler takes care of scheduling the tasks for the processor to execute. Even in multiprocessing systems, at any instance of time

3 75 there can be only one process that is executed in a processor. The OS scheduler is the module that decides which process is to make use of the processor. The process switching, privilege, task management of the Linux scheduler had to be analyzed in detail for incorporating the DVS algorithm. 7.3 LINUX KERNEL In a Linux kernel, a CPU can run in either user mode or kernel mode. When a program is executed in user mode, it cannot directly access the kernel data structures or the kernel programs. Each CPU model provides special instructions to switch over from user mode to kernel mode and viceversa. A program usually executes in user mode and switches to kernel mode only when requesting a service provided by the kernel. The kernel interacts with the input/output devices by means of device drivers. The device drivers are included in the kernel. Each driver interacts with the remaining parts of the kernel through a specific interface. A device driver can be written as a module that can be dynamically loaded in the kernel without requiring the system to be rebooted. It is also possible to dynamically unload a module that is no longer needed. To add a new functionality to the Linux kernel, the new code can be either compiled as module or can be statically linked to the kernel. The kernel has two key tasks to perform in managing modules. The first task is to make sure the rest of the kernel can reach the module s global symbols such as the entry point to its main function. A module must know the addresses of symbols in the kernel and in other modules. Thus, references are resolved once and for all when the module is linked. The second task consists of keeping track of the use of the modules, so that no module is unloaded while another module or another part of the kernel is using it. A simple reference count keeps track of each module usage.

4 DVS PROCESSOR The proposed DVS algorithm is implemented on DELL INSPIRON 6000 model laptop, which has Intel Pentium Mobile Processor with maximum frequency of 1.86GHz. This processor adopts Speed Step technology where the processor is defined to have five active states with frequencies ranging from 800MHz to 1.6GHz shown in Table 7.1. Intel Pentium mobile processor is a CPU frequency scaling processor which can switch between various defined frequencies and the operating voltages on the fly without any kernel or user involvement. This feature guarantees very fast switching to frequencies high enough to serve user needs and low enough to save power. Table 7.1 Voltage scaling capability of Intel Pentium Mobile processor with Speed Step technology Frequency (MHz) Voltage (mv) 800(idle time) IMPLEMENTATION DVS algorithm is implemented as extension modules to the Linux Kernel version Although it is not a real time operating system, Linux is extended easily through modules and provides a robust development environment. The high level view of the software architecture for implementation of DVS algorithm is shown in Figure 7.1.

5 77 User Level Non-RT DVS RT Task Set Kernel Level Speed Step Module Periodic RT Task Module RT Scheduler with RT-DVS Linux Kernel Scheduler Hook Figure 7.1 Software architecture for RT-DVS implementation The kernel level code is implemented as Linux kernel modules and these modules can be loaded and unloaded using the ins mod and rm mod commands respectively during run time. The software implementation comprises of three modules viz., real time task module, task abstraction module and the algorithm module. The real time task module and the task abstraction modules are inserted into the kernel after successful compilation. The real time module acts as a real-time abstraction layer that helps in simulating the real time functionality for the operating system and provides the user interaction. It registers with the proc and provides a file interface to write and read setting values. The registered intervals and worst case execution time of real time tasks are shown in Figure 7.2. The set of real time tasks is invoked by running rtt. c which has worst case execution time, period and deadline of tasks. The implementation of real time module and DVS scheduler is made by inserting modules into the kernel namely rt mod. ko

6 78 and scheddvs. ko. The rt mod invokes the DVS scheduler for scheduling its real time tasks and managing the frequency as shown in Figure 7.3. The algorithm communicates the decision taken to the hardware using the CPUFreq driver component. This driver can be compiled as module and inserted into the kernel at runtime or they can be compiled as the part of the kernel itself. The GNU-C compiler gcc is used to compile the drivers as modules and also for compiling as part of the kernel (Figure 7.4). Using the - make xconfig command in Linux, the user would be presented a GUI based option list to include the driver as a part of the kernel. The CPUFreq core code is located in linux / ker nel / cpufreq. c. This CPUFreq code offers a standardized interface for the CPUFreq architecture as well as to notifiers. These are device drivers or other part of the kernel that need to be informed of policy changes or of all frequency changes. CPUFreq driver components are specific to the processor and implements decision determined by the CPUFreq governors. These governors implement policies regarding the frequency and voltage scaling. The system user can change governors and their corresponding parameters at run time. There are currently three governors in Linux kernel viz., Power save governor that statically sets the processor to the lowest frequency and voltage available, Performance governor that sets the processor to the highest frequency and voltage available and User space governor which allows the user to set the desired frequency and voltage through the / proc interface. After receiving the decision from the DVS algorithm through the CPUFreq interface, the appropriate CPUFreq driver components are accessed to scale the voltage and frequency accordingly. Figures 7.5 to 7.7 show the proof of results of experimentation of DVS governors for idle time, different work loads and CPU intensive operation.

7 79 INSMOD RTMOD.O (INSTALLATION) INIT_MODULE : 1. REGISTER WITH PROC AND PROVIDE THE FOPS STRUCTURE 2. RETURN SUCCESS/FAILURE RMMOD RTMOD.O (UNINSTALLATION) CLEANUP_MODULE : 1. UN REGISTER WITH PROC AND RETURN SUCCESS/FAILURE FOPEN(,,PID) RTMOD_OPEN : 1.GET THE PROCESS ID AND INIT THE RT TASK STRUCT 2. RETURN SUCCESS / FAILURE FILE OPERATIONS - ALGO CLOSE (FP) USER_READ RTMOD_CLOSE : 1. RELEASE RT STRUCTURES 2. RETURN SUCCESS /FAILURE FREAD RTMOD_READ : 1. PREPARE A MESSAGE WITH THE CURRENT STATISTICS AND PASS IT ON TO THE USER LEVEL. FWRITE USER_WRITE RTMOD_WRITE : 1. GET THE INTERVAL AND WORST CASE EXECUTION TIME AND PASS IT TO SCHEDULER. Figure 7.2 Modular flow diagrams - rt mod. c

8 80 INSMOD CHGFREQ.O (INSTALLATION) INIT_MODULE : 1.REGISTER WITH PROC AND PROVIDE THE FOPS STRUCTURE 2. RETURN SUCCESS/FAILURE RMMOD CHGFREQ.O (UNINSTALLATION) CLEANUP_MODULE : 1. UN REGISTER WITH PROC AND RETURN SUCCESS/FAILURE FILE OPERATIONS - ALGO CAT /PROC/CHGFREQ <PROC FREQ : 500> CHGFREQ_OPEN : 1. INCREMENT AN OPEN COUNT 2. RETURN SUCCESS ECHO 500 > /PROC/CHGFREQ USER_RD USER_WR CHGFREQ_CLOSE : 1. DECREMENT THE OPEN COUNT 2. RETURN SUCCESS CHGFREQ_READ : 1. GET THE CURRENT FREQ, VOLTAGE FROM PROCESSOR REGISTERS AND PREPARE MESSAGE. 2. COPY THE MESSAGE TO USER SPACE CHGFREQ_WRITE: 1. COPY THE SETTING FREQ, VOLTAGE AS A MESSAGE FROM THE USER SPACE. 2. PARSE MESSAGE AND SET THE RESPECTIVE REGISTERS WITH PROPOSED VALUES Figure 7.3 Modular flow diagrams - chgfreq. c

9 Figure 7.4 GUI based options in configuration setup in Linux 81

10 Figure 7.5 Power save Governor 82

11 Figure 7.6 User space Governor 83

12 Figure 7.7 Performance Governor 84

13 OBSERVATIONS AND RESULTS Experiments for different workloads are done to ensure that the DVS algorithm achieves minimum power consumption and maintains effective system performance while experiencing variable processor performance in reality. The next goal was to quantify, by simply measuring the energy usage for completing one trial of the experiment. The comparative study was based on battery usage for set of tasks for system set up without DVS, look ahead RT-DVS, and UBFG RT-DVS. The energy consumption is measured by running the laptop on battery and using the ACPI (Advanced Configuration Power Interface) in Linux to get a fairly accurate evaluation of the remaining capacity of the battery (in mah ) as shown in Figure 7.8. Figure 7.8 Battery usage measurement using ACPI in Linux

14 86 The battery usage for tasks with and without DVS showed good variance henceforth proving that Dynamic voltage scaling technique is a noteworthy technology for portable devices. Look ahead RT-DVS algorithm, which is considered as the most aggressive of RT-DVS algorithm showed marginal difference from the DVS set up energy savings. Utilization based frequency grading algorithm is better than the existing RT-DVS algorithms for achieving more energy savings. The power measurements indicate that there is 8 to 14% savings than the most aggressive look ahead EDF algorithm. The comparison charts of battery usage measurements shown in Figure 7.9 prove the potential energy savings in the DVS technology and the enhanced performance of UBFG algorithm. Battery consumption in mah Battery measurement Static EDF LA_EDF Proposed Algorithms Static EDF LA_EDF Proposed Figure 7.9 Comparison charts of battery usage measurements of DVS algorithms

15 87 Figure 7.10 shows the actual power consumption measured for real time DVS algorithms while varying worst-case CPU utilization for a set of three tasks which consume 80% of their worst-case computation allocated for each invocation. The measurements reflect the total system power including constant energy overheads, not just the CPU energy dissipation. Even with this overhead, the proposed DVS mechanism show a significant (~8-10%) reduction in power consumption than existing algorithm, while still providing the deadline guarantees of a real time system. Power in Watts Real platform Utilization Static EDF CC_EDF LA_EDF Proposed Figure 7.10 Power consumptions on real platform

16 88 Figure 7.11 shows a simulation with identical parameters to these measurements. The simulation only reflects the processor s energy consumption, and does not include any energy overheads from the rest of the system. It is clear that, except for the addition of constant overheads in the actual measurements, the results are nearly identical and validates the simulation results. Simulation results which are shown earlier really hold in real systems, despite the simplifying assumptions in the simulator. The simulations are accurate and may be useful for predicting the performance of RT-DVS implementation. Power arbitrary unit) Simulated platform Static EDF CC_EDF LA_EDF Proposed Utilization Figure 7.11 Power consumptions on simulated platform

17 CONCLUSION Based on interpretation, the voltage scaling capability of a processor supporting Speed Step technology is explored. The proposed DVS algorithm, which combines the goodness of static EDF and look ahead EDF algorithm, is implemented as a modular system in the Linux kernel and performance is analyzed with the existing algorithms. The proposed algorithm achieves significant energy savings while preserving timeline guarantees compared to the previously proposed algorithms. Due to the modularity of the implementation, additional algorithms can be implemented and validated using the system.

OVERHEADS ENHANCEMENT IN MUTIPLE PROCESSING SYSTEMS BY ANURAG REDDY GANKAT KARTHIK REDDY AKKATI

OVERHEADS ENHANCEMENT IN MUTIPLE PROCESSING SYSTEMS BY ANURAG REDDY GANKAT KARTHIK REDDY AKKATI CMPE 655- MULTIPLE PROCESSOR SYSTEMS OVERHEADS ENHANCEMENT IN MUTIPLE PROCESSING SYSTEMS BY ANURAG REDDY GANKAT KARTHIK REDDY AKKATI What is MULTI PROCESSING?? Multiprocessing is the coordinated processing

More information

POWER MANAGEMENT AND ENERGY EFFICIENCY

POWER MANAGEMENT AND ENERGY EFFICIENCY POWER MANAGEMENT AND ENERGY EFFICIENCY * Adopted Power Management for Embedded Systems, Minsoo Ryu 2017 Operating Systems Design Euiseong Seo (euiseong@skku.edu) Need for Power Management Power consumption

More information

Computer Science Window-Constrained Process Scheduling for Linux Systems

Computer Science Window-Constrained Process Scheduling for Linux Systems Window-Constrained Process Scheduling for Linux Systems Richard West Ivan Ganev Karsten Schwan Talk Outline Goals of this research DWCS background DWCS implementation details Design of the experiments

More information

CS 326: Operating Systems. CPU Scheduling. Lecture 6

CS 326: Operating Systems. CPU Scheduling. Lecture 6 CS 326: Operating Systems CPU Scheduling Lecture 6 Today s Schedule Agenda? Context Switches and Interrupts Basic Scheduling Algorithms Scheduling with I/O Symmetric multiprocessing 2/7/18 CS 326: Operating

More information

Power Management for Embedded Systems

Power Management for Embedded Systems Power Management for Embedded Systems Minsoo Ryu Hanyang University Why Power Management? Battery-operated devices Smartphones, digital cameras, and laptops use batteries Power savings and battery run

More information

Operating Systems Design Fall 2010 Exam 1 Review. Paul Krzyzanowski

Operating Systems Design Fall 2010 Exam 1 Review. Paul Krzyzanowski Operating Systems Design Fall 2010 Exam 1 Review Paul Krzyzanowski pxk@cs.rutgers.edu 1 Question 1 To a programmer, a system call looks just like a function call. Explain the difference in the underlying

More information

Implementing Scheduling Algorithms. Real-Time and Embedded Systems (M) Lecture 9

Implementing Scheduling Algorithms. Real-Time and Embedded Systems (M) Lecture 9 Implementing Scheduling Algorithms Real-Time and Embedded Systems (M) Lecture 9 Lecture Outline Implementing real time systems Key concepts and constraints System architectures: Cyclic executive Microkernel

More information

- information for users and developers - Dominik Brodowski some additions and corrections by Nico Golde

- information for users and developers - Dominik Brodowski some additions and corrections by Nico Golde 1 von 5 11.10.2016 10:03 CPU frequency and voltage scaling code in the Linux(TM) kernel L i n u x C P U F r e q C P U F r e q G o v e r n o r s - information for users and developers - Dominik Brodowski

More information

PROCESS SCHEDULING II. CS124 Operating Systems Fall , Lecture 13

PROCESS SCHEDULING II. CS124 Operating Systems Fall , Lecture 13 PROCESS SCHEDULING II CS124 Operating Systems Fall 2017-2018, Lecture 13 2 Real-Time Systems Increasingly common to have systems with real-time scheduling requirements Real-time systems are driven by specific

More information

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

CPU Scheduling. Daniel Mosse. (Most slides are from Sherif Khattab and Silberschatz, Galvin and Gagne 2013) CPU Scheduling Daniel Mosse (Most slides are from Sherif Khattab and Silberschatz, Galvin and Gagne 2013) Basic Concepts Maximum CPU utilization obtained with multiprogramming CPU I/O Burst Cycle Process

More information

UNIT -3 PROCESS AND OPERATING SYSTEMS 2marks 1. Define Process? Process is a computational unit that processes on a CPU under the control of a scheduling kernel of an OS. It has a process structure, called

More information

Lecture 4: Extensibility (and finishing virtual machines) CSC 469H1F Fall 2006 Angela Demke Brown

Lecture 4: Extensibility (and finishing virtual machines) CSC 469H1F Fall 2006 Angela Demke Brown Lecture 4: Extensibility (and finishing virtual machines) CSC 469H1F Fall 2006 Angela Demke Brown Announcements First assignment out tomorrow Today s tutorial looks at some of the tools you will need to

More information

Linux - Not real-time!

Linux - Not real-time! Linux - Not real-time! Date: 16.01.2015 Author(s): Michal Koziel www.bitvis.no 1 Abstract A system is said to be real-time if it can respond to external triggers and perform periodic tasks with deterministic

More information

Power Measurement Using Performance Counters

Power Measurement Using Performance Counters Power Measurement Using Performance Counters October 2016 1 Introduction CPU s are based on complementary metal oxide semiconductor technology (CMOS). CMOS technology theoretically only dissipates power

More information

COL862 Programming Assignment-1

COL862 Programming Assignment-1 Submitted By: Rajesh Kedia (214CSZ8383) COL862 Programming Assignment-1 Objective: Understand the power and energy behavior of various benchmarks on different types of x86 based systems. We explore a laptop,

More information

LECTURE 3:CPU SCHEDULING

LECTURE 3:CPU SCHEDULING LECTURE 3:CPU SCHEDULING 1 Outline Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time CPU Scheduling Operating Systems Examples Algorithm Evaluation 2 Objectives

More information

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

CPU Scheduling. Operating Systems (Fall/Winter 2018) Yajin Zhou (  Zhejiang University Operating Systems (Fall/Winter 2018) CPU Scheduling Yajin Zhou (http://yajin.org) Zhejiang University Acknowledgement: some pages are based on the slides from Zhi Wang(fsu). Review Motivation to use threads

More information

CSE398: Network Systems Design

CSE398: Network Systems Design CSE398: Network Systems Design Instructor: Dr. Liang Cheng Department of Computer Science and Engineering P.C. Rossin College of Engineering & Applied Science Lehigh University February 23, 2005 Outline

More information

Introduction to Embedded Systems

Introduction to Embedded Systems Introduction to Embedded Systems Sanjit A. Seshia UC Berkeley EECS 9/9A Fall 0 008-0: E. A. Lee, A. L. Sangiovanni-Vincentelli, S. A. Seshia. All rights reserved. Chapter : Operating Systems, Microkernels,

More information

ANALYSIS OF A DYNAMIC FREQUENCY SCALING ALGORTIHM ON XSCALE.

ANALYSIS OF A DYNAMIC FREQUENCY SCALING ALGORTIHM ON XSCALE. ANALYSIS OF A DYNAMIC FREQUENCY SCALING ALGORTIHM ON XSCALE. Group 9 Ishdeep Singh Sawhney (issawhne@unity.ncsu.edu) Shobhit Kanaujia (sokanauj@unity.ncsu.edu) Prasanth Ganesan (pganesa@unity.ncsu.edu)

More information

Scheduling. Today. Next Time Process interaction & communication

Scheduling. Today. Next Time Process interaction & communication Scheduling Today Introduction to scheduling Classical algorithms Thread scheduling Evaluating scheduling OS example Next Time Process interaction & communication Scheduling Problem Several ready processes

More information

EECS 571 Principles of Real-Time Embedded Systems. Lecture Note #10: More on Scheduling and Introduction of Real-Time OS

EECS 571 Principles of Real-Time Embedded Systems. Lecture Note #10: More on Scheduling and Introduction of Real-Time OS EECS 571 Principles of Real-Time Embedded Systems Lecture Note #10: More on Scheduling and Introduction of Real-Time OS Kang G. Shin EECS Department University of Michigan Mode Changes Changes in mission

More information

Announcements. Reading. Project #1 due in 1 week at 5:00 pm Scheduling Chapter 6 (6 th ed) or Chapter 5 (8 th ed) CMSC 412 S14 (lect 5)

Announcements. Reading. Project #1 due in 1 week at 5:00 pm Scheduling Chapter 6 (6 th ed) or Chapter 5 (8 th ed) CMSC 412 S14 (lect 5) Announcements Reading Project #1 due in 1 week at 5:00 pm Scheduling Chapter 6 (6 th ed) or Chapter 5 (8 th ed) 1 Relationship between Kernel mod and User Mode User Process Kernel System Calls User Process

More information

Operating Systems Course 2 nd semester 2016/2017 Chapter 1: Introduction

Operating Systems Course 2 nd semester 2016/2017 Chapter 1: Introduction Operating Systems Course 2 nd semester 2016/2017 Chapter 1: Introduction Lecturer: Eng. Mohamed B. Abubaker Note: Adapted from the resources of textbox Operating System Concepts, 9 th edition What is an

More information

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

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition Chapter 6: CPU Scheduling Silberschatz, Galvin and Gagne 2013 Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Real-Time

More information

Scheduling. Scheduling 1/51

Scheduling. Scheduling 1/51 Scheduling 1/51 Scheduler Scheduling Scheduler allocates cpu(s) to threads and processes. This action is known as scheduling. The scheduler is a part of the process manager code that handles scheduling.

More information

Commercial Real-time Operating Systems An Introduction. Swaminathan Sivasubramanian Dependable Computing & Networking Laboratory

Commercial Real-time Operating Systems An Introduction. Swaminathan Sivasubramanian Dependable Computing & Networking Laboratory Commercial Real-time Operating Systems An Introduction Swaminathan Sivasubramanian Dependable Computing & Networking Laboratory swamis@iastate.edu Outline Introduction RTOS Issues and functionalities LynxOS

More information

Real-Time and Performance Improvements in the

Real-Time and Performance Improvements in the 1 of 7 6/18/2006 8:21 PM Real-Time and Performance Improvements in the 2.6 Linux Kernel William von Hagen Abstract Work on improving the responsiveness and real-time performance of the Linux kernel holds

More information

A comparison between the scheduling algorithms used in RTLinux and in VxWorks - both from a theoretical and a contextual view

A comparison between the scheduling algorithms used in RTLinux and in VxWorks - both from a theoretical and a contextual view A comparison between the scheduling algorithms used in RTLinux and in VxWorks - both from a theoretical and a contextual view Authors and Affiliation Oskar Hermansson and Stefan Holmer studying the third

More information

SHORT REFRESHER ON SCHEDULING. What is scheduler?

SHORT REFRESHER ON SCHEDULING. What is scheduler? SHORT REFRESHER ON SCHEDULING What is scheduler? Overview of Processes and Threads Programs and Processes Threads Scheduling CPU and I/O-bound Threads Context Switching Linux Processes/Threads Programs

More information

Computer Science. ! Other approaches:! Special systems designed for extensibility

Computer Science. ! Other approaches:! Special systems designed for extensibility Application-Specific Service Technologies for Commodity OSes in Real-Time Environments Richard West and Gabriel Parmer Boston University Boston, MA {richwest,gabep1}@cs.bu.edu Introduction! Leverage commodity

More information

Multimedia Systems 2011/2012

Multimedia Systems 2011/2012 Multimedia Systems 2011/2012 System Architecture Prof. Dr. Paul Müller University of Kaiserslautern Department of Computer Science Integrated Communication Systems ICSY http://www.icsy.de Sitemap 2 Hardware

More information

Operating Systems Overview

Operating Systems Overview Operating Systems Overview 1 operating system no clear traditional definition each definition cover a distinct aspect an interface between applications and hardware true, this was the first reason for

More information

Multiprocessor scheduling

Multiprocessor scheduling Chapter 10 Multiprocessor scheduling When a computer system contains multiple processors, a few new issues arise. Multiprocessor systems can be categorized into the following: Loosely coupled or distributed.

More information

Linux Kernel Hacking Free Course

Linux Kernel Hacking Free Course Linux Kernel Hacking Free Course 3 rd edition G.Grilli, University of me Tor Vergata IRQ DISTRIBUTION IN MULTIPROCESSOR SYSTEMS April 05, 2006 IRQ distribution in multiprocessor systems 1 Contents: What

More information

Precedence Graphs Revisited (Again)

Precedence Graphs Revisited (Again) Precedence Graphs Revisited (Again) [i,i+6) [i+6,i+12) T 2 [i,i+6) [i+6,i+12) T 3 [i,i+2) [i+2,i+4) [i+4,i+6) [i+6,i+8) T 4 [i,i+1) [i+1,i+2) [i+2,i+3) [i+3,i+4) [i+4,i+5) [i+5,i+6) [i+6,i+7) T 5 [i,i+1)

More information

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

Uniprocessor Scheduling. Basic Concepts Scheduling Criteria Scheduling Algorithms. Three level scheduling Uniprocessor Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Three level scheduling 2 1 Types of Scheduling 3 Long- and Medium-Term Schedulers Long-term scheduler Determines which programs

More information

Scheduling. Scheduling 1/51

Scheduling. Scheduling 1/51 Scheduling 1/51 Learning Objectives Scheduling To understand the role of a scheduler in an operating system To understand the scheduling mechanism To understand scheduling strategies such as non-preemptive

More information

A Comparison of Scheduling Latency in Linux, PREEMPT_RT, and LITMUS RT. Felipe Cerqueira and Björn Brandenburg

A Comparison of Scheduling Latency in Linux, PREEMPT_RT, and LITMUS RT. Felipe Cerqueira and Björn Brandenburg A Comparison of Scheduling Latency in Linux, PREEMPT_RT, and LITMUS RT Felipe Cerqueira and Björn Brandenburg July 9th, 2013 1 Linux as a Real-Time OS 2 Linux as a Real-Time OS Optimizing system responsiveness

More information

PROCESS SCHEDULING Operating Systems Design Euiseong Seo

PROCESS SCHEDULING Operating Systems Design Euiseong Seo PROCESS SCHEDULING 2017 Operating Systems Design Euiseong Seo (euiseong@skku.edu) Histogram of CPU Burst Cycles Alternating Sequence of CPU and IO Processor Scheduling Selects from among the processes

More information

Reference Model and Scheduling Policies for Real-Time Systems

Reference Model and Scheduling Policies for Real-Time Systems ESG Seminar p.1/42 Reference Model and Scheduling Policies for Real-Time Systems Mayank Agarwal and Ankit Mathur Dept. of Computer Science and Engineering, Indian Institute of Technology Delhi ESG Seminar

More information

CPU Resource Reservation for Simultaneous Multi-Thread Systems. Hiroshi Inoue, Takao Moriyama, Yasushi Negishi, and Moriyoshi Ohara

CPU Resource Reservation for Simultaneous Multi-Thread Systems. Hiroshi Inoue, Takao Moriyama, Yasushi Negishi, and Moriyoshi Ohara RT676 Computer Science 13 pages Research Report September 12, 6 CPU Resource Reservation for Simultaneous Multi-Thread Systems Hiroshi Inoue, Takao Moriyama, Yasushi Negishi, and Moriyoshi Ohara IBM Research,

More information

Scheduling the Intel Core i7

Scheduling the Intel Core i7 Third Year Project Report University of Manchester SCHOOL OF COMPUTER SCIENCE Scheduling the Intel Core i7 Ibrahim Alsuheabani Degree Programme: BSc Software Engineering Supervisor: Prof. Alasdair Rawsthorne

More information

Linux (Fedora or Slackware) CPU Scheduling

Linux (Fedora or Slackware) CPU Scheduling Linux (Fedora or Slackware) CPU Scheduling DHEYAULDEEN MAHMOOD Student no. 163104411 Department: IT Submit to Prof.Dr.Hassan Huseyin Balik Outline Introduction Linux Fedora CPU scheduler in Linux fedora

More information

Thread Affinity Experiments

Thread Affinity Experiments Thread Affinity Experiments Power implications on Exynos Introduction The LPGPU2 Profiling Tool and API provide support for CPU thread affinity locking and logging, and although this functionality is not

More information

Frequently asked questions from the previous class survey

Frequently asked questions from the previous class survey CS 370: OPERATING SYSTEMS [CPU SCHEDULING] Shrideep Pallickara Computer Science Colorado State University L14.1 Frequently asked questions from the previous class survey Turnstiles: Queue for threads blocked

More information

Real-time operating systems and scheduling

Real-time operating systems and scheduling Real-time operating systems and scheduling Problem 21 Consider a real-time operating system (OS) that has a built-in preemptive scheduler. Each task has a unique priority and the lower the priority id,

More information

Scheduling. CSC400 - Operating Systems. 7: Scheduling. J. Sumey. one of the main tasks of an OS. the scheduler / dispatcher

Scheduling. CSC400 - Operating Systems. 7: Scheduling. J. Sumey. one of the main tasks of an OS. the scheduler / dispatcher CSC400 - Operating Systems 7: Scheduling J. Sumey Scheduling one of the main tasks of an OS the scheduler / dispatcher concerned with deciding which runnable process/thread should get the CPU next occurs

More information

Operating Systems: Internals and Design Principles. Chapter 2 Operating System Overview Seventh Edition By William Stallings

Operating Systems: Internals and Design Principles. Chapter 2 Operating System Overview Seventh Edition By William Stallings Operating Systems: Internals and Design Principles Chapter 2 Operating System Overview Seventh Edition By William Stallings Operating Systems: Internals and Design Principles Operating systems are those

More information

Multiprocessor and Real- Time Scheduling. Chapter 10

Multiprocessor and Real- Time Scheduling. Chapter 10 Multiprocessor and Real- Time Scheduling Chapter 10 Classifications of Multiprocessor Loosely coupled multiprocessor each processor has its own memory and I/O channels Functionally specialized processors

More information

Embedded Systems: OS. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Embedded Systems: OS. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University Embedded Systems: OS Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Standalone Applications Often no OS involved One large loop Microcontroller-based

More information

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

Processes. Overview. Processes. Process Creation. Process Creation fork() Processes. CPU scheduling. Pål Halvorsen 21/9-2005 INF060: Introduction to Operating Systems and Data Communication Operating Systems: Processes & CPU Pål Halvorsen /9-005 Overview Processes primitives for creation and termination states context switches

More information

POSIX in Real-Time. By Kevin M. Obenland 03/15/2001. Daniel Correia nºmec Carlos Guisado nºmec 49099

POSIX in Real-Time. By Kevin M. Obenland 03/15/2001. Daniel Correia nºmec Carlos Guisado nºmec 49099 POSIX in Real-Time By Kevin M. Obenland 03/15/2001 Daniel Correia nºmec 18713 Carlos Guisado nºmec 49099 Posix. What is and why? The original Portable Operating System Interface for Computing Environments

More information

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

Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras Week 05 Lecture 18 CPU Scheduling Hello. In this lecture, we

More information

CEC 450 Real-Time Systems

CEC 450 Real-Time Systems CEC 450 Real-Time Systems Lecture 6 Accounting for I/O Latency September 28, 2015 Sam Siewert A Service Release and Response C i WCET Input/Output Latency Interference Time Response Time = Time Actuation

More information

Chapter 12 IoT Projects Case Studies. Lesson-01: Introduction

Chapter 12 IoT Projects Case Studies. Lesson-01: Introduction Chapter 12 IoT Projects Case Studies Lesson-01: Introduction 1 1. Real Time Linux 2 Linux 2.6.x Linux known so after Linus Torvalds father of the Linux operating system Linux 2.6.x provides functions for

More information

Threads SPL/2010 SPL/20 1

Threads SPL/2010 SPL/20 1 Threads 1 Today Processes and Scheduling Threads Abstract Object Models Computation Models Java Support for Threads 2 Process vs. Program processes as the basic unit of execution managed by OS OS as any

More information

Operating Systems Design 25. Power Management. Paul Krzyzanowski

Operating Systems Design 25. Power Management. Paul Krzyzanowski Operating Systems Design 25. Power Management Paul Krzyzanowski pxk@cs.rutgers.edu 1 Power Management Goal: Improve the battery life of mobile devices 2 CPU Voltage & Frequency Scaling Dynamic CPU Frequency

More information

Benchmark Study: A Performance Comparison Between RHEL 5 and RHEL 6 on System z

Benchmark Study: A Performance Comparison Between RHEL 5 and RHEL 6 on System z Benchmark Study: A Performance Comparison Between RHEL 5 and RHEL 6 on System z 1 Lab Environment Setup Hardware and z/vm Environment z10 EC, 4 IFLs used (non concurrent tests) Separate LPARs for RHEL

More information

SMD149 - Operating Systems

SMD149 - Operating Systems SMD149 - Operating Systems Roland Parviainen November 3, 2005 1 / 45 Outline Overview 2 / 45 Process (tasks) are necessary for concurrency Instance of a program in execution Next invocation of the program

More information

AUTOBEST: A United AUTOSAR-OS And ARINC 653 Kernel. Alexander Züpke, Marc Bommert, Daniel Lohmann

AUTOBEST: A United AUTOSAR-OS And ARINC 653 Kernel. Alexander Züpke, Marc Bommert, Daniel Lohmann AUTOBEST: A United AUTOSAR-OS And ARINC 653 Kernel Alexander Züpke, Marc Bommert, Daniel Lohmann alexander.zuepke@hs-rm.de, marc.bommert@hs-rm.de, lohmann@cs.fau.de Motivation Automotive and Avionic industry

More information

EMERALDS: a small-memory real-time microkernel

EMERALDS: a small-memory real-time microkernel EMERALDS: a small-memory real-time microkernel By Khawar M. Zuberi, Padmanabhan Pillai, and Kang G. Shin 4/28/2005 CMSC 691S Real-Time Systems 1 Outline Introduction Requirements EMERALDS Overview CSD

More information

MediaTek CorePilot 2.0. Delivering extreme compute performance with maximum power efficiency

MediaTek CorePilot 2.0. Delivering extreme compute performance with maximum power efficiency MediaTek CorePilot 2.0 Heterogeneous Computing Technology Delivering extreme compute performance with maximum power efficiency In July 2013, MediaTek delivered the industry s first mobile system on a chip

More information

Embedded Systems: OS

Embedded Systems: OS Embedded Systems: OS Jinkyu Jeong (Jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu ICE3028: Embedded Systems Design, Fall 2018, Jinkyu Jeong (jinkyu@skku.edu) Standalone

More information

Computer Architecture

Computer Architecture Instruction Cycle Computer Architecture Program Execution and Instruction Sets INFO 2603 Platform Technologies The basic function performed by a computer is the execution of a program, which is a set of

More information

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

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition Chapter 6: CPU Scheduling Silberschatz, Galvin and Gagne 2013 Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Real-Time

More information

Reservation-Based Scheduling for IRQ Threads

Reservation-Based Scheduling for IRQ Threads Reservation-Based Scheduling for IRQ Threads Luca Abeni, Nicola Manica, Luigi Palopoli luca.abeni@unitn.it, nicola.manica@gmail.com, palopoli@dit.unitn.it University of Trento, Trento - Italy Reservation-Based

More information

Operating Systems (2INC0) 2018/19. Introduction (01) Dr. Tanir Ozcelebi. Courtesy of Prof. Dr. Johan Lukkien. System Architecture and Networking Group

Operating Systems (2INC0) 2018/19. Introduction (01) Dr. Tanir Ozcelebi. Courtesy of Prof. Dr. Johan Lukkien. System Architecture and Networking Group Operating Systems (2INC0) 20/19 Introduction (01) Dr. Courtesy of Prof. Dr. Johan Lukkien System Architecture and Networking Group Course Overview Introduction to operating systems Processes, threads and

More information

Operating Systems Overview. Chapter 2

Operating Systems Overview. Chapter 2 1 Operating Systems Overview 2 Chapter 2 3 An operating System: The interface between hardware and the user From the user s perspective: OS is a program that controls the execution of application programs

More information

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

CSCI-GA Operating Systems Lecture 3: Processes and Threads -Part 2 Scheduling Hubertus Franke CSCI-GA.2250-001 Operating Systems Lecture 3: Processes and Threads -Part 2 Scheduling Hubertus Franke frankeh@cs.nyu.edu Processes Vs Threads The unit of dispatching is referred to as a thread or lightweight

More information

Dynamic Power Optimization for Higher Server Density Racks A Baidu Case Study with Intel Dynamic Power Technology

Dynamic Power Optimization for Higher Server Density Racks A Baidu Case Study with Intel Dynamic Power Technology Dynamic Power Optimization for Higher Server Density Racks A Baidu Case Study with Intel Dynamic Power Technology Executive Summary Intel s Digital Enterprise Group partnered with Baidu.com conducted a

More information

19: I/O Devices: Clocks, Power Management

19: I/O Devices: Clocks, Power Management 19: I/O Devices: Clocks, Power Management Mark Handley Clock Hardware: A Programmable Clock Pulses Counter, decremented on each pulse Crystal Oscillator On zero, generate interrupt and reload from holding

More information

Comparison of scheduling in RTLinux and QNX. Andreas Lindqvist, Tommy Persson,

Comparison of scheduling in RTLinux and QNX. Andreas Lindqvist, Tommy Persson, Comparison of scheduling in RTLinux and QNX Andreas Lindqvist, andli299@student.liu.se Tommy Persson, tompe015@student.liu.se 19 November 2006 Abstract The purpose of this report was to learn more about

More information

Background: I/O Concurrency

Background: I/O Concurrency Background: I/O Concurrency Brad Karp UCL Computer Science CS GZ03 / M030 5 th October 2011 Outline Worse Is Better and Distributed Systems Problem: Naïve single-process server leaves system resources

More information

Introduction to Energy-Efficient Software 2 nd life talk

Introduction to Energy-Efficient Software 2 nd life talk Introduction to Energy-Efficient Software 2 nd life talk Intel Software and Solutions Group Bob Steigerwald Nov 8, 2007 Taylor Kidd Nov 15, 2007 Agenda Demand for Mobile Computing Devices What is Energy-Efficient

More information

QoS Handling with DVFS (CPUfreq & Devfreq)

QoS Handling with DVFS (CPUfreq & Devfreq) QoS Handling with DVFS (CPUfreq & Devfreq) MyungJoo Ham SW Center, 1 Performance Issues of DVFS Performance Sucks w/ DVFS! Battery-life Still Matters More Devices (components) w/ DVFS More Performance

More information

Operating Systems Overview. Chapter 2

Operating Systems Overview. Chapter 2 Operating Systems Overview Chapter 2 Operating System A program that controls the execution of application programs An interface between the user and hardware Masks the details of the hardware Layers and

More information

Towards Power Management for FreeBSD

Towards Power Management for FreeBSD Towards Power Management for FreeBSD Robin Randhawa robin.randhawa@arm.com FreeBSD Developer Summit Computer Laboratory University of Cambridge August 2015 Agenda An overview of Energy Aware Scheduling

More information

W4118: advanced scheduling

W4118: advanced scheduling W4118: advanced scheduling Instructor: Junfeng Yang References: Modern Operating Systems (3 rd edition), Operating Systems Concepts (8 th edition), previous W4118, and OS at MIT, Stanford, and UWisc Outline

More information

Operating systems Architecture

Operating systems Architecture Operating systems Architecture 1 Operating Systems Low level software system that manages all applications implements an interface between applications and resources manages available resources Resource

More information

Abstract. Testing Parameters. Introduction. Hardware Platform. Native System

Abstract. Testing Parameters. Introduction. Hardware Platform. Native System Abstract In this paper, we address the latency issue in RT- XEN virtual machines that are available in Xen 4.5. Despite the advantages of applying virtualization to systems, the default credit scheduler

More information

Scheduling, part 2. Don Porter CSE 506

Scheduling, part 2. Don Porter CSE 506 Scheduling, part 2 Don Porter CSE 506 Logical Diagram Binary Memory Formats Allocators Threads Today s Lecture Switching System to CPU Calls RCU scheduling File System Networking Sync User Kernel Memory

More information

Operating system concepts. Task scheduling

Operating system concepts. Task scheduling Operating system concepts Task scheduling Task scheduling (thread scheduling) Target of scheduling are ready tasks ACTIVE TASK BLOCKED TASKS PASSIVE TASKS READY TASKS Active task currently running on processor

More information

4/6/2011. Informally, scheduling is. Informally, scheduling is. More precisely, Periodic and Aperiodic. Periodic Task. Periodic Task (Contd.

4/6/2011. Informally, scheduling is. Informally, scheduling is. More precisely, Periodic and Aperiodic. Periodic Task. Periodic Task (Contd. So far in CS4271 Functionality analysis Modeling, Model Checking Timing Analysis Software level WCET analysis System level Scheduling methods Today! erformance Validation Systems CS 4271 Lecture 10 Abhik

More information

A Cool Scheduler for Multi-Core Systems Exploiting Program Phases

A Cool Scheduler for Multi-Core Systems Exploiting Program Phases IEEE TRANSACTIONS ON COMPUTERS, VOL. 63, NO. 5, MAY 2014 1061 A Cool Scheduler for Multi-Core Systems Exploiting Program Phases Zhiming Zhang and J. Morris Chang, Senior Member, IEEE Abstract Rapid growth

More information

Module 20: Multi-core Computing Multi-processor Scheduling Lecture 39: Multi-processor Scheduling. The Lecture Contains: User Control.

Module 20: Multi-core Computing Multi-processor Scheduling Lecture 39: Multi-processor Scheduling. The Lecture Contains: User Control. The Lecture Contains: User Control Reliability Requirements of RT Multi-processor Scheduling Introduction Issues With Multi-processor Computations Granularity Fine Grain Parallelism Design Issues A Possible

More information

Power-Aware Scheduling of Virtual Machines in DVFS-enabled Clusters

Power-Aware Scheduling of Virtual Machines in DVFS-enabled Clusters Power-Aware Scheduling of Virtual Machines in DVFS-enabled Clusters Gregor von Laszewski, Lizhe Wang, Andrew J. Younge, Xi He Service Oriented Cyberinfrastructure Lab Rochester Institute of Technology,

More information

Operating Systems 2010/2011

Operating Systems 2010/2011 Operating Systems 2010/2011 Introduction Johan Lukkien 1 Agenda OS: place in the system Some common notions Motivation & OS tasks Extra-functional requirements Course overview Read chapters 1 + 2 2 A computer

More information

Real Time Linux patches: history and usage

Real Time Linux patches: history and usage Real Time Linux patches: history and usage Presentation first given at: FOSDEM 2006 Embedded Development Room See www.fosdem.org Klaas van Gend Field Application Engineer for Europe Why Linux in Real-Time

More information

Operating Systems. Operating Systems

Operating Systems. Operating Systems The operating system defines our computing experience. It is the first software we see when we turn on the computer, and the last software we see when the computer is turned off. It's the software that

More information

EDF-DVS Scheduling on the IBM Embedded PowerPC 405LP

EDF-DVS Scheduling on the IBM Embedded PowerPC 405LP EDF-DVS Scheduling on the IBM Embedded PowerPC 405LP Aravindh V. Anantaraman, Ali El-Haj Mahmoud, and Ravi K. Venkatesan {avananta, aaelhaj, rkvenkat}@ncsu.edu Instructor: Dr. Frank Mueller CSC714 Real-Time

More information

Microkernel/OS and Real-Time Scheduling

Microkernel/OS and Real-Time Scheduling Chapter 12 Microkernel/OS and Real-Time Scheduling Hongwei Zhang http://www.cs.wayne.edu/~hzhang/ Ack.: this lecture is prepared in part based on slides of Lee, Sangiovanni-Vincentelli, Seshia. Outline

More information

Event-Driven Scheduling. (closely following Jane Liu s Book)

Event-Driven Scheduling. (closely following Jane Liu s Book) Event-Driven Scheduling (closely following Jane Liu s Book) Real-Time Systems, 2006 Event-Driven Systems, 1 Principles Assign priorities to Jobs At events, jobs are scheduled according to their priorities

More information

Implementing Task Schedulers (1) Real-Time and Embedded Systems (M) Lecture 10

Implementing Task Schedulers (1) Real-Time and Embedded Systems (M) Lecture 10 Implementing Task Schedulers (1) Real-Time and Embedded Systems (M) Lecture 10 Lecture Outline Implementing priority scheduling: Tasks, threads and queues Building a priority scheduler Fixed priority scheduling

More information

What s An OS? Cyclic Executive. Interrupts. Advantages Simple implementation Low overhead Very predictable

What s An OS? Cyclic Executive. Interrupts. Advantages Simple implementation Low overhead Very predictable What s An OS? Provides environment for executing programs Process abstraction for multitasking/concurrency scheduling Hardware abstraction layer (device drivers) File systems Communication Do we need an

More information

IX: A Protected Dataplane Operating System for High Throughput and Low Latency

IX: A Protected Dataplane Operating System for High Throughput and Low Latency IX: A Protected Dataplane Operating System for High Throughput and Low Latency Belay, A. et al. Proc. of the 11th USENIX Symp. on OSDI, pp. 49-65, 2014. Reviewed by Chun-Yu and Xinghao Li Summary In this

More information

Predictive Thermal Management for Hard Real-Time Tasks

Predictive Thermal Management for Hard Real-Time Tasks Predictive Thermal Management for Hard Real-Time Tasks Albert Mo Kim Cheng and Chen Feng Real-Time System Laboratory, Department of Computer Science University of Houston, Houston, TX 77204, USA {cheng,

More information

Real-Time Programming with GNAT: Specialised Kernels versus POSIX Threads

Real-Time Programming with GNAT: Specialised Kernels versus POSIX Threads Real-Time Programming with GNAT: Specialised Kernels versus POSIX Threads Juan A. de la Puente 1, José F. Ruiz 1, and Jesús M. González-Barahona 2, 1 Universidad Politécnica de Madrid 2 Universidad Carlos

More information

For use by students enrolled in #71251 CSE430 Fall 2012 at Arizona State University. Do not use if not enrolled.

For use by students enrolled in #71251 CSE430 Fall 2012 at Arizona State University. Do not use if not enrolled. Operating Systems: Internals and Design Principles Chapter 4 Threads Seventh Edition By William Stallings Operating Systems: Internals and Design Principles The basic idea is that the several components

More information

Power Aware Operating Systems: Task-Specific CPU Throttling

Power Aware Operating Systems: Task-Specific CPU Throttling Power Aware Operating Systems: Task-Specific CPU Throttling Intitial Draft Sunny Gleason COM S 790 Fall 2001 1 1 Introduction With the explosive growth in notebook, handheld and embedded computers, mechanisms

More information