CS Lab 2: Scheduling

Size: px
Start display at page:

Download "CS Lab 2: Scheduling"

Transcription

1 CS Palmer Dabbelt March 1, 2013 Contents 1 Real-time Scheduling Linux Scheduler Classes Kernel Snapshotting Testing a Real-Time Process with Cucumber Resource Allocation x264 Case Study Dynamic Resource Fairness DRF Work Queues Distributed Code realtime/cbs.[ch] realtime/dfs,q.[ch] realtime/rt,ctl.c webvideo Tasks Kernel Interface (0 pts) CBS Scheduler Class (30 pts) Kernel Snapshots (20 pts) Web Server Modifications (5 pts) Dynamic Resource Fairness (25 pts) Schedule 10 1

2 For this assignment you will be implementing improvements to the Linux scheduler. First you ll be implementing a simple real-time scheduler, and second you ll be implementing a fair resource allocation scheme. It s important to note that we will be using your HTTP server to launch these real-time processes. In order to attempt to break the dependency chain as much as possible, none of the performance features implemented for the previous assignment will be necessary here. To successfully test your scheduler you ll just need to be able to launch CGI scripts in parallel. If any group feels their implementation from the previous lab isn t up to stuff then please come and talk with me early and we ll try to work something out. 1 Real-time Scheduling The first section of this lab consists of adding a real-time scheduler to Linux. You ll be taking advantage of Linux s support for scheduler classes in order to cleanly implement your new scheduler. For this assignment you will be implementing an extension to the EDF algorithm that allows you to mix real-time tasks with what the paper refers to as constant bandwidth servers, which are simply processes that get a fixed amount of CPU bandwidth.. The CBS paper availiable on the course website, you should read it before proceeding further We will be taking advantage of the fact that the CBS algorithm has a natural method of determining the amount of slack present in the system. The paper uses this to criteria to determine if a given set of tasks is schedulable, but the math works out such that we can also determine the largest allocation that we can give CFS in order to mantain the guarantees of CBS. 1.1 Linux Scheduler Classes The simplest way to add CBS support to Linux is to implement a new scheduler classes. It s important to note that Linux scheduler classes aren t loadable at runtime (there s no technical reasons this can t happen, it s just that nobody has bothered to implement it). This means you ll need to decide upon your scheduler hierarchy at compile time, which isn t actually a problem because CBS has an clean way to assign the slack to other schedulers. Linux defines scheduler classes as a simple integer value that defines the scheduling algorithm that decides when to run a given process. Schedulers in Linux have a fixed priority: the highest priority scheduler gets to run all its jobs to completion before the next highest priority scheduler gets to run any jobs. Your new CBS scheduler should be the highest priority scheduler in the system, producing the ordering of schedulers shown in Figure 1. CBS Realtime CFS Idle Figure 1: Scheduler Priority Order In order to make this happen you ll first need to do a bit of build work such that you can install your scheduler beside CFS reference Lab 0 for how to do this. You ll then need to add a scheduler identifier along side the other identifiers inside linux/include/uapi/linux/sched.h. You will need to modify struct task struct in order to keep track of the necessary accounting data you ll be using to implement CBS. Additionally, you ll need to define a CBS-specific run queue look at struct cfs rq inside linux/kernel/sched/. In order to actually get your code to be run, you ll need to add some code sched init that initializes your run queue. At this point you can create a new scheduler class that contains a set of function pointers 2

3 that actually consist of your implementation of CFS (look at the other struct sched class entries in linux/kernel/sched/sched.h). Be sure to set your scheduler as the highest priority scheduler inside linux/kernel/sched/sched.h with the sched class highest macro. At this point you re effectively done with the overhead involved in teaching Linux how to recognize your scheduler. 1.2 Kernel Snapshotting As you probably discovered during lab 0, testing realtime processes is inherently difficult because any code you use for instrumentation will inherently break your timings. In order minimize this breakage, we ve attempted to design a general but efficient API that allows you to interogate the scheduler without too much overhead. We ve chosen to use snapshots in order to achieve this. The snapshoting algorithm is defined in realtime/snapshot.h. The idea is that you pass an array of (event, trigger) pairs into the kernel. The data is passed into the kernel using the snapshot() system call. When the user calls snapshot() the kernel will first empty all of its snapshot buffers. Every time the kernel sees an event that causes the trigger to fire, it fills up the next snapshot buffer with the relevant information. This will hopefully be a very fast operation, as all the buffers will be staticly allocated. The user can then go ahead and poll these buffers at their leisure without breaking the hard timing path in the kernel. This is probably best worked through as an example. The idea is that a scheduling policy looks at the current state of runnable processes and determines which one should be running. A correct scheduler will always make the correct decision as to who to schedule next, so if we sample the decisions a scheduler makes and they re all correct then we can have a reasonable certainty that the scheduler is correct. An example of what the snapshot() system call produces can be seen in Figure 2. In this case this would be an invalid run of the CBS scheduler because the wrong process was chosen to run next it should be B, as B has the earliest deadline. History Cur Next Queue /proc/snapshot/0 A 5ms B 10ms C 8bs A 5ms C 3ms B A C D +10ms +20ms +30ms BLK F BLK History Cur Next Queue /proc/snapshot/1 B 10ms C 8bs A 5ms C 3ms B A C 3ms +17ms +27ms D BLK F BLK B +10ms Figure 2: The result of calling snapshot({ CBS, CBS}, { BEFORE, AFTER}, 2) on a broken In order to get the data out of the kernel, you will be implementing a /proc interface. You should create the directory /proc/snapshot and populate it with SNAP MAX TRIGGERS files named from 0 to SNAP MAX TRIGGERS 1. Each one of these files will represent a snapshot buffer that the user has access to. Reads from these virtual files will return formatted data to the user so they can parse it. 3

4 Note that you must implement the functions in realtime/cbs proc.h, which are what we ll be using to implement our /proc interface to get data out. Additionally, you must setup you build such that realtime/cbs proc impl.c gets linked into your kernel image (again, that s how we ll be implementing the /proc interface). There are examples of how to cleanly do this in lab Testing a Real-Time Process with Cucumber The end goal of the snapshotting interface is to allow you to test CBS using Cucumber. There are two important properties of the CBS algorithm that you will need to test: that real-time tasks are being scheduled EDF, and that CBS tasks end up with the correct compute bandwidth in aggregate. The snapshotting interface we ve specified allows you to test both of those constraints. It s probably best to take a look at exactly how data is going to move into and out of the VM. Figure 3 shows how the test system is laid out and the interface between each module QEMU Cucumber httpd CGI Kernel CBS Model Tasks Steps realtimectl read() /proc Valid cbs_proc.h snapshot() Snapshot fork()/exec() Triggers realtime cbs_create() CBS Figure 3: Moving data from CBS to Cucumber You should already have the HTTP server working, and we have provided you with realtime and realtimectl. You ll want to begin by writing some Cucumber tests that describe the behavior of the system. An example of a behavior of CBS is shown in Figure 4. Most of these lines are fairly straight-forward: process creation and snapshoting translate directly into some calls to realtimectl. The statement A should always be scheduled before B, however, is interesting. Effectively this means that your Cucumber code must have a model of CBS that understands when processes should be executed. In this specific case it s simple because all the threads have the same execution period, but in the arbitrary case it ll be significantly more complicated. Effectively you need a model of CBS that, given a snapshot, is capable of determining if the correct process is being executed. This will involve looking at the entire list of queued processes and determining that your kernel implementation of CBS has picked the correct process to schedule. 4

5 When the following processes are started ID Type CPU Peroid A RT B BW C BW And the system executes for 10 seconds When any snapshot is taken Then C should recieve 20% of the CPU time And B should recieve 9% of the CPU time And A should always be scheduled before B And A should always be scheduled before C Figure 4: A sample behavior of CBS 2 Resource Allocation The fundamental concept that underlies UNIX systems is the idea of resource virtualization. UNIX systems provide the programmer with an infinate number of threads of execution, each of which has access to an infinate amount of memory. The operating system uses time multiplexing in order to provide the appearance of having more resources than it actually does. Providing the abstraction of infinite resources makes programming UNIX systems easy because the programmer doesn t have to explicitly manage resources. These abstractions made sense on traditional UNIX systems because they had only a single processor. The key here is that it s impossible for the user to distinguish between getting all of the time on a slow machine and getting some of the time on a faster machine. For the past few years, modern hardware has been increasing in performance by increasing the amount of parallelism exposed to the user. This has the unfortunate consequence that we no longer get perfect scaling: there is additional overhead involved in synchronizing work between threads that the programmer has to assume can be run asynchronusly but are actually just multiplexed onto a few CPUs. 2.1 x264 Case Study An example application that demonstrates the problems behind the UNIX programming model is the x264 video encoder. Like most video encoders, x264 is a very finely tuned program on amd64 x264 is actually written in hand-tuned assembly, which provides about a 5x speedup over C! Depending on exactly which options you use, x264 can be very computationally expensive. From just using x264 s default set of options, I can get encode speeds ranging from 5 FPS to 500 FPS. As is standard for video encoding codes, there is a tradeoff between encoding speed and output quality. The x264 encoder has been parallelized to run on an arbitrary number of CPUs. As the H.264 standard (x264 is an implementation of H.264) was designed for parallel implementations, it turns out that it s very easy to parallelize x264. Figure 5a shows the result of the same x264 computation being spread over multiple threads. The machine used was running Linux and was pretty much idle. You can see how the encode speeds up nicely as more CPUs are used. As is standard for parallel implementations, x264 doesn t get a perfect parallel scaling: if n CPUs produces f(n) FPS, then 2n CPUs produces less than 2f(n) FPS. There are many reasons for non-linear scaling on multiprocessor machines. At least one reason is that extra work is required to synchronize threads that aren t actually running in parallel. Figure 5b 5

6 shows what happens when we attempt to run an x264 encoding instance that s bound to a single CPU but is running in multi-threaded mode. There is a fairly significant performance hit that results from running more threads than CPU instances Frames per Second Frames per Second Threads Threads (a) Multiple CPUs (b) Single CPU Figure 5: Parallel x264 video encoding 2.2 Dynamic Resource Fairness In order to resolve the issues that stem from attempting to provide a UNIX enviornment highly tuned parallel applications we ll have to look at the entire streaming system. Your web server will look something like Figure 6 when it is processing streaming video: clients connect to the web server which then launches CGI scripts to encode the video. The output from those CGI scripts is routed back to the clients through the web server. httpd Client kbps Encode 1 Client kbps Encode 2 Client kbps Encode 3 Stats Best Effort Stats Figure 6: Anatomy of a HTTP video encoding server The problem is that each CGI instance has no way to inform the other CGI instances of how many resources they re using. Effectively this boils down to the fact that UNIX has a very simple resource allocation scheme: all processes are allowed to consume an infinate amount of resources and the operating system is required to transparently virtualize these resources as best as it possibly can. This virtuilization can have a serious effect on performance, as shown in the case study about x264. 6

7 One better method of resource allocation in specified in the DRF paper. DRF stands for Dominant Resource Fairness. The general idea is that all processes specify a resource vector. Resource vectors specify the amount of resources that are required to perform a single unit of computation. The operating system is then able to ensure that a fair and efficient resource allocation across the machine. More information is availiable in the DRF paper DRF Work Queues The most interesting part of DRF is the ability to dynamically change the number of threads working on a system in order to ensure that fairness is mantained. We need two mechanisms to achieve this: the ability to increase the number of processing threads and the ability to decrease the number of processing threads. In order to increase the number of threads availiable for processing we can simply call the provided work func function another time to create another worker thread. In order to decrease the number of threads availiable for processing a thread can simply be killed asynchronously. Allowing the kernel to asynchronusly create and kill threads adds a lot of complexity to userspace programs. In the standard UNIX resource model programmers only have to worry about arbitrary execution orderings of threads, but using this DRF API the programmer also has to ensure that the program executes correctly even when threads of execution can terminate at any point. A side effect of this new constraint is that it is no longer safe to use locks anywhere in code that s managed by DRF. An example parallel application in shown in Figure 7. This application uses locks to partition out work to multiple threads, ensuring that each thread computes a different value in the table. Unfortunately, this program breakes horribly when we allow threads to arbitrarily terminate. If execution is terminated within a critical section then the program will deadlock. If execution is terminated while the computation is running, then a unit of work can be missed (one of the entries in blocks might not get written). #define MAX_BLOCKS 10 int blocks[max_blocks]; int get_block(void) { static int cur = 0; static lock_t lock = UNLOCKED; int out; lock(&lock); out = cur++; unlock(&lock); } return (out < MAX_BLOCKS)? out : -1; void thread_main(void) { int block; while ((block = get_block())!= -1) blocks[block] = pow(10, block); } Figure 7: A sample UNIX parallel application In order to solve these two problems we re going to have you implement a new synchronization 7

8 construct that I m calling DRF work queues that directly solves the problem of handing out work to multiple threads that may or may not actually finish their transactions. Figure 8 shows the original application after being ported to use this new synchranization construct. #define MAX_BLOCKS 10 int blocks[max_blocks]; drfq_t queue; int main(void) { drfq_create(&queue, MAX_BLOCKS); } void thread_main(void) { int block; while ((block = drfq_request(&queue))!= -1) { blocks[block] = pow(10, block); drfq_commit(&queue, block); } } Figure 8: A sample DRF Queue parallel application 3 Distributed Code We ve distributed some code along with this assignment that s designed to get you started. All this code should be availiable inside the class s public git repo, in the master branch. The vast majority of the code provided to you lives inside the realtime folder in your git repo. 3.1 realtime/cbs.[ch] These files contain the CBS API that you will have to implement for this assignment along with a userspace implementation of those APIs. Note that the userspace implementation doesn t actually do CBS, it s just the minimal amount of code required in order to actually make code that uses the CBS APIs execute. The userspace CBS implementation provides no guarantees about execution time at all. You can easily see this: start up a few CPU intensive processes and your real-time tasks will start missing their deadlines. This would be a good comparison for you to make against your proper CBS application: how much background CPU throughput can you get while still hitting your deadlines? 3.2 realtime/dfs,q.[ch] This provides an implementation of both DFS and DFS queues entirely in userspace. This implementation is layered on top of both CBS and pthreads. Much like CBS, this is just the minimal amount of code required to make things work. This code doesn t actually do any dynamic resource allecation, for example, it just always runs the specified maximum number of threads. Again, this could make for some decent comparisons with your in-kernel implementation. 3.3 realtime/rt,ctl.c This contains a pair of applications that are designed to allow you to verify that your real-time deadlines are met. They work as a pair: realtimectl is a CGI application that forks to execute realtime. 8

9 Additionally, realtimectl is able to use the snapshot() interface to get data out of the running kernel and into Cucumber. This allows you to leverge your HTTP server to easily test your scheduler, and as such should probbaly be the first application you take a look at. 3.4 webvideo webvideo contains a program that is designed to implement some of the same computational patterns as a video codec. This application already uses our DFS and CBS APIs, so it should require no modification to run. That said, it will probably be useful to extend webvideo to allow you to cover more interesting edge cases. 4 Tasks 4.1 Kernel Interface (0 pts) A major part of this assignment will be deciding what functionality you want to implement in the kernel and what functionality you want to implement in userspace. The goal here is to make you do a similar design decision as to what went into Linux s futexes: do the stuff that s impossible to do in userspace in the kernel, but keep everything else in userspace. As a hint, you probably don t want to add a cbs create() system call but should instead write that as a library routine that calls fork() and sched setscheduler(). If you pick a clean implementation boundary then you ll end up with a significantly easier assignment. This isn t worth any points, I just wanted to list it first so you sit down with your team and hash out the kernel interface you re going to provide. This should definately be a major component of your initial design document. 4.2 CBS Scheduler Class (30 pts) Implementing CBS in the kernel will probably be the largest piece of code you re implementing for this assignment. Luckily it should be pretty straight-forward: just follow the tutorial to learn where to modify the kernel, and then follow the CBS algorithm for scheduling. There are two interesting edge cases for CBS that aren t mentioned anywhere else CBS kills real-time threads by passing SIGXCPU to them when they ve exceeded their processing time limet. CBS must yield the remainder of its time to CFS. 4.3 Kernel Snapshots (20 pts) In order to test your CBS implementation you will have to implement the kernel snapshotting mechanism that was described earlier in the document. The snapshot API is contained in realtime/snapshot.h. Be sure to also implement the compatability layer for our /proc filesystem, which is located at realtime/cbs proc.[ch]. 4.4 Web Server Modifications (5 pts) You will need to modify how you handle CGI applications. Your previous CGI implementation needed to buffer the entire CGI response in order to handle error codes returned by the CGI application. Buffering the entire response breaks the live aspect of live video streaming, so it s not going to work for this assignment. The provided CGI video streaming application will provide the header X-Buffering: Streaming 9

10 to signify that the server should not buffer the response and should instead transmit data to the client directly as in comes out of the CGI script instead of waiting for the CGI script to finish. You can assume that all CGI scripts that run in streaming mode return successfully. This means you don t have to worry about checking the error code of streaming CGI scripts. Additionally, you can assume that all CGI scripts that run in streaming mode won t specify any cache-related headers. This means you can bypass your cache for streaming responses. 4.5 Dynamic Resource Fairness (25 pts) Assuming you pick your userspace / kernel barrier correctly, implementing DRF should be pretty straight-forward. Just be sure to create CBS-class CBS threads for DRF and you should be OK. Implementing DRF work queues will be a bit tricky: you ve got to do this without any userspace locks so you can avoid the mentioned race conditions. Note that you also can t use something like pthread cancel() because that s akin to allowing the user to turn off interrupts. 5 Schedule The schedule for this assignment is the same as for the previous assignment: the project is three weeks long, and at the half way point we will be requiring a design document. 10

CS Lab 1: httpd

CS Lab 1: httpd CS 194-24 Palmer Dabbelt February 6, 2013 Contents 1 Setup 2 2 Distributed Code 3 2.1 Cucumber, Capybara and Mechanize.............................. 3 2.2 HTTP Server...........................................

More information

CS Lab 0.5: Fish

CS Lab 0.5: Fish CS 194-24 Palmer Dabbelt January 29, 2014 Contents 1 Userspace Implementation 2 1.1 The Fish API........................................... 2 1.2 VGA................................................ 4 1.3

More information

Operating Systems, Assignment 2 Threads and Synchronization

Operating Systems, Assignment 2 Threads and Synchronization Operating Systems, Assignment 2 Threads and Synchronization Responsible TA's: Zohar and Matan Assignment overview The assignment consists of the following parts: 1) Kernel-level threads package 2) Synchronization

More information

CS 326: Operating Systems. Process Execution. Lecture 5

CS 326: Operating Systems. Process Execution. Lecture 5 CS 326: Operating Systems Process Execution Lecture 5 Today s Schedule Process Creation Threads Limited Direct Execution Basic Scheduling 2/5/18 CS 326: Operating Systems 2 Today s Schedule Process Creation

More information

Native POSIX Thread Library (NPTL) CSE 506 Don Porter

Native POSIX Thread Library (NPTL) CSE 506 Don Porter Native POSIX Thread Library (NPTL) CSE 506 Don Porter Logical Diagram Binary Memory Threads Formats Allocators Today s Lecture Scheduling System Calls threads RCU File System Networking Sync User Kernel

More information

ECE 574 Cluster Computing Lecture 8

ECE 574 Cluster Computing Lecture 8 ECE 574 Cluster Computing Lecture 8 Vince Weaver http://web.eece.maine.edu/~vweaver vincent.weaver@maine.edu 16 February 2017 Announcements Too many snow days Posted a video with HW#4 Review HW#5 will

More information

What is version control? (discuss) Who has used version control? Favorite VCS? Uses of version control (read)

What is version control? (discuss) Who has used version control? Favorite VCS? Uses of version control (read) 1 For the remainder of the class today, I want to introduce you to a topic we will spend one or two more classes discussing and that is source code control or version control. What is version control?

More information

Operating Systems 16 - CS 323 Assignment #2

Operating Systems 16 - CS 323 Assignment #2 Operating Systems 16 - CS 323 Assignment #2 Scheduler March 18, 2016 1 Objectives 1. Learn about scheduling in the Linux kernel 2. Understand the tradeoffs involved in scheduling 3. Work on the codebase

More information

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

ò mm_struct represents an address space in kernel ò task represents a thread in the kernel ò A task points to 0 or 1 mm_structs Last time We went through the high-level theory of scheduling algorithms Scheduling Today: View into how Linux makes its scheduling decisions Don Porter CSE 306 Lecture goals Understand low-level building

More information

Scheduling. Don Porter CSE 306

Scheduling. Don Porter CSE 306 Scheduling Don Porter CSE 306 Last time ò We went through the high-level theory of scheduling algorithms ò Today: View into how Linux makes its scheduling decisions Lecture goals ò Understand low-level

More information

CS 31: Introduction to Computer Systems : Threads & Synchronization April 16-18, 2019

CS 31: Introduction to Computer Systems : Threads & Synchronization April 16-18, 2019 CS 31: Introduction to Computer Systems 22-23: Threads & Synchronization April 16-18, 2019 Making Programs Run Faster We all like how fast computers are In the old days (1980 s - 2005): Algorithm too slow?

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

Utilizing Linux Kernel Components in K42 K42 Team modified October 2001

Utilizing Linux Kernel Components in K42 K42 Team modified October 2001 K42 Team modified October 2001 This paper discusses how K42 uses Linux-kernel components to support a wide range of hardware, a full-featured TCP/IP stack and Linux file-systems. An examination of the

More information

PROCESS VIRTUAL MEMORY. CS124 Operating Systems Winter , Lecture 18

PROCESS VIRTUAL MEMORY. CS124 Operating Systems Winter , Lecture 18 PROCESS VIRTUAL MEMORY CS124 Operating Systems Winter 2015-2016, Lecture 18 2 Programs and Memory Programs perform many interactions with memory Accessing variables stored at specific memory locations

More information

Midterm Exam Amy Murphy 6 March 2002

Midterm Exam Amy Murphy 6 March 2002 University of Rochester Midterm Exam Amy Murphy 6 March 2002 Computer Systems (CSC2/456) Read before beginning: Please write clearly. Illegible answers cannot be graded. Be sure to identify all of your

More information

CSE 451 Midterm 1. Name:

CSE 451 Midterm 1. Name: CSE 451 Midterm 1 Name: 1. [2 points] Imagine that a new CPU were built that contained multiple, complete sets of registers each set contains a PC plus all the other registers available to user programs.

More information

CS 333 Introduction to Operating Systems. Class 3 Threads & Concurrency. Jonathan Walpole Computer Science Portland State University

CS 333 Introduction to Operating Systems. Class 3 Threads & Concurrency. Jonathan Walpole Computer Science Portland State University CS 333 Introduction to Operating Systems Class 3 Threads & Concurrency Jonathan Walpole Computer Science Portland State University 1 The Process Concept 2 The Process Concept Process a program in execution

More information

PROJECT 6: PINTOS FILE SYSTEM. CS124 Operating Systems Winter , Lecture 25

PROJECT 6: PINTOS FILE SYSTEM. CS124 Operating Systems Winter , Lecture 25 PROJECT 6: PINTOS FILE SYSTEM CS124 Operating Systems Winter 2015-2016, Lecture 25 2 Project 6: Pintos File System Last project is to improve the Pintos file system Note: Please ask before using late tokens

More information

Chapter 3: Processes. Operating System Concepts 8 th Edition,

Chapter 3: Processes. Operating System Concepts 8 th Edition, Chapter 3: Processes, Silberschatz, Galvin and Gagne 2009 Chapter 3: Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication 3.2 Silberschatz, Galvin and Gagne 2009

More information

CPS 310 midterm exam #1, 2/19/2016

CPS 310 midterm exam #1, 2/19/2016 CPS 310 midterm exam #1, 2/19/2016 Your name please: NetID: Answer all questions. Please attempt to confine your answers to the boxes provided. For the execution tracing problem (P3) you may wish to use

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

Using GitHub to Share with SparkFun a

Using GitHub to Share with SparkFun a Using GitHub to Share with SparkFun a learn.sparkfun.com tutorial Available online at: http://sfe.io/t52 Contents Introduction Gitting Started Forking a Repository Committing, Pushing and Pulling Syncing

More information

Project No. 2: Process Scheduling in Linux Submission due: April 12, 2013, 11:59pm

Project No. 2: Process Scheduling in Linux Submission due: April 12, 2013, 11:59pm Project No. 2: Process Scheduling in Linux Submission due: April 12, 2013, 11:59pm PURPOSE Getting familiar with the Linux kernel source code. Understanding process scheduling and how different parameters

More information

Ext3/4 file systems. Don Porter CSE 506

Ext3/4 file systems. Don Porter CSE 506 Ext3/4 file systems Don Porter CSE 506 Logical Diagram Binary Formats Memory Allocators System Calls Threads User Today s Lecture Kernel RCU File System Networking Sync Memory Management Device Drivers

More information

How to approach a computational problem

How to approach a computational problem How to approach a computational problem A lot of people find computer programming difficult, especially when they first get started with it. Sometimes the problems are problems specifically related to

More information

Operating Systems. Process scheduling. Thomas Ropars.

Operating Systems. Process scheduling. Thomas Ropars. 1 Operating Systems Process scheduling Thomas Ropars thomas.ropars@univ-grenoble-alpes.fr 2018 References The content of these lectures is inspired by: The lecture notes of Renaud Lachaize. The lecture

More information

Cute Tricks with Virtual Memory

Cute Tricks with Virtual Memory Cute Tricks with Virtual Memory A short history of VM (and why they don t work) CS 614 9/7/06 by Ari Rabkin Memory used to be quite limited. Use secondary storage to emulate. Either by swapping out whole

More information

Multiprocessor Systems. Chapter 8, 8.1

Multiprocessor Systems. Chapter 8, 8.1 Multiprocessor Systems Chapter 8, 8.1 1 Learning Outcomes An understanding of the structure and limits of multiprocessor hardware. An appreciation of approaches to operating system support for multiprocessor

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

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Computer Systems Engineering: Spring Quiz I Solutions

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Computer Systems Engineering: Spring Quiz I Solutions Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.033 Computer Systems Engineering: Spring 2011 Quiz I Solutions There are 10 questions and 12 pages in this

More information

Page 1. Analogy: Problems: Operating Systems Lecture 7. Operating Systems Lecture 7

Page 1. Analogy: Problems: Operating Systems Lecture 7. Operating Systems Lecture 7 Os-slide#1 /*Sequential Producer & Consumer*/ int i=0; repeat forever Gather material for item i; Produce item i; Use item i; Discard item i; I=I+1; end repeat Analogy: Manufacturing and distribution Print

More information

CSL373: Lecture 5 Deadlocks (no process runnable) + Scheduling (> 1 process runnable)

CSL373: Lecture 5 Deadlocks (no process runnable) + Scheduling (> 1 process runnable) CSL373: Lecture 5 Deadlocks (no process runnable) + Scheduling (> 1 process runnable) Past & Present Have looked at two constraints: Mutual exclusion constraint between two events is a requirement that

More information

Lecture 4: Memory Management & The Programming Interface

Lecture 4: Memory Management & The Programming Interface CS 422/522 Design & Implementation of Operating Systems Lecture 4: Memory Management & The Programming Interface Zhong Shao Dept. of Computer Science Yale University Acknowledgement: some slides are taken

More information

Questions answered in this lecture: CS 537 Lecture 19 Threads and Cooperation. What s in a process? Organizing a Process

Questions answered in this lecture: CS 537 Lecture 19 Threads and Cooperation. What s in a process? Organizing a Process Questions answered in this lecture: CS 537 Lecture 19 Threads and Cooperation Why are threads useful? How does one use POSIX pthreads? Michael Swift 1 2 What s in a process? Organizing a Process A process

More information

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT I

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT I DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Year and Semester : II / IV Subject Code : CS6401 Subject Name : Operating System Degree and Branch : B.E CSE UNIT I 1. Define system process 2. What is an

More information

Understanding the TOP Server ControlLogix Ethernet Driver

Understanding the TOP Server ControlLogix Ethernet Driver Understanding the TOP Server ControlLogix Ethernet Driver Page 2 of 23 Table of Contents INTRODUCTION 3 UPDATE RATES AND TAG REQUESTS 4 CHANNEL AND DEVICE CONFIGURATION 7 PROTOCOL OPTIONS 9 TAG GENERATION

More information

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

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

More information

Copyright 2013 Thomas W. Doeppner. IX 1

Copyright 2013 Thomas W. Doeppner. IX 1 Copyright 2013 Thomas W. Doeppner. IX 1 If we have only one thread, then, no matter how many processors we have, we can do only one thing at a time. Thus multiple threads allow us to multiplex the handling

More information

System Call. Preview. System Call. System Call. System Call 9/7/2018

System Call. Preview. System Call. System Call. System Call 9/7/2018 Preview Operating System Structure Monolithic Layered System Microkernel Virtual Machine Process Management Process Models Process Creation Process Termination Process State Process Implementation Operating

More information

Concurrency & Parallelism. Threads, Concurrency, and Parallelism. Multicore Processors 11/7/17

Concurrency & Parallelism. Threads, Concurrency, and Parallelism. Multicore Processors 11/7/17 Concurrency & Parallelism So far, our programs have been sequential: they do one thing after another, one thing at a. Let s start writing programs that do more than one thing at at a. Threads, Concurrency,

More information

The name of our class will be Yo. Type that in where it says Class Name. Don t hit the OK button yet.

The name of our class will be Yo. Type that in where it says Class Name. Don t hit the OK button yet. Mr G s Java Jive #2: Yo! Our First Program With this handout you ll write your first program, which we ll call Yo. Programs, Classes, and Objects, Oh My! People regularly refer to Java as a language that

More information

CS Lab 4: Device Drivers

CS Lab 4: Device Drivers CS 194-24 Palmer Dabbelt April 18, 2014 Contents 1 ETH194 References 2 2 ETH194+ 2 3 Tasks 3 3.1 ETH194 Linux Driver (20 pts)................................. 3 3.2 Test Harness (10 pts).......................................

More information

CS-537: Midterm Exam (Spring 2009) The Future of Processors, Operating Systems, and You

CS-537: Midterm Exam (Spring 2009) The Future of Processors, Operating Systems, and You CS-537: Midterm Exam (Spring 2009) The Future of Processors, Operating Systems, and You Please Read All Questions Carefully! There are 15 total numbered pages. Please put your NAME and student ID on THIS

More information

Threads, Concurrency, and Parallelism

Threads, Concurrency, and Parallelism Threads, Concurrency, and Parallelism Lecture 24 CS2110 Spring 2017 Concurrency & Parallelism So far, our programs have been sequential: they do one thing after another, one thing at a time. Let s start

More information

CS 333 Introduction to Operating Systems. Class 3 Threads & Concurrency. Jonathan Walpole Computer Science Portland State University

CS 333 Introduction to Operating Systems. Class 3 Threads & Concurrency. Jonathan Walpole Computer Science Portland State University CS 333 Introduction to Operating Systems Class 3 Threads & Concurrency Jonathan Walpole Computer Science Portland State University 1 Process creation in UNIX All processes have a unique process id getpid(),

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

CS 31: Intro to Systems Threading & Parallel Applications. Kevin Webb Swarthmore College November 27, 2018

CS 31: Intro to Systems Threading & Parallel Applications. Kevin Webb Swarthmore College November 27, 2018 CS 31: Intro to Systems Threading & Parallel Applications Kevin Webb Swarthmore College November 27, 2018 Reading Quiz Making Programs Run Faster We all like how fast computers are In the old days (1980

More information

ECE 598 Advanced Operating Systems Lecture 23

ECE 598 Advanced Operating Systems Lecture 23 ECE 598 Advanced Operating Systems Lecture 23 Vince Weaver http://web.eece.maine.edu/~vweaver vincent.weaver@maine.edu 21 April 2016 Don t forget HW#9 Midterm next Thursday Announcements 1 Process States

More information

Fractal: A Software Toolchain for Mapping Applications to Diverse, Heterogeneous Architecures

Fractal: A Software Toolchain for Mapping Applications to Diverse, Heterogeneous Architecures Fractal: A Software Toolchain for Mapping Applications to Diverse, Heterogeneous Architecures University of Virginia Dept. of Computer Science Technical Report #CS-2011-09 Jeremy W. Sheaffer and Kevin

More information

Processes, PCB, Context Switch

Processes, PCB, Context Switch THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering EIE 272 CAOS Operating Systems Part II Processes, PCB, Context Switch Instructor Dr. M. Sakalli enmsaka@eie.polyu.edu.hk

More information

Processes. CS 475, Spring 2018 Concurrent & Distributed Systems

Processes. CS 475, Spring 2018 Concurrent & Distributed Systems Processes CS 475, Spring 2018 Concurrent & Distributed Systems Review: Abstractions 2 Review: Concurrency & Parallelism 4 different things: T1 T2 T3 T4 Concurrency: (1 processor) Time T1 T2 T3 T4 T1 T1

More information

Parallel Processing with the SMP Framework in VTK. Berk Geveci Kitware, Inc.

Parallel Processing with the SMP Framework in VTK. Berk Geveci Kitware, Inc. Parallel Processing with the SMP Framework in VTK Berk Geveci Kitware, Inc. November 3, 2013 Introduction The main objective of the SMP (symmetric multiprocessing) framework is to provide an infrastructure

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

I/O Management Software. Chapter 5

I/O Management Software. Chapter 5 I/O Management Software Chapter 5 1 Learning Outcomes An understanding of the structure of I/O related software, including interrupt handers. An appreciation of the issues surrounding long running interrupt

More information

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

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

More information

Operating Systems and Networks Assignment 9

Operating Systems and Networks Assignment 9 Spring Term 01 Operating Systems and Networks Assignment 9 Assigned on: rd May 01 Due by: 10th May 01 1 General Operating Systems Questions a) What is the purpose of having a kernel? Answer: A kernel is

More information

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

Processes, Context Switching, and Scheduling. Kevin Webb Swarthmore College January 30, 2018 Processes, Context Switching, and Scheduling Kevin Webb Swarthmore College January 30, 2018 Today s Goals What is a process to the OS? What are a process s resources and how does it get them? In particular:

More information

Systèmes d Exploitation Avancés

Systèmes d Exploitation Avancés Systèmes d Exploitation Avancés Instructor: Pablo Oliveira ISTY Instructor: Pablo Oliveira (ISTY) Systèmes d Exploitation Avancés 1 / 32 Review : Thread package API tid thread create (void (*fn) (void

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

CS Lab 2: fs. Vedant Kumar, Palmer Dabbelt. February 27, Getting Started 2

CS Lab 2: fs. Vedant Kumar, Palmer Dabbelt. February 27, Getting Started 2 CS 194-24 Vedant Kumar, Palmer Dabbelt February 27, 2014 Contents 1 Getting Started 2 2 lpfs Structures and Interfaces 3 3 The Linux VFS Layer 3 3.1 Operation Tables.........................................

More information

Design Overview of the FreeBSD Kernel CIS 657

Design Overview of the FreeBSD Kernel CIS 657 Design Overview of the FreeBSD Kernel CIS 657 Organization of the Kernel Machine-independent 86% of the kernel (80% in 4.4BSD) C code Machine-dependent 14% of kernel Only 0.6% of kernel in assembler (2%

More information

Process Time. Steven M. Bellovin January 25,

Process Time. Steven M. Bellovin January 25, Multiprogramming Computers don t really run multiple programs simultaneously; it just appears that way Each process runs to completion, but intermixed with other processes Process 1 6 ticks Process 2 Process

More information

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

Comparison of soft real-time CPU scheduling in Linux kernel 2.6 series with Solaris 10 Comparison of soft real-time CPU scheduling in Linux kernel 2.6 series with Solaris 10 Kristoffer Eriksson Philip Frising Department of Computer and Information Science Linköping University 1(15) 1. About

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

An Implementation Of Multiprocessor Linux

An Implementation Of Multiprocessor Linux An Implementation Of Multiprocessor Linux This document describes the implementation of a simple SMP Linux kernel extension and how to use this to develop SMP Linux kernels for architectures other than

More information

Programming with MPI

Programming with MPI Programming with MPI p. 1/?? Programming with MPI Miscellaneous Guidelines Nick Maclaren nmm1@cam.ac.uk March 2010 Programming with MPI p. 2/?? Summary This is a miscellaneous set of practical points Over--simplifies

More information

CS370 Operating Systems Midterm Review

CS370 Operating Systems Midterm Review CS370 Operating Systems Midterm Review Yashwant K Malaiya Fall 2015 Slides based on Text by Silberschatz, Galvin, Gagne 1 1 What is an Operating System? An OS is a program that acts an intermediary between

More information

CS125 : Introduction to Computer Science. Lecture Notes #38 and #39 Quicksort. c 2005, 2003, 2002, 2000 Jason Zych

CS125 : Introduction to Computer Science. Lecture Notes #38 and #39 Quicksort. c 2005, 2003, 2002, 2000 Jason Zych CS125 : Introduction to Computer Science Lecture Notes #38 and #39 Quicksort c 2005, 2003, 2002, 2000 Jason Zych 1 Lectures 38 and 39 : Quicksort Quicksort is the best sorting algorithm known which is

More information

CS 471 Operating Systems. Yue Cheng. George Mason University Fall 2017

CS 471 Operating Systems. Yue Cheng. George Mason University Fall 2017 CS 471 Operating Systems Yue Cheng George Mason University Fall 2017 Outline o Process concept o Process creation o Process states and scheduling o Preemption and context switch o Inter-process communication

More information

The Art and Science of Memory Allocation

The Art and Science of Memory Allocation Logical Diagram The Art and Science of Memory Allocation Don Porter CSE 506 Binary Formats RCU Memory Management Memory Allocators CPU Scheduler User System Calls Kernel Today s Lecture File System Networking

More information

Lecture 4: Threads; weaving control flow

Lecture 4: Threads; weaving control flow Lecture 4: Threads; weaving control flow CSE 120: Principles of Operating Systems Alex C. Snoeren HW 1 Due NOW Announcements Homework #1 due now Project 0 due tonight Project groups Please send project

More information

CMSC 330: Organization of Programming Languages

CMSC 330: Organization of Programming Languages CMSC 330: Organization of Programming Languages Multithreading Multiprocessors Description Multiple processing units (multiprocessor) From single microprocessor to large compute clusters Can perform multiple

More information

CPS221 Lecture: Threads

CPS221 Lecture: Threads Objectives CPS221 Lecture: Threads 1. To introduce threads in the context of processes 2. To introduce UML Activity Diagrams last revised 9/5/12 Materials: 1. Diagram showing state of memory for a process

More information

CSE 410 Final Exam 6/09/09. Suppose we have a memory and a direct-mapped cache with the following characteristics.

CSE 410 Final Exam 6/09/09. Suppose we have a memory and a direct-mapped cache with the following characteristics. Question 1. (10 points) (Caches) Suppose we have a memory and a direct-mapped cache with the following characteristics. Memory is byte addressable Memory addresses are 16 bits (i.e., the total memory size

More information

CS510 Operating System Foundations. Jonathan Walpole

CS510 Operating System Foundations. Jonathan Walpole CS510 Operating System Foundations Jonathan Walpole The Process Concept 2 The Process Concept Process a program in execution Program - description of how to perform an activity instructions and static

More information

Multiprocessor System. Multiprocessor Systems. Bus Based UMA. Types of Multiprocessors (MPs) Cache Consistency. Bus Based UMA. Chapter 8, 8.

Multiprocessor System. Multiprocessor Systems. Bus Based UMA. Types of Multiprocessors (MPs) Cache Consistency. Bus Based UMA. Chapter 8, 8. Multiprocessor System Multiprocessor Systems Chapter 8, 8.1 We will look at shared-memory multiprocessors More than one processor sharing the same memory A single CPU can only go so fast Use more than

More information

Operating Systems (234123) Spring (Homework 3 Wet) Homework 3 Wet

Operating Systems (234123) Spring (Homework 3 Wet) Homework 3 Wet Due date: Monday, 4/06/2012 12:30 noon Teaching assistants in charge: Operating Systems (234123) Spring-2012 Homework 3 Wet Anastasia Braginsky All emails regarding this assignment should be sent only

More information

CSE 120 Principles of Operating Systems

CSE 120 Principles of Operating Systems CSE 120 Principles of Operating Systems Spring 2018 Lecture 15: Multicore Geoffrey M. Voelker Multicore Operating Systems We have generally discussed operating systems concepts independent of the number

More information

CPS 110 Midterm. Spring 2011

CPS 110 Midterm. Spring 2011 CPS 110 Midterm Spring 2011 Ola! Greetings from Puerto Rico, where the air is warm and salty and the mojitos are cold and sweet. Please answer all questions for a total of 200 points. Keep it clear and

More information

Distributed File Systems Issues. NFS (Network File System) AFS: Namespace. The Andrew File System (AFS) Operating Systems 11/19/2012 CSC 256/456 1

Distributed File Systems Issues. NFS (Network File System) AFS: Namespace. The Andrew File System (AFS) Operating Systems 11/19/2012 CSC 256/456 1 Distributed File Systems Issues NFS (Network File System) Naming and transparency (location transparency versus location independence) Host:local-name Attach remote directories (mount) Single global name

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

MARUTHI SCHOOL OF BANKING (MSB)

MARUTHI SCHOOL OF BANKING (MSB) MARUTHI SCHOOL OF BANKING (MSB) SO IT - OPERATING SYSTEM(2017) 1. is mainly responsible for allocating the resources as per process requirement? 1.RAM 2.Compiler 3.Operating Systems 4.Software 2.Which

More information

Virtual Machine Design

Virtual Machine Design Virtual Machine Design Lecture 4: Multithreading and Synchronization Antero Taivalsaari September 2003 Session #2026: J2MEPlatform, Connected Limited Device Configuration (CLDC) Lecture Goals Give an overview

More information

Memory Management: Virtual Memory and Paging CS 111. Operating Systems Peter Reiher

Memory Management: Virtual Memory and Paging CS 111. Operating Systems Peter Reiher Memory Management: Virtual Memory and Paging Operating Systems Peter Reiher Page 1 Outline Paging Swapping and demand paging Virtual memory Page 2 Paging What is paging? What problem does it solve? How

More information

Multiprocessor Systems. COMP s1

Multiprocessor Systems. COMP s1 Multiprocessor Systems 1 Multiprocessor System We will look at shared-memory multiprocessors More than one processor sharing the same memory A single CPU can only go so fast Use more than one CPU to improve

More information

Block Device Scheduling. Don Porter CSE 506

Block Device Scheduling. Don Porter CSE 506 Block Device Scheduling Don Porter CSE 506 Logical Diagram Binary Formats Memory Allocators System Calls Threads User Kernel RCU File System Networking Sync Memory Management Device Drivers CPU Scheduler

More information

Block Device Scheduling

Block Device Scheduling Logical Diagram Block Device Scheduling Don Porter CSE 506 Binary Formats RCU Memory Management File System Memory Allocators System Calls Device Drivers Interrupts Net Networking Threads Sync User Kernel

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

Word: Print Address Labels Using Mail Merge

Word: Print Address Labels Using Mail Merge Word: Print Address Labels Using Mail Merge No Typing! The Quick and Easy Way to Print Sheets of Address Labels Here at PC Knowledge for Seniors we re often asked how to print sticky address labels in

More information

Memory Management. q Basic memory management q Swapping q Kernel memory allocation q Next Time: Virtual memory

Memory Management. q Basic memory management q Swapping q Kernel memory allocation q Next Time: Virtual memory Memory Management q Basic memory management q Swapping q Kernel memory allocation q Next Time: Virtual memory Memory management Ideal memory for a programmer large, fast, nonvolatile and cheap not an option

More information

Memory management. Last modified: Adaptation of Silberschatz, Galvin, Gagne slides for the textbook Applied Operating Systems Concepts

Memory management. Last modified: Adaptation of Silberschatz, Galvin, Gagne slides for the textbook Applied Operating Systems Concepts Memory management Last modified: 26.04.2016 1 Contents Background Logical and physical address spaces; address binding Overlaying, swapping Contiguous Memory Allocation Segmentation Paging Structure of

More information

Networks and Operating Systems ( ) Chapter 3: Scheduling

Networks and Operating Systems ( ) Chapter 3: Scheduling ADRIAN PERRIG & TORSTEN HOEFLER Networks and Operating Systems (252-0062-00) Chapter 3: Scheduling Source: slashdot, Feb. 2014 Many-to-one threads Early thread libraries Green threads (original Java VM)

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

Operating Systems. Objective. Background

Operating Systems. Objective. Background Operating Systems Project #5: Processes and Multiprogramming Project #5: Processes and Multiprogramming Objective Background Memory Management Time-Sharing Process Management Getting Started Drew University:

More information

CS 450 Exam 2 Mon. 11/7/2016

CS 450 Exam 2 Mon. 11/7/2016 CS 450 Exam 2 Mon. 11/7/2016 Name: Rules and Hints You may use one handwritten 8.5 11 cheat sheet (front and back). This is the only additional resource you may consult during this exam. No calculators.

More information

ECE 598 Advanced Operating Systems Lecture 22

ECE 598 Advanced Operating Systems Lecture 22 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

More information

ECEN 449 Microprocessor System Design. Hardware-Software Communication. Texas A&M University

ECEN 449 Microprocessor System Design. Hardware-Software Communication. Texas A&M University ECEN 449 Microprocessor System Design Hardware-Software Communication 1 Objectives of this Lecture Unit Learn basics of Hardware-Software communication Memory Mapped I/O Polling/Interrupts 2 Motivation

More information

Processes and Threads

Processes and Threads COS 318: Operating Systems Processes and Threads Kai Li and Andy Bavier Computer Science Department Princeton University http://www.cs.princeton.edu/courses/archive/fall13/cos318 Today s Topics u Concurrency

More information

Customizing DAZ Studio

Customizing DAZ Studio Customizing DAZ Studio This tutorial covers from the beginning customization options such as setting tabs to the more advanced options such as setting hot keys and altering the menu layout. Introduction:

More information

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

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 Interactive Scheduling Algorithms Continued o Priority Scheduling Introduction Round-robin assumes all processes are equal often not the case Assign a priority to each process, and always choose the process

More information