Freebsd ULE Vs. Linux CFS Justinien Bouron, Sébastien Chevalley, Baptiste Lepers, Willy Zwaenepoel, Redha Gouicem, Julia Lawall, Gilles Muller, Julien Sopena

Total Page:16

File Type:pdf, Size:1020Kb

Freebsd ULE Vs. Linux CFS Justinien Bouron, Sébastien Chevalley, Baptiste Lepers, Willy Zwaenepoel, Redha Gouicem, Julia Lawall, Gilles Muller, Julien Sopena The Battle of the Schedulers: FreeBSD ULE vs. Linux CFS Justinien Bouron, Sébastien Chevalley, Baptiste Lepers, Willy Zwaenepoel, Redha Gouicem, Julia Lawall, Gilles Muller, Julien Sopena To cite this version: Justinien Bouron, Sébastien Chevalley, Baptiste Lepers, Willy Zwaenepoel, Redha Gouicem, et al.. The Battle of the Schedulers: FreeBSD ULE vs. Linux CFS. 2018 USENIX Annual Technical Con- ference, Jul 2018, Boston, MA, United States. hal-01853267 HAL Id: hal-01853267 https://hal.inria.fr/hal-01853267 Submitted on 2 Aug 2018 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. The Battle of the Schedulers: FreeBSD ULE vs. Linux CFS Justinien Bouron, Sebastien Chevalley, Baptiste Lepers, and Willy Zwaenepoel, EPFL; Redha Gouicem, Julia Lawall, Gilles Muller, and Julien Sopena, Sorbonne University/Inria/LIP6 https://www.usenix.org/conference/atc18/presentation/bouron This paper is included in the Proceedings of the 2018 USENIX Annual Technical Conference (USENIX ATC ’18). July 11–13, 2018 • Boston, MA, USA ISBN 978-1-931971-44-7 Open access to the Proceedings of the 2018 USENIX Annual Technical Conference is sponsored by USENIX. The Battle of the Schedulers: FreeBSD ULE vs. Linux CFS Justinien Bouron, Sebastien Chevalley, Baptiste Lepers, Willy Zwaenepoel EPFL Redha Gouicem, Julia Lawall, Gilles Muller, Julien Sopena Sorbonne University, Inria, LIP6 Abstract find that for some workloads ULE is better and for oth- ers CFS is better. Instead, our goal is to illustrate how This paper analyzes the impact on application perfor- differences in the design and the implementation of the mance of the design and implementation choices made two schedulers are reflected in application performance in two widely used open-source schedulers: ULE, the under different workloads. default FreeBSD scheduler, and CFS, the default Linux ULE and CFS are both designed to schedule large scheduler. We compare ULE and CFS in otherwise iden- numbers of threads on large multicore machines. Scal- tical circumstances. We have ported ULE to Linux, and ability considerations have led both schedulers to adopt use it to schedule all threads that are normally scheduled per-core runqueues. On a context switch, a core accesses by CFS. We compare the performance of a large suite only its local runqueue to find the next thread to run. Pe- of applications on the modified kernel running ULE and riodically and at select times, e.g., when a thread wakes on the standard Linux kernel running CFS. The observed up, both ULE and CFS perform load balancing, i.e., they performance differences are solely the result of schedul- try to balance the amount of work waiting in the run- ing decisions, and do not reflect differences in other sub- queues of different cores. systems between FreeBSD and Linux. ULE and CFS, however, differ greatly in their design There is no overall winner. On many workloads the and implementation choices. FreeBSD ULE is a simple two schedulers perform similarly, but for some work- scheduler (2,950 lines of code in FreeBSD 11.1), while loads there are significant and even surprising differ- Linux CFS is much more complex (17,900 lines of code ences. ULE may cause starvation, even when execut- in the latest LTS Linux kernel, Linux 4.9). FreeBSD run- ing a single application with identical threads, but this queues are FIFO. For load balancing, FreeBSD strives to starvation may actually lead to better application perfor- even out the number of threads per core. In Linux, a core mance for some workloads. The more complex load bal- decides which thread to run next based on prior execu- ancing mechanism of CFS reacts more quickly to work- tion time, priority, and perceived cache behavior of the load changes, but ULE achieves better load balance in threads in its runqueue. Instead of evening out the num- the long run. ber of threads between cores, Linux strives to even out the average amount of pending work. 1 Introduction The major challenge in comparing ULE and CFS is that application performance depends not only on the Operating system kernel schedulers are responsible for scheduler, but also on other OS subsystems, such as net- maintaining high utilization of hardware resources (CPU working, file systems and memory management, which cores, memory, I/O devices) while providing fast re- also differ between FreeBSD and Linux. To isolate the sponse time to latency-sensitive applications. They have effect of differences between CFS and ULE, we have to react to workload changes, and handle large numbers ported ULE to Linux, and we use it as the default sched- of cores and threads with minimal overhead [12]. This uler to run all threads on the machine (including kernel paper provides a comparison between the default sched- threads that are normally scheduled by CFS). Then, we ulers of two of the most widely deployed open-source compare application performance between this modified operating systems: the Completely Fair Scheduler (CFS) Linux with ULE and the default Linux kernel with CFS. used in Linux, and the ULE scheduler used in FreeBSD. We first examine the impact of the per-core scheduling Our goal is not to declare an overall winner. In fact, we decisions made by ULE and CFS, by running applica- USENIX Association 2018 USENIX Annual Technical Conference 85 tions and combinations of applications on a single core, threads by a multi-factor value called vruntime, repre- We then run the applications on all cores of the machine, senting the amount of CPU time a thread has already and study the impact of the load balancer. We use 37 used divided by the thread’s priority. Threads with the applications ranging from scientific HPC applications to same priority and same vruntime have executed the same databases. While offering similar performance in many amount of time, meaning that core resources have been circumstances, CFS and ULE occasionally behave very shared fairly between them. To ensure that the vruntime differently, even on simple workloads consisting of one of all threads progresses fairly, when the current running application running one thread per core. thread is preempted, CFS schedules the thread with the This paper makes the following contributions: lowest vruntime to run next. Since Linux 2.6.38 the notion of fairness in CFS has • We provide a complete port of FreeBSD’s ULE evolved from fairness between threads to fairness be- scheduler in Linux and release it as open source tween applications. Before Linux 2.6.38 every thread [21]. Our implementation contains all the features was considered as an independent entity and got the same and heuristics used in the FreeBSD 11.1 version. share of resources as other threads in the system. This meant that an application that used many threads got a • We compare the application performance under the larger share of resources than single-threaded applica- ULE and CFS schedulers in an otherwise identical tions. In more recent kernel versions, threads of the same environment. application are grouped into a structure called a cgroup. • Unlike CFS, ULE may starve threads that it deems A cgroup has a vruntime that corresponds to the sum of non-interactive for an unbounded amount of time. the vruntimes of all of its threads. CFS then applies its Surprisingly, starvation may also occur when the algorithm on cgroups, ensuring fairness between groups system executes only a single application consist- of threads. When a cgroup is chosen to be scheduled, ing of identical threads. Even more surprising, this its thread with the lowest vruntime is executed, ensuring behavior actually proves beneficial for some work- fairness within a cgroup. Cgroups can also be nested. loads (e.g., a database workload). For instance, systemd automatically configures cgroups to ensure fairness between different users, and then fair- • CFS converges faster towards a balanced load, but ness between the applications of a given user. ULE achieves a better load balance in the long run. CFS avoids thread starvation by scheduling all threads within a given time period. For a core executing fewer • The heuristics used by CFS to avoid migrating than 8 threads the default time period is 48ms. When threads can hurt performance in HPC workloads a core executes more than 8 threads, the time period that only use one thread per core, because CFS grows with the number of threads and is equal to 6 ∗ sometimes places two threads on the same core, number o f threads ms; the 6ms value was chosen to while ULE always places one thread on each core. avoid preempting threads too frequently. Threads with a higher priority get a higher share of the time period. The outline of the rest of this paper is as follows. Sec- Since CFS schedules the thread with the lowest vruntime, tion 2 presents the CFS and ULE schedulers. Section 3 CFS needs to prevent a thread from having a vruntime describes our port of ULE to Linux and the main differ- much lower than the vruntimes of the other threads wait- ences between the native ULE implementation and our ing to be scheduled. If that were to happen, the thread port. Sections 4 presents the machines and the work- with the low vruntime could run for a long time, starving loads used in our experiments.
Recommended publications
  • On Intelligent Mitigation of Process Starvation in Multilevel Feedback Queue Scheduling Joseph E
    Kennesaw State University DigitalCommons@Kennesaw State University Master of Science in Computer Science Theses Department of Computer Science Spring 4-20-2017 On Intelligent Mitigation of Process Starvation In Multilevel Feedback Queue Scheduling Joseph E. Brown Kennesaw State University Follow this and additional works at: http://digitalcommons.kennesaw.edu/cs_etd Part of the Computational Engineering Commons Recommended Citation Brown, Joseph E., "On Intelligent Mitigation of Process Starvation In Multilevel Feedback Queue Scheduling" (2017). Master of Science in Computer Science Theses. 8. http://digitalcommons.kennesaw.edu/cs_etd/8 This Thesis is brought to you for free and open access by the Department of Computer Science at DigitalCommons@Kennesaw State University. It has been accepted for inclusion in Master of Science in Computer Science Theses by an authorized administrator of DigitalCommons@Kennesaw State University. For more information, please contact [email protected]. On Intelligent Mitigation of Process Starvation In Multilevel Feedback Queue Scheduling Master of Science in Computer Science Thesis By Joseph E Brown MSCS Student Department of Computer Science College of Computing and Software Engineering Kennesaw State University, USA Submitted in partial fulfillment of the Requirements for the degree of Master of Science in Computer Science November 2016 On Intelligent Mitigation of Process Starvation In Multilevel Feedback Queue Scheduling This thesis approved for recommendation to the Graduate Council. 2 Kennesaw State University College of Computing and Software Engineering Thesis Title: On Intelligent Mitigation of Process Starvation In Multilevel Feedback Queue Schedul- ing . Author: Joseph E Brown. Department: Computer Science. Approved for Thesis Requirements of the Master of Science Degree Thesis Advisor: Ken Hoganson Date Thesis Reader: Dr.
    [Show full text]
  • Thread Scheduling in Multi-Core Operating Systems Redha Gouicem
    Thread Scheduling in Multi-core Operating Systems Redha Gouicem To cite this version: Redha Gouicem. Thread Scheduling in Multi-core Operating Systems. Computer Science [cs]. Sor- bonne Université, 2020. English. tel-02977242 HAL Id: tel-02977242 https://hal.archives-ouvertes.fr/tel-02977242 Submitted on 24 Oct 2020 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Ph.D thesis in Computer Science Thread Scheduling in Multi-core Operating Systems How to Understand, Improve and Fix your Scheduler Redha GOUICEM Sorbonne Université Laboratoire d’Informatique de Paris 6 Inria Whisper Team PH.D.DEFENSE: 23 October 2020, Paris, France JURYMEMBERS: Mr. Pascal Felber, Full Professor, Université de Neuchâtel Reviewer Mr. Vivien Quéma, Full Professor, Grenoble INP (ENSIMAG) Reviewer Mr. Rachid Guerraoui, Full Professor, École Polytechnique Fédérale de Lausanne Examiner Ms. Karine Heydemann, Associate Professor, Sorbonne Université Examiner Mr. Etienne Rivière, Full Professor, University of Louvain Examiner Mr. Gilles Muller, Senior Research Scientist, Inria Advisor Mr. Julien Sopena, Associate Professor, Sorbonne Université Advisor ABSTRACT In this thesis, we address the problem of schedulers for multi-core architectures from several perspectives: design (simplicity and correct- ness), performance improvement and the development of application- specific schedulers.
    [Show full text]
  • Processes Process Structure
    Processes Process structure The process structure contains: • Processes execute in user mode (application code) or kernel mode (operating system code). • Process identification (PID) • The user mode state consists of the processor registers • signal state and of the content of the memory segments. • timers: real-time and CPU-utilization counters • The kernel mode state consists of the processor registers • Pointers to the substructures and the information the kernel stores about the process. • The kernel state for each process is divided into several different data structures (fig. 4.1). • The top level data structures are the process structure and the user structure. • In old Unix systems the user structure contained data that was not needed when the process was swapped out. • In FreeBSD the user structure is used for only a couple of structures referenced from the process structure. • A new thread structure has been introduced in FreeBSD to keep information about a single thread. 1 2 Process structure, cont. Thread structure The thread structure contains the following categories of information: The process substructures (fig. 4.1) have the following categories of information: • Scheduling: for example thread priority • Thread state: (runnable, sleeping), and wait channel if • Process-group identification sleeping. • User credentials (UID, GID) • Machine state: the machine dependent thread information • Memory management • TCB (Thread Control Block): the user and kernel mode • File descriptors execution states including MMU registers • Resource accounting • Kernel stack: the per-thread execution stack for the kernel • Statistics • Signal actions • Thread structure Processes can be in any of the following states: NEW, NORMAL, or ZOMBIE. A process in NORMAL state can be RUNNABLE, SLEEPING or STOPPED.
    [Show full text]
  • Schedulers University of New Mexico
    Schedulers University of New Mexico https://commons.wikimedia.org/wiki/ File:Simplified_Structure_of_the_Linux_Kern el.svg 2 University of New Mexico O(1) scheduler (older) Two arrays, switching between them is just changing a pointer Uses heuristics to try to know which processes are interactive Average sleep time https://en.wikipedia.org/wiki/O(1)_scheduler 3 University of New Mexico CFS scheduler (currently in Linux) Completely Fair Scheduler Red-black tree of execution to the nanosecond niffies Like weighted fair queuing for packet networks An ideal processor would share equally maximum execution time = time the process has been waiting to run / total number of processes https://en.wikipedia.org/wiki/Completely_Fair_Scheduler 4 University of New Mexico BFS (now MuQQS) Brain “Hug” Scheduler Specifically for desktops Weighted round-robin where the weights are based on some very complex formulae (see Wikipedia for details) No priority modification for sleep behavior Time slice = 6ms (human perception of jitter ≈ 7ms) Performs slightly better than CFS for <16 cores https://en.wikipedia.org/wiki/Brain_Fuck_Scheduler https://lwn.net/Articles/720227/ 5 University of New Mexico Windows NT through 10 ● Multilevel Feedback Queue (MLFQ) 6 University of New Mexico Mac OS X ● XNU is a mix of FreeBSD and Mach – Network, files, processes, POSIX interface, etc. come from FreeBSD – CPU scheduling, memory management, specialized IPC, etc. comes from Mach ● Round-robin and MLFQ schedulers 7 University of New Mexico IOS (i.e., iPhone)
    [Show full text]
  • GWDG-Nachrichten 03/2018
    03|18 GitLab GWDG ownCloud HLRN-IV Spectre und Meltdown Plagiatspräventionsdienste Thread Scheduling on Multi-core Systems ZEITSCHRIFT FÜR DIE KUNDEN DER GWDG Impressum Zeitschrift für die Kunden der GWDG ISSN 0940-4686 41. Jahrgang 03|18 Ausgabe 3/2018 Erscheinungsweise: monatlich www.gwdg.de/gwdg-nr Auflage: 550 4 Kollaborative Sourcecode-Verwaltung mit Fotos: © Maxim_Kazmin - Fotolia.com (1) © teguhjatipras - Fotolia.com (4) GitLab 8 GWDG ownCloud: Upgrade auf © momius - Fotolia.com (11) © fotogestoeber - Fotolia.com (15) © pterwort - Fotolia.com (25) Version X 10 Mehr Rechenleistung für © nito - Fotolia.com (26, 27) © MPIbpc-Medienservice (3, 28) Norddeutschland 12 Prozessor-Schwachstellen © Universität Göttingen / Jan Vetter (10, 11) © GWDG (2, 29) „Spectre“ und „Meltdown“ 16 Steigende Herausgeber: Gesellschaft für wissenschaftliche Datenverarbeitung mbH Göttingen Nutzung der Plagiatspräventionsdienste der Am Faßberg 11 37077 Göttingen Tel.: 0551 201-1510 GWDG 17 Kurz & knapp 18 Thread Scheduling Fax: 0551 201-2150 Redaktion: on Multi-core Systems 26 Stellenangebot Dr. Thomas Otto E-Mail: [email protected] 28 Personalia 29 Kurse Herstellung: Franziska Schimek E-Mail: [email protected] Druck: Kreationszeit GmbH, Rosdorf 3 03|18 Prof. Dr. Ramin Yahyapour [email protected] 0551 201-1545 Liebe Kunden und Freunde der GWDG, die Verfügbarkeit von und der Zugang zu leistungsfähigen Rechenressourcen ist für viele Wissenschaftsdisziplinen erfolgskritisch. Aus diesem Grund gibt es den kontinuierlich steigenden Bedarf an High-Performance-Computing-Clustern. Wie in einer früheren Ausgabe der GWDG-Nachrichten berichtet und auch in der Presse zu lesen, wird Göttin- gen einer der beiden Betriebsstandorte für die vierte Generation des Hochleistungsrech- ners Nord (HLRN-IV). Zusammen mit den Kollegen vom Zuse-Institut Berlin wurden in den letzten Monaten die zugehörige Ausschreibung und Vergabe betreut.
    [Show full text]
  • Recent and Forthcoming Freebsd Releases
    Recent and Forthcoming FreeBSD Releases David Malone <[email protected]> 14 February 2009 W3 Servers IRELAND (November 1993) CURIA Irish Literature archive IEunet Networking Information regarding Ireland, and Links to the rest of Europe. Trinity College Dublin Dept of Mathematics IONA Technologies Ltd. info about their Object Request Broker software product and some bits and pieces of Irish news The University of Limerick Information on Natural Language Processing and some research projects in the Department of Computer Science and Information Systems. (Not using http yet) Plan • How the FreeBSD project runs. • How our releases are structured. • How we got to FreeBSD 7. • FreeBSD 7.1 and 7.X. • What’s to come next. A bit about me • Work in Hamilton Institute NUI Maynooth. • Background in maths and sysadmin. • About 1995 wanted to build xterms. • Looked at cheap ways of doing it. • Found FreeBSD. • Got involved in bugfixing. • In 2000 became a committer. The Blurb FreeBSD is an advanced operating system for modern server, desktop, and embedded computer platforms. FreeBSD’s code base has undergone over thirty years of continuous development, improvement, and optimization. It is developed and maintained by a large team of individuals. FreeBSD provides advanced networking, impressive security features, and world class performance and is used by some of the world’s busiest web sites and most pervasive embedded networking and storage devices. FreeBSD Project Structure • Users (unknown number). • Contributors (thousands?). • Committers • doc: 54, • ports: 157, • src: 204. • Elect or coopt various special groups • bug busters, • core, • security team, • ... FreeBSD Releases • The most recent version of FreeBSD is -current.
    [Show full text]
  • Webserver-Freebsd-7-2.Pdf
    µ¦·´Ê WebServer Ã¥Äo FreeBSD 7.2 § дѥішѧчшѤѸк WebServer ѱчѕѲнҖ FreeBSD 7.2 § діцѨћѩдќѥ www.mu-ph.org ѱчѕ ѯѝіѧєёѤьыѫҙ ьѧшѕҙьіѥ Email: [email protected] 12 ѝѧкўѥзє 2552 * * * * * * * * * Objective: шҖѠкдѥіъѼѥ WebServer еѠк Ѡкзҙді ѲўҖъдѐѫ ҐѥѕѲьѠкзҙдієѨ WebSite ѲнҖкѥь ѱчѕѲўҖ ѯьѪѸѠъзьјѣѨѷ 5 GBytes Specifications °Á¦ºÉ°¸ÉÄo CPU: Intel(R) Xeon(R) CPU E5405 @ 2.00GHz (1995.01-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x1067a Stepping = 10 Ram 2G HardDisk IDE 500G ¨³ 250 εª­°o° o°Â¦ 500G ­¦oµ / , swap ¨³ /backups o°¸É­° 250G ­¦oµ /var , /tmp , /usr ¨³ /usr/local Lan card 1 Ä (onboard) Ân partion ´¸Ê www# df Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/ad5s1a 507630 146844 320176 31% / devfs 1 1 0 100% /dev /dev/ad7s1g 400913540 16644420 352196038 5% /backups /dev/ad7s1e 1012974 12 931926 0% /tmp /dev/ad7s1f 10154158 1150928 8190898 12% /usr /dev/ad5s1d 231978828 4 213420518 0% /usr/local /dev/ad7s1d 60931274 1066 56055708 0% /var www# ѱюіѰдієъѨѷјк 1. ÂoŠ¢j¤¸ÉεÁ} 2. Compile Kernel Á¡ºÉ°Ä®o¦°¦´ Firewall ¨³ Quota 3. Update ports tree 4. µ¦·´Ê Firewall 5. µ¦Îµ Quota 6. ·´Ê mysql50-server 7. ·´Ê Apache22 8. ·´Ê PHP5 9. ·´Ê PHP5-extensions 10. ·´Ê ZendOptimizer 11. ·´Ê webmin 12. ·´Ê phpmyadmin 13. ·´Ê vsftp 14. ·´Ê awstats 15. ·´Ê ntp 16. ·´Ê clamav 17. ·´Ê hostsentry 18. ·´Ê portsentry 19. ·´Ê lynx 20. ·´Ê phpbb3 21. ·´Ê denyhosts 22. µ¦ Backup Áª µ¦·´Ê WebServer Ã¥Äo FreeBSD 7.2 Ã¥ Á­¦·¤¡´»r ¥· r¦µ Page 1 µ¦·´Ê WebServer Ã¥Äo FreeBSD 7.2 јѼѥчѤэъѨѷ 1).
    [Show full text]
  • ULE: a Modern Scheduler for Freebsd
    USENIX Association Proceedings of BSDCon ’03 San Mateo, CA, USA September 8–12, 2003 THE ADVANCED COMPUTING SYSTEMS ASSOCIATION © 2003 by The USENIX Association All Rights Reserved For more information about the USENIX Association: Phone: 1 510 528 8649 FAX: 1 510 548 5738 Email: [email protected] WWW: http://www.usenix.org Rights to individual papers remain with the author or the author's employer. Permission is granted for noncommercial reproduction of the work for educational or research purposes. This copyright notice must be included in the reproduced paper. USENIX acknowledges all trademarks herein. ULE: A Modern Scheduler For FreeBSD Jeff Roberson The FreeBSD Project [email protected] Abstract The existing thread scheduler in FreeBSD was well suited towards the computing environment that it was developed in. As the priorities and hardware targets of the project have changed, new features and scheduling properties were required. This paper presents ULE, a scheduler that is designed with modern hardware and requirements in mind. Prior to discussing ULE, the designs of several other schedulers are presented to provide some context for comparison. A simple scheduler profiling tool is also discussed, the results of which provide a basis for making simple comparisons between important aspects of several schedulers. 1 Motivation UP. These efforts were examined while ULE was under development and many of them had some The FreeBSD project began a considerable shift in influence in its design. ULE was intended to be a kernel architecture for the 5.0 release. The new production quality modern scheduler from the start. As architecture is geared towards SMP (Symmetric Multi- such evolution was preferred over revolution.
    [Show full text]
  • Avoiding Scheduler Subversion Using Scheduler–Cooperative Locks
    Avoiding Scheduler Subversion using Scheduler–Cooperative Locks Yuvraj Patel, Leon Yang*, Leo Arulraj+, Andrea C. Arpaci-Dusseau, Remzi H. Arpaci-Dusseau, Michael M. Swift Computer Sciences Department, University of Wisconsin–Madison Abstract 1 Introduction We introduce the scheduler subversion problem, where In the modern shared datacenter, scheduling of resources is lock usage patterns determine which thread runs, thereby sub- of central importance [30, 41, 54, 60]. Applications and ser- verting CPU scheduling goals. To mitigate this problem, we vices, whether within a single organization or from many com- introduce Scheduler-Cooperative Locks (SCLs), a new family peting ones, each place strong demands on compute, memory, of locking primitives that controls lock usage and thus aligns network, and storage resources; as such, scalable and effec- with system-wide scheduling goals; our initial work focuses tive scheduling is required to ensure that no single user or on proportional share schedulers. Unlike existing locks, SCLs application receives more than its desired share. provide an equal (or proportional) time window called lock op- Of particular importance in datacenters is CPU scheduling, portunity within which each thread can acquire the lock. We as recent studies have shown [39]. An ideal CPU scheduler design and implement three different scheduler-cooperative should be able to decide what runs on a given CPU at any locks that work well with proportional-share schedulers: a given moment in time. In doing so, the CPU scheduler can user-level mutex lock (u-SCL), a reader-writer lock (RW- optimize for fair allocation [5, 57], low latency [51], perfor- SCL), and a simplified kernel implementation (k-SCL).
    [Show full text]
  • The Journal of AUUG Inc. Volume 24 ¯ Number 2 June 2003
    The Journal of AUUG Inc. Volume 24 ¯ Number 2 June 2003 Features: Microsoftens 10 OpenBSD 3.3 Released 11 Linux System’ Administrator’s Security Guide (Part 1) 15 The Roadman for FreBSD 5-stable 20 Mail and Dynamic IP 24 Intrusion Detection System (Part 1) 25 FreeBSD 5.1 Release Process 40 SCO-vs.-IBM: the Open Source Initiative Position Paper on the Complaint 41 AUUG 2003 Systems Administration Symposium Photo Gallery 57 NetBSD 1.6.1 CD 58 News: Public Notices 4 AUUG: Corporate Members 9 AUUG Conference 2003 Invitation 59 AUUG Membership Renewal 61 AUUG: Chapter Meetings and Contact Details 63 Regulars: President’s Column 3 My Home Network 4 ISSN 1035-7521 Print post approved by Australia Post - PP2391500002 AUUG Membership and General Correspondence The AUUG Secretary PO Box 7071 Edi oria Baulkham Hills BC NSW 2153 Con Zymaris auu.qn@auu,q.or,q.au Telephone: 02 8824 9511 or 1800 625 655 (Toll-Free) I imagine I’m not alone in expressing fond memories Facsimile: 02 8824 9522 Email: [email protected] of both Carl Sagan and Stephen Jay Gould. Both of these gentleman were not only practicing scientists AUUG Management Committee but also exemplary communicators of science and of Email: [email protected] the technical, complex and beautiful cosmos that we inhabit. President Greg Lehey PO Box 460 Through his combination of vision and chutzpah, Echunga, SA, 5153 Sagan caused us to pause for a moment and consider Bus. Tel (08) 8388 8286, Mobile 0418 838 708, Fax (08) 8388 8725 the majesty of star-stuff, of galaxies and of the human <[email protected]> discourse which ensued over millennia in trying to Immediate Past President reveal their secrets.
    [Show full text]
  • ULE: a Modern Scheduler for Freebsd
    ULE: A Modern Scheduler For FreeBSD Jeff Roberson The FreeBSD Project [email protected] Abstract The existing thread scheduler in FreeBSD was well suited towards the computing environment that it was developed in. As the priorities and hardware targets of the project have changed, new features and scheduling properties were required. This paper presents ULE, a scheduler that is designed with modern hardware and requirements in mind. Prior to discussing ULE, the designs of several other schedulers are presented to provide some context for comparison. A simple scheduler profiling tool is also discussed, the results of which provide a basis for making simple comparisons between important aspects of several schedulers. 1 Motivation UP. These efforts were examined while ULE was under development and many of them had some The FreeBSD project began a considerable shift in influence in its design. ULE was intended to be a kernel architecture for the 5.0 release. The new production quality modern scheduler from the start. As architecture is geared towards SMP (Symmetric Multi- such evolution was preferred over revolution. Processing) scalability along with low interrupt latency and a real-time-like preemptable kernel. This new Several schedulers are discussed below. The 4BSD architecture presents opportunities and challenges for scheduler provided refinements over the traditional intelligent management of processor resources in both UNIX scheduler. It was the basis for FreeBSD's SMP and UP (Uni-Processor) systems. current scheduler which ULE used as a target to match for its interactive and nice behavior. UNIX System V The current FreeBSD scheduler has its roots in the release 4 solved the O(n) problem by using a table 4.3BSD scheduler.
    [Show full text]
  • Chapter III Scheduling.Pdf
    CHAPTER III SCHEDULING Jehan-François Pâris [email protected] Chapter overview The problem Non-preemptive policies: FCFS, SJF Preemptive policies: Round robin, multilevel queues with feedback, guaranteed scheduling Examples: UNIX, Linux, Windows NT and after The scheduler Part of the OS that decides how to allocate the processor cores and the main memory to processes Will focus here on the CPU scheduler Decides which ready process should get a processor core Also called short-term scheduler Objectives A good scheduler should Minimize user response times of all interactive processes Major objective today Maximize system throughput Be fair Avoid starvation What is starvation? Starvation happens whenever some ready processes never get core time Typical of schedulers using priorities Lowest-priority processes keep getting set aside Remedy is to increase the priorities of processes that have waited too long Fairness Ensuring fairness is more difficult than avoiding starvation If I give freshly-baked cookies to half of my nephews and stale bread to the others, I am not fair but I still ensure that nobody starves Non-preemptive Schedulers A non-preemptive CPU scheduler will never remove a core from a running process Will wait until the process releases the core because It issues a system call It terminates Now obsolete How SJF works Five students wait for their instructor at the beginning of her office hours Ann needs 20 minutes of her time Bob needs 30 minutes Carol needs 10 minutes Dean needs 5 minutes Emily needs 5
    [Show full text]