Using Standard Operating Systems for Time Critical Applications with Special Emphasis on LINUX

Total Page:16

File Type:pdf, Size:1020Kb

Using Standard Operating Systems for Time Critical Applications with Special Emphasis on LINUX Using Standard Operating Systems for Time Critical Applications with special emphasis on LINUX von Arnd Christian Heursch Dissertation zur Erlangung des akademischen Grades eines Doktors der Naturwissenschaften (Dr. rer.nat.) Neubiberg, 10. November 2006 1. Gutachter: Prof. Dr. rer. nat. Helmut Rzehak 2. Gutachter: Prof. Dr. rer. nat. Gunnar Teege Fakult¨atf¨urInformatik Universit¨atder Bundeswehr M¨unchen 2 Universit¨at der Bundeswehr M¨unchen Fakult¨at f¨urInformatik Thema der Dissertation: Using Standard Operating Systems for Time Critical Applications with special emphasis on LINUX Verfasser: Arnd Christian Heursch Promotionsausschuss: Vorsitzender: Prof. Dr. Andreas Karcher 1. Berichterstatter: Prof. Dr. Helmut Rzehak 2. Berichterstatter: Prof. Dr. Gunnar Teege Weiterer Pr¨ufer: Prof. Dr. Klaus Buchenrieder Weiterer Pr¨ufer: Prof. Dr. Mark Minas Tag der Pr¨ufung: 10. November 2006 Mit der Promotion erlangter Doktor der Naturwissenschaften akademischer Grad: (Dr. rer. nat.) Neubiberg, den 12. November 2006 Contents 1 Introduction 11 1.1 Motivation ............................................ 11 1.2 Aim of this thesis ......................................... 12 1.3 Preconditions: The hardware platform chosen ......................... 14 1.4 Outline .............................................. 15 2 Basic model of hardware and operating system 17 2.1 Hardware model and arising latencies ............................. 17 2.2 Basic elements and mechanisms of modern operating systems ................ 22 2.3 The POSIX standard ....................................... 29 3 Metrics for evaluating operating systems 31 3.1 Fundamentals of computer performance analysis ....................... 31 3.2 Real-time - definitions and explanations ............................ 32 3.3 Schedulability and WCET-analysis ............................... 35 3.4 Performance analysis ....................................... 35 3.5 Modeling ............................................. 36 3.6 Measuring methods ........................................ 37 3.7 Measurements of time rely on precise clocks .......................... 42 3.8 Monitors .............................................. 45 3.9 Orthogonal Walsh correlations ................................. 50 4 Architecture of systems serving time-critical tasks 53 4.1 Architectures for standard and time-critical applications ................... 53 4.2 Combining divergent goals .................................... 57 4.3 Special requirements for realtime operating systems ..................... 60 4.4 Preemption Points ........................................ 62 4.5 Critical sections to avoid race conditions ............................ 65 4.6 Using mutexes to protect critical sections ........................... 66 3 4 CONTENTS 5 Improving Linux to serve time-critical applications 79 5.1 Soft-realtime requirements for the Linux kernel ........................ 79 5.2 Parts of the POSIX standard supported by Linux ....................... 81 6 Metrological evaluation of scheduler and interrupts 85 6.1 The scheduler of the Linux kernel ................................ 85 6.2 Interrupts and Soft-Interrupts .................................. 90 7 Preemptability - Measuring to judge implemented concepts 97 7.1 Non-preemptible regions in the Linux kernel .......................... 97 7.2 Analytical formula of the PDLT for a soft-realtime task ................... 97 7.3 Introducing Preemption Points into the kernel ......................... 99 7.4 The ’Preemptible Linux Kernel’ ................................. 104 7.5 Steps towards a ’Fully Preemptible Linux kernel’ ....................... 110 8 Analyzing and improving the Linux timing subsystem 119 8.1 Time base of the standard Linux kernel ............................ 119 8.2 Rapid Reaction Linux ...................................... 128 8.3 Examining performance using the Rhealstone Benchmark .................. 138 9 Summary 141 9.1 Conclusion ............................................ 141 9.2 Future prospects ......................................... 145 A Measuring systems 149 A.1 AMD K6 ............................................. 149 A.2 Pentium 4 ............................................. 149 CONTENTS 5 Acknowledgements This thesis has been carried out under the guidance of Professor Helmut Rzehak while I worked as a research and teaching assistant at the Institute of Information Technology Systems at the Department of Computer Science of the University of the Federal Armed Forces Munich, Germany. In this place, I would like to express my profound gratitude to Professor Rzehak for providing me such an interesting theme for which the topicality even grew in recent years. His kind support throughout the years, even when emerited, made this thesis possible. Working to make a standard operating system like Linux more suitable for time-critical tasks, is a very interesting task, in which a lot of people, i.e. the Linux kernel Open Source community, especially researchers of operating systems and developers of embedded systems, are interested and take part in. So this thesis is embedded in the world wide and ongoing research and development how to make the Linux kernel more compliant for time-critical tasks. Therefore it was never difficult to publish results on a conference. It was fun to watch the Linux kernel developping during recent years and also very interesting to take small part in its development a few times. Prof.Dr. Gunnar Teege, who followed Prof.Dr. Rzehak after his emeritation, I thank for his kind support during the recent years that made it possible to me to continue my work on this thesis. I also thank him very much for proof-reading this thesis. My special thanks go to Prof.Dr. Burkhard Stiller - who has been the head of our institute for several years - for the good working and learning atmosphere at our institute and for always being addressable. Many thanks also go to my predecessor, Prof.Dr. Michael M¨achtel, who developped in his thesis a software monitor that was helpful to measure and visualize time-critical internal operations of the Linux kernel. I thank all fellow research assistants for the cooperative working atmosphere. Especially, I thank Mr.J.P.Sauerland for his kind technical help, and for providing test beds and computers needed to execute this thesis always in time. Many thanks go to those students of my University who supported this thesis while achieving their diploma thesis or student’s research projects in this field of research, namely to Dirk Grambow, Alexander Horstkotte, Witold Jaworski, Alexander Koenen, Mirko Pracht, Dirk Roedel and Robert Koch. I thank my wife for supporting me and for her loving understanding when this thesis took a lot of time to do, that i couldn’t spend with her and the children. Arnd Christian Heursch, Neubiberg near Munich, Germany, November 2006 6 CONTENTS Disclaimer All pieces of information and statements in this document have been carefully composed and are believed to be accurate, they reflect the current state of research. Nevertheless it is possible that parts of it are old, incomplete or even incorrect. The document is provided ”as is”, without warranty of any kind, without even the implied warranty of merchantability or fitness for a particular purpose. Users must take full responsibility for their application of any products, named herein. In no event shall the author, the reviewers, the university or any other party be liable for any damages, including any indirect, general, special, consequential, or incidental damages, arising out of the use or inability to use this document, even if the author, the reviewers, the university or any other party has been advised of the possibility of such damages. Please take into account also the notice at the start of the bibliography. Linux is a registered trademark of Linus Torvalds. All other trademarks or service marks mentioned in this document are the property of their respective owners. CONTENTS 7 Abstract Traditionally, time-critical tasks have been carried out only by proprietary realtime operating systems running on embedded systems with proprietary hardware, available only for industry or military organi- zations. Others could normally not afford such systems and thus couldn’t execute time-critical tasks on the computer systems available to them. But in recent decades hardware in computer systems evolved in a fast way and got cheaper, so today many users own off-the-shelf PCs at home that are able to perform so called soft realtime tasks like replaying music and films. While in former times a realtime system was designated only to work for its purpose, the user of today wants to do traditional PC work like writing text, executing calculations, playing games and on the same time for instance hear a music CD or DVD. In order to make an off-the-shelf PC able to do all these tasks at the same time in a quality sufficient to the user, not only the hardware has to evolve, but also changes in the standard operating systems, home users use are necessary. One can observe a second development: Because of their broad functionality, the huge amount of software available, and the many people supporting Linux and Java by porting it to new hardware or providing new software, standard operating systems like Linux are used more and more even in Embedded Systems like mobile phones, settop boxes or DVD players. Software developers even try to fulfill time-critical tasks with soft-realtime requirements using cheap standard operating systems in order
Recommended publications
  • A Comprehensive Review for Central Processing Unit Scheduling Algorithm
    IJCSI International Journal of Computer Science Issues, Vol. 10, Issue 1, No 2, January 2013 ISSN (Print): 1694-0784 | ISSN (Online): 1694-0814 www.IJCSI.org 353 A Comprehensive Review for Central Processing Unit Scheduling Algorithm Ryan Richard Guadaña1, Maria Rona Perez2 and Larry Rutaquio Jr.3 1 Computer Studies and System Department, University of the East Caloocan City, 1400, Philippines 2 Computer Studies and System Department, University of the East Caloocan City, 1400, Philippines 3 Computer Studies and System Department, University of the East Caloocan City, 1400, Philippines Abstract when an attempt is made to execute a program, its This paper describe how does CPU facilitates tasks given by a admission to the set of currently executing processes is user through a Scheduling Algorithm. CPU carries out each either authorized or delayed by the long-term scheduler. instruction of the program in sequence then performs the basic Second is the Mid-term Scheduler that temporarily arithmetical, logical, and input/output operations of the system removes processes from main memory and places them on while a scheduling algorithm is used by the CPU to handle every process. The authors also tackled different scheduling disciplines secondary memory (such as a disk drive) or vice versa. and examples were provided in each algorithm in order to know Last is the Short Term Scheduler that decides which of the which algorithm is appropriate for various CPU goals. ready, in-memory processes are to be executed. Keywords: Kernel, Process State, Schedulers, Scheduling Algorithm, Utilization. 2. CPU Utilization 1. Introduction In order for a computer to be able to handle multiple applications simultaneously there must be an effective way The central processing unit (CPU) is a component of a of using the CPU.
    [Show full text]
  • The Different Unix Contexts
    The different Unix contexts • User-level • Kernel “top half” - System call, page fault handler, kernel-only process, etc. • Software interrupt • Device interrupt • Timer interrupt (hardclock) • Context switch code Transitions between contexts • User ! top half: syscall, page fault • User/top half ! device/timer interrupt: hardware • Top half ! user/context switch: return • Top half ! context switch: sleep • Context switch ! user/top half Top/bottom half synchronization • Top half kernel procedures can mask interrupts int x = splhigh (); /* ... */ splx (x); • splhigh disables all interrupts, but also splnet, splbio, splsoftnet, . • Masking interrupts in hardware can be expensive - Optimistic implementation – set mask flag on splhigh, check interrupted flag on splx Kernel Synchronization • Need to relinquish CPU when waiting for events - Disk read, network packet arrival, pipe write, signal, etc. • int tsleep(void *ident, int priority, ...); - Switches to another process - ident is arbitrary pointer—e.g., buffer address - priority is priority at which to run when woken up - PCATCH, if ORed into priority, means wake up on signal - Returns 0 if awakened, or ERESTART/EINTR on signal • int wakeup(void *ident); - Awakens all processes sleeping on ident - Restores SPL a time they went to sleep (so fine to sleep at splhigh) Process scheduling • Goal: High throughput - Minimize context switches to avoid wasting CPU, TLB misses, cache misses, even page faults. • Goal: Low latency - People typing at editors want fast response - Network services can be latency-bound, not CPU-bound • BSD time quantum: 1=10 sec (since ∼1980) - Empirically longest tolerable latency - Computers now faster, but job queues also shorter Scheduling algorithms • Round-robin • Priority scheduling • Shortest process next (if you can estimate it) • Fair-Share Schedule (try to be fair at level of users, not processes) Multilevel feeedback queues (BSD) • Every runnable proc.
    [Show full text]
  • Validated Products List, 1995 No. 3: Programming Languages, Database
    NISTIR 5693 (Supersedes NISTIR 5629) VALIDATED PRODUCTS LIST Volume 1 1995 No. 3 Programming Languages Database Language SQL Graphics POSIX Computer Security Judy B. Kailey Product Data - IGES Editor U.S. DEPARTMENT OF COMMERCE Technology Administration National Institute of Standards and Technology Computer Systems Laboratory Software Standards Validation Group Gaithersburg, MD 20899 July 1995 QC 100 NIST .056 NO. 5693 1995 NISTIR 5693 (Supersedes NISTIR 5629) VALIDATED PRODUCTS LIST Volume 1 1995 No. 3 Programming Languages Database Language SQL Graphics POSIX Computer Security Judy B. Kailey Product Data - IGES Editor U.S. DEPARTMENT OF COMMERCE Technology Administration National Institute of Standards and Technology Computer Systems Laboratory Software Standards Validation Group Gaithersburg, MD 20899 July 1995 (Supersedes April 1995 issue) U.S. DEPARTMENT OF COMMERCE Ronald H. Brown, Secretary TECHNOLOGY ADMINISTRATION Mary L. Good, Under Secretary for Technology NATIONAL INSTITUTE OF STANDARDS AND TECHNOLOGY Arati Prabhakar, Director FOREWORD The Validated Products List (VPL) identifies information technology products that have been tested for conformance to Federal Information Processing Standards (FIPS) in accordance with Computer Systems Laboratory (CSL) conformance testing procedures, and have a current validation certificate or registered test report. The VPL also contains information about the organizations, test methods and procedures that support the validation programs for the FIPS identified in this document. The VPL includes computer language processors for programming languages COBOL, Fortran, Ada, Pascal, C, M[UMPS], and database language SQL; computer graphic implementations for GKS, COM, PHIGS, and Raster Graphics; operating system implementations for POSIX; Open Systems Interconnection implementations; and computer security implementations for DES, MAC and Key Management.
    [Show full text]
  • Module Introduction
    Module Introduction PURPOSE: The intent of this module is to provide an overview of the MPC5200. OBJECTIVES: - Identify the MPC5200 Block Diagram - Identify the MPC5200 Target Markets - Describe HiP7 Technology - Describe Core Features - Describe System Level Features CONTENT: - 28 pages - 5 questions LEARNING TIME: - 55 minutes The intent of this module is to provide you with an overview of the MPC5200 microcontroller. You will become familiar with the MPC5200 and its target markets. You will also learn about the composition of the MPC5200 by studying its block diagram. Finally, you will explore the core and system level features of the of the MPC5200. 1 MPC5200 Overview Designed with automotive/telematics applications in mind Runs at higher clock, bus, and CPU speeds Handles a tremendous range of applications Welcome to the MPC5200. This processor provides very high performance in automotive and other embedded environments. This device has been designed with automotive and telematics applications in mind. What is new about the MPC5200? Generally, automotive class processors have not run at the clock speeds seen in the MPC5200. The external bus speeds of this device are up to 132 MHz and the internal execution speed for the CPU is up to 400 MHz. This provides the horsepower to do voice recognition, graphics processing and wireless communications. The MPC5200 is not just for automotive applications. In fact, this device will handle a tremendous range of applications. This is mainly due to the wide range of communications peripherals and timers, as well as the processing power provided by the 603 G2_LE core that uses the PowerPCTM instruction set.
    [Show full text]
  • Microkernel Mechanisms for Improving the Trustworthiness of Commodity Hardware
    Microkernel Mechanisms for Improving the Trustworthiness of Commodity Hardware Yanyan Shen Submitted in fulfilment of the requirements for the degree of Doctor of Philosophy School of Computer Science and Engineering Faculty of Engineering March 2019 Thesis/Dissertation Sheet Surname/Family Name : Shen Given Name/s : Yanyan Abbreviation for degree as give in the University calendar : PhD Faculty : Faculty of Engineering School : School of Computer Science and Engineering Microkernel Mechanisms for Improving the Trustworthiness of Commodity Thesis Title : Hardware Abstract 350 words maximum: (PLEASE TYPE) The thesis presents microkernel-based software-implemented mechanisms for improving the trustworthiness of computer systems based on commercial off-the-shelf (COTS) hardware that can malfunction when the hardware is impacted by transient hardware faults. The hardware anomalies, if undetected, can cause data corruptions, system crashes, and security vulnerabilities, significantly undermining system dependability. Specifically, we adopt the single event upset (SEU) fault model and address transient CPU or memory faults. We take advantage of the functional correctness and isolation guarantee provided by the formally verified seL4 microkernel and hardware redundancy provided by multicore processors, design the redundant co-execution (RCoE) architecture that replicates a whole software system (including the microkernel) onto different CPU cores, and implement two variants, loosely-coupled redundant co-execution (LC-RCoE) and closely-coupled redundant co-execution (CC-RCoE), for the ARM and x86 architectures. RCoE treats each replica of the software system as a state machine and ensures that the replicas start from the same initial state, observe consistent inputs, perform equivalent state transitions, and thus produce consistent outputs during error-free executions.
    [Show full text]
  • Ebook - Informations About Operating Systems Version: August 15, 2006 | Download
    eBook - Informations about Operating Systems Version: August 15, 2006 | Download: www.operating-system.org AIX Internet: AIX AmigaOS Internet: AmigaOS AtheOS Internet: AtheOS BeIA Internet: BeIA BeOS Internet: BeOS BSDi Internet: BSDi CP/M Internet: CP/M Darwin Internet: Darwin EPOC Internet: EPOC FreeBSD Internet: FreeBSD HP-UX Internet: HP-UX Hurd Internet: Hurd Inferno Internet: Inferno IRIX Internet: IRIX JavaOS Internet: JavaOS LFS Internet: LFS Linspire Internet: Linspire Linux Internet: Linux MacOS Internet: MacOS Minix Internet: Minix MorphOS Internet: MorphOS MS-DOS Internet: MS-DOS MVS Internet: MVS NetBSD Internet: NetBSD NetWare Internet: NetWare Newdeal Internet: Newdeal NEXTSTEP Internet: NEXTSTEP OpenBSD Internet: OpenBSD OS/2 Internet: OS/2 Further operating systems Internet: Further operating systems PalmOS Internet: PalmOS Plan9 Internet: Plan9 QNX Internet: QNX RiscOS Internet: RiscOS Solaris Internet: Solaris SuSE Linux Internet: SuSE Linux Unicos Internet: Unicos Unix Internet: Unix Unixware Internet: Unixware Windows 2000 Internet: Windows 2000 Windows 3.11 Internet: Windows 3.11 Windows 95 Internet: Windows 95 Windows 98 Internet: Windows 98 Windows CE Internet: Windows CE Windows Family Internet: Windows Family Windows ME Internet: Windows ME Seite 1 von 138 eBook - Informations about Operating Systems Version: August 15, 2006 | Download: www.operating-system.org Windows NT 3.1 Internet: Windows NT 3.1 Windows NT 4.0 Internet: Windows NT 4.0 Windows Server 2003 Internet: Windows Server 2003 Windows Vista Internet: Windows Vista Windows XP Internet: Windows XP Apple - Company Internet: Apple - Company AT&T - Company Internet: AT&T - Company Be Inc. - Company Internet: Be Inc. - Company BSD Family Internet: BSD Family Cray Inc.
    [Show full text]
  • Yutaka Oiwa. "Implementation of a Fail-Safe ANSI C Compiler"
    Implementation of a Fail-Safe ANSI C Compiler 安全な ANSI C コンパイラの実装手法 Doctoral Dissertation 博士論文 Yutaka Oiwa 大岩 寛 Submitted to Department of Computer Science, Graduate School of Information Science and Technology, The University of Tokyo on December 16, 2004 in partial fulfillment of the requirements for the degree of Doctor of Philosophy Abstract Programs written in the C language often suffer from nasty errors due to dangling pointers and buffer overflow. Such errors in Internet server programs are often ex- ploited by malicious attackers to “crack” an entire system, and this has become a problem affecting society as a whole. The root of these errors is usually corruption of on-memory data structures caused by out-of-bound array accesses. The C lan- guage does not provide any protection against such out-of-bound access, although recent languages such as Java, C#, Lisp and ML provide such protection. Never- theless, the C language itself should not be blamed for this shortcoming—it was designed to provide a replacement for assembly languages (i.e., to provide flexible direct memory access through a light-weight high-level language). In other words, lack of array boundary protection is “by design.” In addition, the C language was designed more than thirty years ago when there was not enough computer power to perform a memory boundary check for every memory access. The real prob- lem is the use of the C language for current casual programming, which does not usually require such direct memory accesses. We cannot realistically discard the C language right away, though, because there are many legacy programs written in the C language and many legacy programmers accustomed to the C language and its programming style.
    [Show full text]
  • Goodforkbadfork-Lineo.Pdf
    Good Fork, Bad Fork Examining the Limits of Open Source Software in the Embedded Market Tim Bird Chief Technology Officer www.lineo.com Start with 2 Definitions Definition of open source What are it’s key attributes Definition of network effects Importance of network effects for open source software What is Open Source Software? Examples Linux Apache gcc (GNU compiler) Key Attributes of Open Source Software Access to the source code Freedom to make modifications AND distribute them (free = freedom : think free speech, not free beer) Licenses that provide these attributes Availability of source is NOT enough Source Availability != Open Source QNX now has source availability For lots of money, you can buy source code to VxWorks Microsoft may ship Windows CE source code But that's NOT Open Source Key Attributes of Open Source Software Communities develop The "Linux community" This generates "network effects" What are “Network Effects”? When the value of something increases with the number of items Classic example: the telephone Two phones have limited value Whole network of phones gives each one its value Other “Network Effect” Examples Classic example: VHS videocassette tapes Once a standard develops, it pushes other formats out Market for Applications Windows APIs OS More Popularity Applications Network Effects and Linux Every feature of Linux makes it more valuable to developers Every Linux developer makes Linux have more features Virtuous cycle Open Source Network Effects (Business Benefits) Popularity Availability of engineering resources Info Skilled manpower Engineer enthusiasm Commercial effects Multi-vendor OS Competition to produce rapid development Test organizations Linux is Not Just One Community Separate communities for networking, file systems, Web servers, graphic layers, desktops, etc.
    [Show full text]
  • WWW-Based Collaboration Environments with Distributed Tool Services
    WWWbased Collab oration Environments with Distributed To ol Services Gail E Kaiser Stephen E Dossick Wenyu Jiang Jack Jingshuang Yang SonnyXiYe Columbia University Department of Computer Science Amsterdam Avenue Mail Co de New York NY UNITED STATES fax kaisercscolumbiaedu CUCS February Abstract Wehave develop ed an architecture and realization of a framework for hyp ermedia collab oration environments that supp ort purp oseful work by orchestrated teams The hyp ermedia represents all plausible multimedia artifacts concerned with the collab orative tasks at hand that can b e placed or generated online from applicationsp ecic materials eg source co de chip layouts blueprints to formal do cumentation to digital library resources to informal email and chat transcripts The environment capabilities include b oth internal hyp ertext and external link server links among these artifacts which can b e added incrementally as useful connections are discovered pro jectsp ecic hyp ermedia search and browsing automated construction of artifacts and hyp erlinks according to the semantics of the group and individual tasks and the overall pro cess workow application of to ols to the artifacts and collab orativework for geographically disp ersed teams We present a general architecture for what wecallhyp ermedia subwebs and imp osition of groupspace services op erating on shared subwebs based on World Wide Web technology which could b e applied over the Internet andor within an organizational intranet We describ e our realization in OzWeb which
    [Show full text]
  • Advanced Operating Systems #1
    <Slides download> https://www.pf.is.s.u-tokyo.ac.jp/classes Advanced Operating Systems #2 Hiroyuki Chishiro Project Lecturer Department of Computer Science Graduate School of Information Science and Technology The University of Tokyo Room 007 Introduction of Myself • Name: Hiroyuki Chishiro • Project Lecturer at Kato Laboratory in December 2017 - Present. • Short Bibliography • Ph.D. at Keio University on March 2012 (Yamasaki Laboratory: Same as Prof. Kato). • JSPS Research Fellow (PD) in April 2012 – March 2014. • Research Associate at Keio University in April 2014 – March 2016. • Assistant Professor at Advanced Institute of Industrial Technology in April 2016 – November 2017. • Research Interests • Real-Time Systems • Operating Systems • Middleware • Trading Systems Course Plan • Multi-core Resource Management • Many-core Resource Management • GPU Resource Management • Virtual Machines • Distributed File Systems • High-performance Networking • Memory Management • Network on a Chip • Embedded Real-time OS • Device Drivers • Linux Kernel Schedule 1. 2018.9.28 Introduction + Linux Kernel (Kato) 2. 2018.10.5 Linux Kernel (Chishiro) 3. 2018.10.12 Linux Kernel (Kato) 4. 2018.10.19 Linux Kernel (Kato) 5. 2018.10.26 Linux Kernel (Kato) 6. 2018.11.2 Advanced Research (Chishiro) 7. 2018.11.9 Advanced Research (Chishiro) 8. 2018.11.16 (No Class) 9. 2018.11.23 (Holiday) 10. 2018.11.30 Advanced Research (Kato) 11. 2018.12.7 Advanced Research (Kato) 12. 2018.12.14 Advanced Research (Chishiro) 13. 2018.12.21 Linux Kernel 14. 2019.1.11 Linux Kernel 15. 2019.1.18 (No Class) 16. 2019.1.25 (No Class) Linux Kernel Introducing Synchronization /* The cases for Linux */ Acknowledgement: Prof.
    [Show full text]
  • Process Scheduling Ii
    PROCESS SCHEDULING II CS124 – Operating Systems Spring 2021, Lecture 12 2 Real-Time Systems • Increasingly common to have systems with real-time scheduling requirements • Real-time systems are driven by specific events • Often a periodic hardware timer interrupt • Can also be other events, e.g. detecting a wheel slipping, or an optical sensor triggering, or a proximity sensor reaching a threshold • Event latency is the amount of time between an event occurring, and when it is actually serviced • Usually, real-time systems must keep event latency below a minimum required threshold • e.g. antilock braking system has 3-5 ms to respond to wheel-slide • The real-time system must try to meet its deadlines, regardless of system load • Of course, may not always be possible… 3 Real-Time Systems (2) • Hard real-time systems require tasks to be serviced before their deadlines, otherwise the system has failed • e.g. robotic assembly lines, antilock braking systems • Soft real-time systems do not guarantee tasks will be serviced before their deadlines • Typically only guarantee that real-time tasks will be higher priority than other non-real-time tasks • e.g. media players • Within the operating system, two latencies affect the event latency of the system’s response: • Interrupt latency is the time between an interrupt occurring, and the interrupt service routine beginning to execute • Dispatch latency is the time the scheduler dispatcher takes to switch from one process to another 4 Interrupt Latency • Interrupt latency in context: Interrupt! Task
    [Show full text]
  • Comparing Systems Using Sample Data
    Operating System and Process Monitoring Tools Arik Brooks, [email protected] Abstract: Monitoring the performance of operating systems and processes is essential to debug processes and systems, effectively manage system resources, making system decisions, and evaluating and examining systems. These tools are primarily divided into two main categories: real time and log-based. Real time monitoring tools are concerned with measuring the current system state and provide up to date information about the system performance. Log-based monitoring tools record system performance information for post-processing and analysis and to find trends in the system performance. This paper presents a survey of the most commonly used tools for monitoring operating system and process performance in Windows- and Unix-based systems and describes the unique challenges of real time and log-based performance monitoring. See Also: Table of Contents: 1. Introduction 2. Real Time Performance Monitoring Tools 2.1 Windows-Based Tools 2.1.1 Task Manager (taskmgr) 2.1.2 Performance Monitor (perfmon) 2.1.3 Process Monitor (pmon) 2.1.4 Process Explode (pview) 2.1.5 Process Viewer (pviewer) 2.2 Unix-Based Tools 2.2.1 Process Status (ps) 2.2.2 Top 2.2.3 Xosview 2.2.4 Treeps 2.3 Summary of Real Time Monitoring Tools 3. Log-Based Performance Monitoring Tools 3.1 Windows-Based Tools 3.1.1 Event Log Service and Event Viewer 3.1.2 Performance Logs and Alerts 3.1.3 Performance Data Log Service 3.2 Unix-Based Tools 3.2.1 System Activity Reporter (sar) 3.2.2 Cpustat 3.3 Summary of Log-Based Monitoring Tools 4.
    [Show full text]