ECE 598 Advanced Operating Systems Lecture 22

Similar documents
ECE 598 Advanced Operating Systems Lecture 23

ECE 574 Cluster Computing Lecture 8

ECE 598 Advanced Operating Systems Lecture 14

ECE 598 Advanced Operating Systems Lecture 11

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017

ECE 598 Advanced Operating Systems Lecture 10

ECE 471 Embedded Systems Lecture 12

ECE 598 Advanced Operating Systems Lecture 18

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

ECE 598 Advanced Operating Systems Lecture 17

CS 326: Operating Systems. CPU Scheduling. Lecture 6

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

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)

Processes. CS 475, Spring 2018 Concurrent & Distributed Systems

Operating Systems ECE344. Ding Yuan

ECE 598 Advanced Operating Systems Lecture 12

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

CPSC 341 OS & Networks. Processes. Dr. Yingwu Zhu

ECE 598 Advanced Operating Systems Lecture 19

Operating Systems. Lecture Process Scheduling. Golestan University. Hossein Momeni

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 21

CISC 7310X. C05: CPU Scheduling. Hui Chen Department of Computer & Information Science CUNY Brooklyn College. 3/1/2018 CUNY Brooklyn College

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

Comp 310 Computer Systems and Organization

Processes. Process Scheduling, Process Synchronization, and Deadlock will be discussed further in Chapters 5, 6, and 7, respectively.

Advanced Operating Systems (CS 202) Scheduling (1)

CPU Scheduling. CSE 2431: Introduction to Operating Systems Reading: Chapter 6, [OSC] (except Sections )

THE PROCESS ABSTRACTION. CS124 Operating Systems Winter , Lecture 7

Learning Outcomes. Scheduling. Is scheduling important? What is Scheduling? Application Behaviour. Is scheduling important?

ECE 598 Advanced Operating Systems Lecture 14

CMPS 111 Spring 2003 Midterm Exam May 8, Name: ID:

CS370 Operating Systems

ECE 571 Advanced Microprocessor-Based Design Lecture 13

PROCESS MANAGEMENT. Operating Systems 2015 Spring by Euiseong Seo

COMP 3361: Operating Systems 1 Final Exam Winter 2009

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

Multi-Level Feedback Queues

Filesystem. Disclaimer: some slides are adopted from book authors slides with permission 1

FILE SYSTEMS, PART 2. CS124 Operating Systems Fall , Lecture 24

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

Scheduling. Don Porter CSE 306

Process Scheduling. Copyright : University of Illinois CS 241 Staff

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

Scheduling Mar. 19, 2018

238P: Operating Systems. Lecture 14: Process scheduling

Exam Guide COMPSCI 386

Scheduling. CS 161: Lecture 4 2/9/17

Operating Systems. Operating Systems Professor Sina Meraji U of T

Operating Systems. Scheduling

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

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

CS370 Operating Systems

Processes, PCB, Context Switch

Filesystem. Disclaimer: some slides are adopted from book authors slides with permission

ECE 598 Advanced Operating Systems Lecture 14

ECE 471 Embedded Systems Lecture 15

Last Class: Processes

FILE SYSTEMS. CS124 Operating Systems Winter , Lecture 23

W4118 Operating Systems. Junfeng Yang

(MCQZ-CS604 Operating Systems)

OPERATING SYSTEMS: Lesson 4: Process Scheduling

ECE 471 Embedded Systems Lecture 16

EECS 482 Introduction to Operating Systems

Process Time. Steven M. Bellovin January 25,

OPERATING SYSTEM. PREPARED BY : DHAVAL R. PATEL Page 1. Q.1 Explain Memory

Scheduling of processes

File system internals Tanenbaum, Chapter 4. COMP3231 Operating Systems

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

CS 4284 Systems Capstone

Block Device Scheduling. Don Porter CSE 506

Frequently asked questions from the previous class survey

Block Device Scheduling

CMPS 111 Spring 2013 Prof. Scott A. Brandt Midterm Examination May 6, Name: ID:

Jan 20, 2005 Lecture 2: Multiprogramming OS

Operating Systems. File Systems. Thomas Ropars.

Scheduling, part 2. Don Porter CSE 506

Process. Heechul Yun. Disclaimer: some slides are adopted from the book authors slides with permission

Operating Systems and Networks Assignment 9

Example: CPU-bound process that would run for 100 quanta continuously 1, 2, 4, 8, 16, 32, 64 (only 37 required for last run) Needs only 7 swaps

Announcements. Program #1. Reading. Due 2/15 at 5:00 pm. Finish scheduling Process Synchronization: Chapter 6 (8 th Ed) or Chapter 7 (6 th Ed)

8: Scheduling. Scheduling. Mark Handley

File Systems Management and Examples

Lecture 2 Process Management

Chapter 10: Case Studies. So what happens in a real operating system?

Review. Preview. Three Level Scheduler. Scheduler. Process behavior. Effective CPU Scheduler is essential. Process Scheduling

Chapter 3: Process Concept

Chapter 3: Process Concept

Mon Sep 17, 2007 Lecture 3: Process Management

CS3733: Operating Systems

Lecture 4: Process Management

Operating Systems. Lecture File system implementation. Master of Computer Science PUF - Hồ Chí Minh 2016/2017

we are here Page 1 Recall: How do we Hide I/O Latency? I/O & Storage Layers Recall: C Low level I/O

OPERATING SYSTEMS. COMS W1001 Introduction to Information Science. Boyi Xie

SMD149 - Operating Systems

Processes Prof. James L. Frankel Harvard University. Version of 6:16 PM 10-Feb-2017 Copyright 2017, 2015 James L. Frankel. All rights reserved.

Chapter 3: Process Concept

Processes, Context Switching, and Scheduling. Kevin Webb Swarthmore College January 30, 2018

Uniprocessor Scheduling

Scheduling. Today. Next Time Process interaction & communication

CS370 Operating Systems

Transcription:

ECE 598 Advanced Operating Systems Lecture 22 Vince Weaver http://web.eece.maine.edu/~vweaver vincent.weaver@maine.edu 19 April 2016

Announcements Project update HW#9 posted, a bit late Midterm next Thursday 1

Homework #8 1. Filename in inode? UNIX no, mostly due to hard links. Can be other reasons too... what happens when you change filename, you d have to somehow grow the inode; inodes were traditionally a fixed size. 2. Ext2 overhead, 1k blocksize. Note power of 2 vs marketing bytes (a) with no indirect, 12 entries*1k = 12k (b) with single, 12k+((1k/4)*1k) = 268k 2

(c) with double, 12k+256k+(256*256*1k) = 65804k (64MB) (d) with triple, 12k+256k+65804k+(256*256*256*1k) = 16,843,288k = 16GB (e) overhead = inode + 1k (single) + 1k+256k (double) + 1k+256k+64M(triple) = roughly 66,051k (64MB) fairly small (f) (not a question) 4kb blocksize, triple = 48k+1024k+4GB+16TB (with roughly 4GB overhead) 3. fat vs ext2 speed? speed doing what? 3

maximum filesize permissions simplicity journaling is technically an ext3 feature portability 4. ls vs du shows holes in file man du should help also shows blocks used? but not things like indirect blocks, don t think there s a Linux syscall to report that kind of thing. 5. proc info generated on the fly (doesn t necessarily even live in ram, some of the /proc files are huge) 4

6. filesystems reiserfs hostfs (UML) jffs (journaling flash filesystem) efs, an SGI filesystem, not the windows encrypting fs NTFS coda overlayfs 5

Processes a Review Multiprogramming multiple processes run at once Context switch each process has own program counter saved and restored as well as other state (registers) OSes often have many things running, often in background. On Linux/UNIX sometimes called daemons Can use top or ps to view them. Creating new: on Unix its fork/exec, windows 6

CreateProcess Children live in different address space, even though it is a copy of parent Process termination: what happens? Resources cleaned up. atexit routines run. How does it happen? exit() syscall (or return from main). Killed by a signal. Error Unix process hierarchy. 7

Parent and children, etc. not strictly possible to give your children away, although init inherits orphans Process control block. 8

Process States Running on CPU Ready ready but no CPU available Blocked waiting on I/O or resource Terminated 9

Scheduling Picks which jobs to run when Complex problem Simple: batch scheduling. Each run to completion. Multi-tasking. Computation often mixed with slow I/O Avoid context switching if possible 10

Can switch when task voluntarily yields, if kernel blocks on I/O, or if timeslice runs out Simple round-robin scheduling Different type of processes. Long-running CPU bound where extra latency doesn t matter? Interactive things like GUI interfaces, video games, music playing where too much delay is bad? Real time constraints? 11

All: fairness, balance Scheduling Goals Batch: throughput (max jobs/hour), turnaround (time from submission to completion), CPU utilization (want it busy) Interactive: fast response, doesn t annoy users Real-time: meet deadlines, determinism 12

Batch Scheduling First-come-first-served (what if 2-day long job submitted first) Shortest job first Many others 13

Interactive Scheduling Round-robin Priority nice on UNIX Multiple Queues Others (shortest process, guaranteed, lottery) Fair scheduling per user rather than per process 14

Real-time Scheduling Complex, more examples in 471 or real time OS course 15

The Linux Scheduler People often propose modifying the scheduler. That is tricky. Scheduler picks which jobs to run when. Optimal scheduler hard. What makes sense for a longrunning HPC job doesn t necessarily make sense for an interactive GUI session. Also things like I/O (disk) get involved. You don t want it to have high latency 16

Linux originally had a simple circular scheduler. for 2.4 through 2.6 had an O(N) scheduler Then Then in 2.6 until 2.6.23 had an O(1) scheduler (constant time, no many how many processes). Currently the Completely Fair Scheduler (with lots of drama). Is O(log N). Implementation of weighted fair queuing How do you schedule? Power? Per-task (5 jobs, each get 20%). Per user? (5 users, each get 20%). 17

Per-process? Per-thread? Multi-processors? Hyperthreading? Heterogeneous cores? Thermal issues? 18