CSC 343 Operating Systems, Fall 2015
|
|
- Jonah Francis
- 6 years ago
- Views:
Transcription
1 CSC 343 Operating Systems, Fall 2015 Dr. Dale E. Parson, Assignment 4, analyzing swapping algorithm variations. This assignment is due via gmake turnitin from the swapping2015 directory by 11:59 PM on Friday December 4. There is no spreadsheet or PLOTS.txt file to turn in this time. I will not accept solutions after the end of December 5. The coding is this assignment consists of building variations of a swapping algorithm from memorylimited handout code in program rr_ff_noswap.stm that causes some of the 24 single-threaded processes to block until they can obtain memory, but that do not engage in swapping. You will add swapping. The usual 10% per day late penalties apply, and I will not accept solutions after the end of December 5. cd $HOME # or start out in your login directory cd. /OpSys cp ~parson/opsys/swapping2015.problem.zip swapping2015.problem.zip unzip swapping2015.problem.zip cd./swapping Running gmake testrr testrr_ff_noswap on harry should work fine with the handout code. Handout program rr_ff_noswap.stm is a modified version of handout round-robin CPU scheduler rr.stm that runs 24 single-threaded processes for which there is insufficient physical memory to house all 24 in memory concurrently. Here are the pertinent data structures from the processor state machine. init -> makingprocesses init()[]/@ # CPU scheduling queue: processor.readyq = Queue(ispriority=False); # Two gig of available memory, initially all free, starts at phyaddr 0. processor.physicalmemory = ; # Each entry is this table is a (LIMIT, BASE) pair, with values giving # (SIZE, START_ADDRESS) of a region in physical memory. As memory gets # allocated and freed by processes, this initial region gets chopped # up into multiple smaller regions and the merged where possible # when freeing. See macros and lambda functions in the thread state # machine for the code the manages the processor.freeregions and # pcb.relocationregister. processor.freeregions = [(processor.physicalmemory, 0)]; # The waitmemq is the Queue where process threads wait until they get memory. processor.waitmemq = Queue(ispriority=False); The graph for the thread state machine from appears on the next page. It is the same as for Round Robin that we have gone over before with one important exception. Note the new checkifmemory and waitformemory states. When a process cannot run 1 due to insufficient memory to satisfy its memory requirement, the process enters waitformemory until another process completes execution and enters the terminated 1 Since these processes are single- threaded, this handout uses the terms process and thread somewhat interchangeably. All threads within a process share its memory space, so all threads would block waiting for memory in which to run in a multithreaded process. page 1
2 state. On the transition into terminated the latter process returns its memory to the physical memory pool and then sends a memoryready event by calling signalevent for the thread at the front of the processor.waitmemq seen above. The working of this program is very much like the use of the processor.readyq for holding threads that are waiting for a context on which to run. In this case processor.waitmemq holds threads 0 that are waiting for their respective process to obtain memory. When a terminating thread signals a thread waiting in processor.waitmemq (i.e., in the waitformemory state) about the availability of memory, the signaled thread goes back to state checkifmemory to test whether it can obtain its memory. A terminating thread may release less memory than is required by the signaled thread, or the memory may be too fragmented for use. If so, the signaled thread returns to the processor.waitmemq in the waitformemory state. Otherwise, it proceeds to the scheduling state for normal Round Robin execution. This is the first assignment running on the new version 11 of the STM compiler and simulator. This compiler/simulator version requires initialization of all STM local variables in the variable declaration section or in the transition(s) from the init state, and it requires initialization of all fields in the thread, pcb and processor objects in transition(s) from the appropriate init state (processor init for processor object fields, thread 0 init for pcb object fields, and thread init for thread object fields). I added this run time check because Python does not check for assignment into misspelled variables. This check costs about 3% in simulation time increase. The thread STM in this assignment uses several new variables including swapdevice, findcost, putcost, and several Python functions and STM macros for memory management that we will go over in class. Handout STM rr_ff_noswap.stm uses round robin CPU scheduling and first fit physical memory allocation. page 2
3 Here is the initialization transition code for the single thread of each process with the new parts in bold. init -> checkifmemory pid, tid = getid(); iobound = True if ((pid % 2) == 1) else False ; # ^^^ The odd pids are IO bound. The others (50%) are CPU bound. swapdevice = len(processor.fastio)-1 ; # The range of process sizes drives contention for memory. # Each process averages (1/16 + 1/2) / 2 = of physical memory, # so we'd expect 3 to 4 processes to fit into memory at one time, # and never fewer than 2 will fit at one time. See processestogo # in the processor STM above. pcb.logicalmemorysize = sample(int(processor.physicalmemory/16), int(processor.physicalmemory/2), 'uniform'); # pcb.relocationregister will get a piece of processor.freeregions. pcb.relocationregister = None ; cpuburst = sample(1, 250, 'exponential', 25) if iobound else sample(100, 1100, 'revexponential', 1000); tickstorun = min(cpuburst, quantum); tickstodefer = cpuburst - tickstorun; # Set variables freeslot and findcost: getfirstfit ; cpu(findcost)@ An inspection of rr_ff_noswap.log after a successful gmake testrr_ff_noswap 2 shows the following. An assignment 3 handout shows how to keep the log file from being removed. $ grep DEBUG rr_ff_noswap.log cut -d' ' -f2-3 less ( , 0) [( L, )] None [( L, )] ( , ) [( L, )] None [( L, )] ( , ) [( L, )] None [( L, )] ( , ) [( L, )] None [( L, )] ( , ) [( L, )] None [( L, )] None [( L, )] ( , ) [( L, )] None [( , ), ( L, )] None [( , ), ( L, )] ( , ) [( , ), ( L, )] 2 You must comment out this line that follows your test of interest in the makefile in order to keep the log file: /bin/rm - f /tmp/$(student)_stm_*.log $(STUDENT)_STM_*.log rr_ff_noswap*.log. Comment it out by preceding it with a # character. Note this is the line for gmake testrr_ff_noswap. If you do so, make sure to run gmake clean at the end of a work session in which you want to clean up the log file. page 3
4 ( , ) [( , ), ( L, )] ( , 0) [( L, )] ( , 0) [( L, )] ( , 0) [( L, )] ( , 0) [( L, )] In each of those lines, the value to the left of the first shows the pcb.relocationregister values for the process that is obtaining or freeing memory, showing the value None when the pcb.relocationregister is not set to point to physical memory. A valid entry has two values, the size of a memory region (the limit), and the start of that region (the base). The list of such pairs to the right of the is the full set of disjoint free memory regions in processor.freeregions as introduced on page 1. ROUND ROBIN, BEST FIT, WITH NO SWAPPING (Edit file rr_bf_noswap.stm) 25% of project 2. Next, cp rr_ff_noswap.stm rr_bf_noswap.stm and modify rr_bf_noswap.stm as follows. The only changes in this section are to change the file name, add the student name, and change the first fit comment to best fit at the top of the file, then replace every call to the getfirstfit macro with a call to getbestfit, and replace every call to the putfirstfit macro with a call to putbestfit. Do not change the definitions of these macros; change only their calls. We will go over them in class. After making the above changes, gmake testrr_bf_noswap should work without errors. I have found that the metrics for the first fit and best fit variations of this assignment are identical in most test runs. There are a few algorithm variations that show minor differences, but for this simulation s conditions, there is not much measurable difference between the two. BEST FIT WITH CPU BURST-DRIVEN SWAPPING (Edit file rr_bf_swaponcpu.stm) 25% page 4
5 All of the remaining variations of this assignment generate the above graph. Here are the salient points. For this stage, cp rr_bf_noswap.stm rr_bf_swaponcpu.stm and edit the following changes into the latter file. In rr_bf_swaponcpu.stm the thread STM adds some local variables: swapdevice = -2, iodevice = -2, findcost = -1, putcost = -1, cpuburstsum = 0, lifetimestart = 0, cpuburstswap = 500, lifetimeswap = 10000, swappedout Update local variable cpuburstsum (e.g., accumulating via +=) the value in cpuburst every time the latter variable updates by calling sample(). Variable cpuburstsum sums the burst times. This variable comes into play when the STM is leaving the waiting state. Notice that there are two transitions out of waiting, one going to scheduling as before, and the other going to checkifmemory. The original transition to scheduling now has a guard that allows crossing only when the len(processor.waitmemq) == 0, meaning that no process is stalled waiting for memory, or when cpuburstsum < cpuburstswap, meaning that this thread is not ready to give up its memory just yet. The only new action in this transition is the update to cpuburstsum after computing cpuburst via sample(). The transition from waiting to checkifmemory executes if the opposite condition is true, i.e., there are threads in processor.waitmemq and cpuburstsum >= cpuburstswap. Here is this transition; rather than accumulate into cpuburstsum, this transition re-initializes it because it also releases the process memory by calling putbestfit. waiting -> checkifmemory io()[@len(processor.waitmemq) > 0 and cpuburstsum >= cpuburstswap@]/@ cpuburst = sample(1, 250, 'exponential', 25) if iobound else sample(100, 1100, 'revexponential', 1000); cpuburstsum = cpuburst ; tickstorun = min(cpuburst, quantum); tickstodefer = cpuburst - tickstorun; # Release held memory and signal the next waiting thread if any. putbestfit ; signalevent(processor.waitmemq.deq(), 'memoryready'); swappedout = True ; io(swapdevice)@ The call to putbestfit releases this process memory, setting pcb.relocationregister to None. This process signals the first waiting process thread, sets the swappedout flag to True, and performs swapping-out I/O. Setting swappedout flag to True configures this process to take an additional swap-in I/O delay after it re-obtains memory. The two new transitions out of checkifmemory on the completion of the swap-out io() event are identical to their cpu()-event counterparts. However, both the cpu() and io() transitions with guards on pcb.relocationregister!= None must set swappedout = False, because a process with a valid pcb.relocationregister is not swapped out. The above transition from waiting nulls pcb.relocationregister as part of releasing memory, so it will retain swappedout as True. page 5
6 The transition out of waitformemory now looks like this: waitformemory -> checkifmemory # Set variables freeslot and findcost: getbestfit ; io(swapdevice) if (swappedout and pcb.relocationregister) else cpu(findcost)@ If it is swapping in, it starts a time-consuming io(swapdevice) (swap-back-in). If it is just attaching to physical memory for the first time, it takes the less expensive cpu(findcost) charge. The destination checkifmemory state will set swappedout back to False if and only if the pcb.relocationregister has been mapped to memory. It is possible that the above call to getbestfit will fail due to lack of requested memory, leaving pcb.relocationregister with a value of None. The checkifmemory state correctly handles that condition. 3. Running gmake testrr_bf_swaponcpu should pass after you make the above changes. EDIT file rr_bf_swaponstime.stm 25% of assignment grade 4. Run cp rr_bf_swaponcpu.stm rr_bf_swaponstime.stm, make the following changes to the latter file (including comments at the top), and gmake testrr_bf_swaponstime when you are ready to test. There are very few changes in this stage. They are based on the idea that a process relinquishes its memory to processes-in-need-of-memory when it exceeds some threshold of simulated wall clock time or real time given by the simulator s time() function, rather than by a threshold on cpu burst time. First, initialize lifetimestart = time(); when coming out of the thread init state. Next, on the two transitions coming out of the waiting state, replace the tests comparing cpuburstsum to cpuburstswap with tests comparing (time() - lifetimestart) to lifetimeswap. This is a test on elapsed time. See lifetimeswap = on page 4 above. The transition from waiting -> checkifmemory must reinitialize lifetimestart = time();. EDIT file rr_bf_swaponsize.stm 25% of assignment grade 5. Run cp rr_bf_swaponstime.stm rr_bf_swaponsize.stm, make the following changes to the latter file (including comments at the top), and gmake testrr_bf_swaponsize when you are ready to test. There are very few changes in this stage. They are based on the idea that a process relinquishes its memory to processes-in-need-of-memory based on the memory size of the relinquishing process. Bigger processes relinquish more frequently. This program initializes a variable memoryaccum to 0. On the two transitions coming out of the waiting state, replace the tests comparing (time() - lifetimestart) to lifetimeswap with tests comparing (pcb.logicalmemorysize + memoryaccum) to processor.physicalmemory. In the waiting -> scheduling transition update memoryaccum += pcb.logicalmemorysize ;, and in the waiting -> checkifmemory transition reinitialize memoryaccum = 0 ;. The point of this version of the program is to relinquish memory to a waiting process when a process has used an aggregate of processor.physicalmemory or more bytes in multiple trips around the main state machine loop. page 6
7 When everything is ready, gmake turnitin by the due date. Note that the late acceptance period is only one day, so I can post my solution in a timely manner. On the next page are several graphs of interest. We will discuss these in class. There is no graph for students to extract this time. page 7
CSC 343 Operating Systems, Dr. Dale Parson, Fall 2014: EXAMPLE CPU SCHEDULING ALGORITHMS
CSC 33 Operating Systems, Dr. Dale Parson, Fall 201: EXAMPLE CPU SCHEDULING ALGORITHMS ~parson/opsys/state2codev/fcfs.stm See http://bill.kutztown.edu/~parson/fcfs.jpg 1 # CSC 33, Fall 2013, STUDENT NAME:
More informationCSC 343 Operating Systems, Fall 2015
CSC 343 Operating Systems, Fall 2015 Dr. Dale E. Parson, Notes on FIFO, LRU, and LRU-DIRTY-BIT page replacement. ~parson/opsys/stm3page ~parson/opsys/stm3page.solution.zip http://acad.kutztown.edu/~parson/rr_fifopage.jpg
More informationCSC 343 Operating Systems, Fall 2015
CSC 343 Operating Systems, Fall 2015 Dr. Dale E. Parson, Assignment 2, modeling an atomic spin lock, a mutex, and a condition variable. This assignment is due via gmake turnitin from the criticalsection2015
More informationCSC 343 Operating Systems, Fall 2013, Assignment 3, due Monday November 25
CSC 343 Operating Systems, Fall 2013, Assignment 3, due Monday November 25 This assignment is due by midnight on Monday November 25 via gmake turnitin as explained below. To get the starting code for the
More informationCSC 543 Multiprocessing & Concurrent Programming, Fall 2016
CSC 543 Multiprocessing & Concurrent Programming, Fall 2016 Dr. Dale E. Parson, Midterm Exam Project, Assorted Thread Synchronization Problems This assignment is due by 11:59 PM on Wednesday November 2
More informationCSC 310 Programming Languages, Spring 2014, Dr. Dale E. Parson
CSC 310 Programming Languages, Spring 2014, Dr. Dale E. Parson Assignment 3, Perquacky in Python, due 11:59 PM, Saturday April 12, 2014 I will turn the solution back on Monday April 14, after which I will
More informationCSC 343 Operating Systems, Fall 2015, Intro to our UML State Machines
CSC 343 Operating Systems, Fall 2015, Intro to our UML State Machines Dr. Dale E. Parson, http://faculty.kutztown.edu/parson To compile and run this course s state machines, you will have to log onto machine
More informationCSC 552 UNIX System Programming, Fall 2015
CSC 552 UNIX System Programming, Fall 2015 Dr. Dale E. Parson, Assignment 4, multi-threading a socket-based server loop & helper functions. This assignment is due via make turnitin from the wordcathreadc4/
More informationCSC 510 Advanced Operating Systems, Fall 2017
CSC 510 Advanced Operating Systems, Fall 2017 Dr. Dale E. Parson, Assignment 4, Benchmarking and analyzing a modified Assignment 1 running on System VMs on Type 1 and Type 2 hypervisors. This assignment
More informationOperating Systems Comprehensive Exam. Spring Student ID # 3/16/2006
Operating Systems Comprehensive Exam Spring 2006 Student ID # 3/16/2006 You must complete all of part I (60%) You must complete two of the three sections in part II (20% each) In Part I, circle or select
More informationUnit 3 : Process Management
Unit : Process Management Processes are the most widely used units of computation in programming and systems, although object and threads are becoming more prominent in contemporary systems. Process management
More informationAssignment 2, perquack2 class hierarchy in Java, due 11:59 PM, Sunday March 16, 2014 Login into your account on acad/bill and do the following steps:
CSC 243 Java Programming, Spring 2014, Dr. Dale E. Parson Assignment 2, perquack2 class hierarchy in Java, due 11:59 PM, Sunday March 16, 2014 Login into your account on acad/bill and do the following
More informationCSC UNIX System, Spring 2015
` CSC 352 - UNIX System, Spring 2015 Assignment 2, due by 11:59 on Friday March 6 via gmake turnitin. Dr. Dale E. Parson, http://faculty.kutztown.edu/parson The directory, source-file and makefile contents
More informationOperating Systems Comprehensive Exam. Spring Student ID # 3/20/2013
Operating Systems Comprehensive Exam Spring 2013 Student ID # 3/20/2013 You must complete all of Section I You must complete two of the problems in Section II If you need more space to answer a question,
More informationHere are the steps to get the files for this project after logging in on acad/bill.
CSC 243, Java Programming, Spring 2013, Dr. Dale Parson Assignment 5, handling events in a working GUI ASSIGNMENT due by 11:59 PM on Thursday May 9 via gmake turnitin Here are the steps to get the files
More informationCSE 351, Spring 2010 Lab 7: Writing a Dynamic Storage Allocator Due: Thursday May 27, 11:59PM
CSE 351, Spring 2010 Lab 7: Writing a Dynamic Storage Allocator Due: Thursday May 27, 11:59PM 1 Instructions In this lab you will be writing a dynamic storage allocator for C programs, i.e., your own version
More informationMemory Management. Memory Management
Memory Management Most demanding di aspect of an operating system Cost has dropped. Consequently size of main memory has expanded enormously. Can we say that we have enough still. Swapping in/out. Memory
More informationParallel and Distributed Computing Programming Assignment 1
Parallel and Distributed Computing Programming Assignment 1 Due Friday, February 7 (Note Change in Due Date) For programming assignment 1, you should write two C programs. One should provide an estimate
More informationPerform the following steps to set up for this project. Start out in your login directory on csit (a.k.a. acad).
CSC 458 Data Mining and Predictive Analytics I, Fall 2017 (November 22, 2017) Dr. Dale E. Parson, Assignment 4, Comparing Weka Bayesian, clustering, ZeroR, OneR, and J48 models to predict nominal dissolved
More informationAnnouncements. Reading. Project #1 due in 1 week at 5:00 pm Scheduling Chapter 6 (6 th ed) or Chapter 5 (8 th ed) CMSC 412 S14 (lect 5)
Announcements Reading Project #1 due in 1 week at 5:00 pm Scheduling Chapter 6 (6 th ed) or Chapter 5 (8 th ed) 1 Relationship between Kernel mod and User Mode User Process Kernel System Calls User Process
More informationAC59/AT59/AC110/AT110 OPERATING SYSTEMS & SYSTEMS SOFTWARE DEC 2015
Q.2 a. Explain the following systems: (9) i. Batch processing systems ii. Time sharing systems iii. Real-time operating systems b. Draw the process state diagram. (3) c. What resources are used when a
More informationAnnouncements. 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.
Program #1 Announcements Is due at 9:00 AM on Thursday Program #0 Re-grade requests are due by Monday at 11:59:59 PM Reading Chapter 6 1 CPU Scheduling Manage CPU to achieve several objectives: maximize
More informationProcesses. 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 informationCS 322 Operating Systems Practice Midterm Questions
! CS 322 Operating Systems 1. Processes go through the following states in their lifetime. time slice ends Consider the following events and answer the questions that follow. Assume there are 5 processes,
More informationDUE By 11:59 PM on Thursday March 15 via make turnitin on acad. The standard 10% per day deduction for late assignments applies.
CSC 558 Data Mining and Predictive Analytics II, Spring 2018 Dr. Dale E. Parson, Assignment 2, Classification of audio data samples from assignment 1 for predicting numeric white-noise amplification level
More informationALL the assignments (A1, A2, A3) and Projects (P0, P1, P2) we have done so far.
Midterm Exam Reviews ALL the assignments (A1, A2, A3) and Projects (P0, P1, P2) we have done so far. Particular attentions on the following: System call, system kernel Thread/process, thread vs process
More informationProgramming Assignment HW5: CPU Scheduling draft v04/02/18 4 PM Deadline April 7th, 2018, 5 PM. Late deadline with penalty April 9th, 2018, 5 PM
Programming Assignment HW5: CPU Scheduling draft v04/02/18 4 PM Deadline April 7th, 2018, 5 PM. Late deadline with penalty April 9th, 2018, 5 PM Purpose: The objective of this assignment is to become familiar
More informationECE454, Fall 2014 Homework3: Dynamic Memory Allocation Assigned: Oct 9th, Due: Nov 6th, 11:59PM
ECE454, Fall 2014 Homework3: Dynamic Memory Allocation Assigned: Oct 9th, Due: Nov 6th, 11:59PM The TA for this assignment is Xu Zhao (nuk.zhao@mail.utoronto.ca). 1 Introduction OptsRus is doing really
More informationCOMP SCI 3SH3: Operating System Concepts (Term 2 Winter 2006) Test 2 February 27, 2006; Time: 50 Minutes ;. Questions Instructor: Dr.
COMP SCI 3SH3: Operating System Concepts (Term 2 Winter 2006) Test 2 February 27, 2006; Time: 50 Minutes ;. Questions Instructor: Dr. Kamran Sartipi Name: Student ID: Question 1 (Disk Block Allocation):
More informationFCM 710: Architecture of Secure Operating Systems
FCM 710: Architecture of Secure Operating Systems Practice Exam, Spring 2010 Email your answer to ssengupta@jjay.cuny.edu March 16, 2010 Instructor: Shamik Sengupta Multiple-Choice 1. operating systems
More informationMidterm Exam Solutions Amy Murphy 28 February 2001
University of Rochester Midterm Exam Solutions Amy Murphy 8 February 00 Computer Systems (CSC/56) Read before beginning: Please write clearly. Illegible answers cannot be graded. Be sure to identify all
More informationUniprocessor Scheduling
Uniprocessor Scheduling Chapter 9 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice, FL 2008, Prentice Hall CPU- and I/O-bound processes
More informationProject 2: CPU Scheduling Simulator
Project 2: CPU Scheduling Simulator CSCI 442, Spring 2017 Assigned Date: March 2, 2017 Intermediate Deliverable 1 Due: March 10, 2017 @ 11:59pm Intermediate Deliverable 2 Due: March 24, 2017 @ 11:59pm
More informationChapter 3: Processes
Chapter 3: Processes Silberschatz, Galvin and Gagne 2013 Chapter 3: Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication 3.2 Silberschatz, Galvin and Gagne 2013
More informationDr. Rafiq Zakaria Campus. Maulana Azad College of Arts, Science & Commerce, Aurangabad. Department of Computer Science. Academic Year
Dr. Rafiq Zakaria Campus Maulana Azad College of Arts, Science & Commerce, Aurangabad Department of Computer Science Academic Year 2015-16 MCQs on Operating System Sem.-II 1.What is operating system? a)
More information143a, Spring 2018 Discussion Week 4 Programming Assignment. Jia Chen 27 Apr 2018
143a, Spring 2018 Discussion Week 4 Programming Assignment Jia Chen 27 Apr 2018 Annoucements HW2 posted due Friday, May 4, 2018, 11:55 PM Programming Assignment posted due Friday, Jun 1, 2018, 11:55 PM
More informationEECE.4810/EECE.5730: Operating Systems Spring 2017
EECE.4810/EECE.5730: Operating Systems Spring 2017 Midterm Exam Solution 1. (19 + 6 points) UProcess management Parts (a) and (b) of this problem refer to the following program: int main() { pid_t pid1,
More informationOperating Systems Comprehensive Exam. Fall Student ID # 10/31/2013
Operating Systems Comprehensive Exam Fall 2013 Student ID # 10/31/2013 You must complete all of Section I You must complete two of the problems in Section II If you need more space to answer a question,
More informationCSc33200: Operating Systems, CS-CCNY, Fall 2003 Jinzhong Niu December 10, Review
CSc33200: Operating Systems, CS-CCNY, Fall 2003 Jinzhong Niu December 10, 2003 Review 1 Overview 1.1 The definition, objectives and evolution of operating system An operating system exploits and manages
More informationProgramming Assignment HW4: CPU Scheduling v03/17/19 6 PM Deadline March 28th, 2019, 8 PM. Late deadline with penalty March 29th, 2019, 8 PM
CS 370: OPERATING SYSTEMS SPRING 2019 Department of Computer Science URL: http://www.cs.colostate.edu/~cs370 Colorado State University INSTRUCTOR: Yashwant Malaiya Programming Assignment HW4: CPU Scheduling
More informationEmbedded Resource Manager (ERM)
Embedded Resource Manager (ERM) The Embedded Resource Manager (ERM) feature allows you to monitor internal system resource utilization for specific resources such as the buffer, memory, and CPU ERM monitors
More informationDepartment of Computer applications. [Part I: Medium Answer Type Questions]
Department of Computer applications BBDNITM, Lucknow MCA 311: OPERATING SYSTEM [Part I: Medium Answer Type Questions] UNIT 1 Q1. What do you mean by an Operating System? What are the main functions of
More informationWhat s An OS? Cyclic Executive. Interrupts. Advantages Simple implementation Low overhead Very predictable
What s An OS? Provides environment for executing programs Process abstraction for multitasking/concurrency scheduling Hardware abstraction layer (device drivers) File systems Communication Do we need an
More informationProcess a program in execution; process execution must progress in sequential fashion. Operating Systems
Process Concept An operating system executes a variety of programs: Batch system jobs Time-shared systems user programs or tasks 1 Textbook uses the terms job and process almost interchangeably Process
More informationMidterm Exam. October 20th, Thursday NSC
CSE 421/521 - Operating Systems Fall 2011 Lecture - XIV Midterm Review Tevfik Koşar University at Buffalo October 18 th, 2011 1 Midterm Exam October 20th, Thursday 9:30am-10:50am @215 NSC Chapters included
More informationOperating Systems Overview
Operating Systems Overview 1 operating system no clear traditional definition each definition cover a distinct aspect an interface between applications and hardware true, this was the first reason for
More informationMay 19, Answer pieces in italics were not required to receive full points.
(2 pts) Name: (2 pts) User Id: CMPSCI 377: Operating Systems Final Exam May 19, 2003 Answer pieces in italics were not required to receive full points. Problem Topic Max Grade 0-4 1 Memory 30 2 Disk Support
More informationRoadmap. Tevfik Ko!ar. CSC Operating Systems Spring Lecture - III Processes. Louisiana State University. Virtual Machines Processes
CSC 4103 - Operating Systems Spring 2008 Lecture - III Processes Tevfik Ko!ar Louisiana State University January 22 nd, 2008 1 Roadmap Virtual Machines Processes Basic Concepts Context Switching Process
More informationProcess- Concept &Process Scheduling OPERATING SYSTEMS
OPERATING SYSTEMS Prescribed Text Book Operating System Principles, Seventh Edition By Abraham Silberschatz, Peter Baer Galvin and Greg Gagne PROCESS MANAGEMENT Current day computer systems allow multiple
More informationCSC 220 Object Oriented Multimedia Programming, Fall 2018
CSC 220 Object Oriented Multimedia Programming, Fall 2018 Dr. Dale E. Parson, Assignment 3, text menu on a remote-control Android, mostly array handling. This assignment is due via D2L Assignment Assignment
More informationCSC Operating Systems Spring Lecture - XII Midterm Review. Tevfik Ko!ar. Louisiana State University. March 4 th, 2008.
CSC 4103 - Operating Systems Spring 2008 Lecture - XII Midterm Review Tevfik Ko!ar Louisiana State University March 4 th, 2008 1 I/O Structure After I/O starts, control returns to user program only upon
More informationCS 231 Data Structures and Algorithms, Fall 2016
CS 231 Data Structures and Algorithms, Fall 2016 Dr. Bruce A. Maxwell Department of Computer Science Colby College Course Description Focuses on the common structures used to store data and the standard
More informationChapter 5: CPU Scheduling
Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Operating Systems Examples Algorithm Evaluation Chapter 5: CPU Scheduling
More information1. Overview This project will help you understand address spaces and virtual memory management.
Project 2--Memory Worth: 12 points Assigned: Due: 1. Overview This project will help you understand address spaces and virtual memory management. In this project, you will implement an external pager,
More informationMULTIPROCESSORS AND THREAD LEVEL PARALLELISM
UNIT III MULTIPROCESSORS AND THREAD LEVEL PARALLELISM 1. Symmetric Shared Memory Architectures: The Symmetric Shared Memory Architecture consists of several processors with a single physical memory shared
More informationHigh-Level Design Specification for the Callimuse System
High-Level Design Specification for the Callimuse System CSC354 Introduction to Software Engineering, Dr. Dale Parson, Fall 2013. This assignment is due by end of October 24, 2013 1. Introduction by the
More informationSubject Teacher: Prof. Sheela Bankar
Peoples Empowerment Group ISB&M SCHOOL OF TECHNOLOGY, NANDE, PUNE DEPARTMENT OF COMPUTER ENGINEERING Academic Year 2017-18 Subject: SP&OS Class: T.E. computer Subject Teacher: Prof. Sheela Bankar 1. Explain
More informationProgramming Languages
TECHNISCHE UNIVERSITÄT MÜNCHEN FAKULTÄT FÜR INFORMATIK Programming Languages Concurrency: Atomic Executions, Locks and Monitors Dr. Michael Petter Winter term 2016 Atomic Executions, Locks and Monitors
More informationCSSE 340 Operating Systems Project 2: CPU Scheduling Simulator
CSSE 340 Operating Systems Project 2: CPU Scheduling Simulator 1. Project Objectives: This programming project is to simulate a few CPU scheduling policies discussed in the class. You will write a C/C++
More informationCOSC 6374 Parallel Computation. Debugging MPI applications. Edgar Gabriel. Spring 2008
COSC 6374 Parallel Computation Debugging MPI applications Spring 2008 How to use a cluster A cluster usually consists of a front-end node and compute nodes Name of the front-end node: shark.cs.uh.edu You
More informationCS370 Operating Systems
CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2017 Lecture 9 Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 CPU Scheduling: Objectives CPU scheduling,
More informationProgramming Assignment Multi-Threading and Debugging 2
Programming Assignment Multi-Threading and Debugging 2 Due Date: Friday, June 1 @ 11:59 pm PAMT2 Assignment Overview The purpose of this mini-assignment is to continue your introduction to parallel programming
More informationCSC 716 Advanced Operating System Fall 2007 Exam 1. Answer all the questions. The maximum credit for each question is as shown.
CSC 716 Advanced Operating System Fall 2007 Exam 1 Answer all the questions. The maximum credit for each question is as shown. 1. (15) Multiple Choice(3 points for each): 1) Which of the following statement
More informationProgramming Assignment 0
CMSC 17 Computer Networks Fall 017 Programming Assignment 0 Assigned: August 9 Due: September 7, 11:59:59 PM. 1 Description In this assignment, you will write both a TCP client and server. The client has
More informationTDDB68 Processprogrammering och operativsystem / Concurrent programming and operating systems
TENTAMEN / EXAM TDDB68 Processprogrammering och operativsystem / Concurrent programming and operating systems 2017-06-05 Examiner: Mikael Asplund (0700895827) Hjälpmedel / Admitted material: Engelsk ordbok
More informationDatabase Architectures
Database Architectures CPS352: Database Systems Simon Miner Gordon College Last Revised: 11/15/12 Agenda Check-in Centralized and Client-Server Models Parallelism Distributed Databases Homework 6 Check-in
More informationECE SPRING NOTE; This project has two parts which have different due dates.
DATA STRUCTURES ECE 368 - SPRING 208 PROJECT : Event Driven Simulation for a Multiprocessor System Using a Priority Queue (It is a team project. Note: 2 students/team) ASSIGNMENT DATE: January 23, 208
More informationMemory: Overview. CS439: Principles of Computer Systems February 26, 2018
Memory: Overview CS439: Principles of Computer Systems February 26, 2018 Where We Are In the Course Just finished: Processes & Threads CPU Scheduling Synchronization Next: Memory Management Virtual Memory
More informationOperating System - Overview
Unit 37. Operating System Operating System - Overview An Operating System (OS) is an interface between a computer user and computer hardware. An operating system is a software which performs all the basic
More informationCPSC 341 OS & Networks. Processes. Dr. Yingwu Zhu
CPSC 341 OS & Networks Processes Dr. Yingwu Zhu Process Concept Process a program in execution What is not a process? -- program on a disk A process is an active object, but a program is just a file It
More informationSome popular Operating Systems include Linux Operating System, Windows Operating System, VMS, OS/400, AIX, z/os, etc.
Operating System Quick Guide https://www.tutorialspoint.com/operating_system/os_quick_guide.htm Copyright tutorialspoint.com Operating System Overview An Operating System OS is an interface between a computer
More informationProcesses and Threads. Processes: Review
Processes and Threads Processes and their scheduling Threads and scheduling Multiprocessor scheduling Distributed Scheduling/migration Lecture 3, page 1 Processes: Review Multiprogramming versus multiprocessing
More informationSPOS MODEL ANSWER MAY 2018
SPOS MODEL ANSWER MAY 2018 Q 1. a ) Write Algorithm of pass I of two pass assembler. [5] Ans :- begin if starting address is given LOCCTR = starting address; else LOCCTR = 0; while OPCODE!= END do ;; or
More information1 Multiprocessors. 1.1 Kinds of Processes. COMP 242 Class Notes Section 9: Multiprocessor Operating Systems
COMP 242 Class Notes Section 9: Multiprocessor Operating Systems 1 Multiprocessors As we saw earlier, a multiprocessor consists of several processors sharing a common memory. The memory is typically divided
More informationB. V. Patel Institute of Business Management, Computer &Information Technology, UTU
BCA-3 rd Semester 030010304-Fundamentals Of Operating Systems Unit: 1 Introduction Short Answer Questions : 1. State two ways of process communication. 2. State any two uses of operating system according
More informationChapter 3 Processes. Process Concept. Process Concept. Process Concept (Cont.) Process Concept (Cont.) Process Concept (Cont.)
Process Concept Chapter 3 Processes Computers can do several activities at a time Executing user programs, reading from disks writing to a printer, etc. In multiprogramming: CPU switches from program to
More informationAnnouncements. 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)
Announcements Program #1 Due 2/15 at 5:00 pm Reading Finish scheduling Process Synchronization: Chapter 6 (8 th Ed) or Chapter 7 (6 th Ed) 1 Scheduling criteria Per processor, or system oriented CPU utilization
More informationCHAPTER 2: PROCESS MANAGEMENT
1 CHAPTER 2: PROCESS MANAGEMENT Slides by: Ms. Shree Jaswal TOPICS TO BE COVERED Process description: Process, Process States, Process Control Block (PCB), Threads, Thread management. Process Scheduling:
More informationMidterm Exam Amy Murphy 19 March 2003
University of Rochester Midterm Exam Amy Murphy 19 March 2003 Computer Systems (CSC2/456) Read before beginning: Please write clearly. Illegible answers cannot be graded. Be sure to identify all of your
More informationChapter 3: Process Concept
Chapter 3: Process Concept Chapter 3: Process Concept Process Concept Process Scheduling Operations on Processes Inter-Process Communication (IPC) Communication in Client-Server Systems Objectives 3.2
More informationChapter 3: Process Concept
Chapter 3: Process Concept Chapter 3: Process Concept Process Concept Process Scheduling Operations on Processes Inter-Process Communication (IPC) Communication in Client-Server Systems Objectives 3.2
More informationOperating Systems: Quiz2 December 15, Class: No. Name:
Operating Systems: Quiz2 December 15, 2006 Class: No. Name: Part I (30%) Multiple Choice Each of the following questions has only one correct answer. Fill the correct one in the blank in front of each
More informationEECE.4810/EECE.5730: Operating Systems Spring 2018 Programming Project 3 Due 11:59 PM, Wednesday, 4/18/18 Monday, 4/30/18
Spring 2018 Programming Project 3 Due 11:59 PM, Wednesday, 4/18/18 Monday, 4/30/18 1. Introduction This project uses simulation to explore the effectiveness of the different scheduling algorithms described
More informationLab 2: Threads and Processes
CS333: Operating Systems Lab Lab 2: Threads and Processes Goal The goal of this lab is to get you comfortable with writing basic multi-process / multi-threaded applications, and understanding their performance.
More informationCSE 421/521 - Operating Systems Fall Lecture - XXV. Final Review. University at Buffalo
CSE 421/521 - Operating Systems Fall 2014 Lecture - XXV Final Review Tevfik Koşar University at Buffalo December 2nd, 2014 1 Final Exam December 4th, Thursday 11:00am - 12:20pm Room: 110 Knox Chapters
More informationCS193k, Stanford Handout #10. HW2b ThreadBank
CS193k, Stanford Handout #10 Spring, 99-00 Nick Parlante HW2b ThreadBank I handed out 2a last week for people who wanted to get started early. This handout describes part (b) which is harder than part
More informationCSC UNIX System, Spring 2015
CSC 352 - UNIX System, Spring 2015 Study guide for the CSC352 midterm exam (20% of grade). Dr. Dale E. Parson, http://faculty.kutztown.edu/parson We will have a midterm on March 19 on material we have
More informationLecture Topics. Announcements. Today: Threads (Stallings, chapter , 4.6) Next: Concurrency (Stallings, chapter , 5.
Lecture Topics Today: Threads (Stallings, chapter 4.1-4.3, 4.6) Next: Concurrency (Stallings, chapter 5.1-5.4, 5.7) 1 Announcements Make tutorial Self-Study Exercise #4 Project #2 (due 9/20) Project #3
More informationScheduling Mar. 19, 2018
15-410...Everything old is new again... Scheduling Mar. 19, 2018 Dave Eckhardt Brian Railing Roger Dannenberg 1 Outline Chapter 5 (or Chapter 7): Scheduling Scheduling-people/textbook terminology note
More informationThomas Petrolino IBM Poughkeepsie Session 17696
Under The Bar! Nai Jie Li IBM China linaij@cn.ibm.com Thomas Petrolino IBM Poughkeepsie tapetro@us.ibm.com Session 17696 Under The Bar! Copyright IBM 2011, 2015 1 Permission is granted to SHARE Inc. to
More informationCS370 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 informationChapter 3: Process Concept
Chapter 3: Process Concept Silberschatz, Galvin and Gagne 2013! Chapter 3: Process Concept Process Concept" Process Scheduling" Operations on Processes" Inter-Process Communication (IPC)" Communication
More informationCPU Scheduling Algorithms
CPU Scheduling Algorithms Notice: The slides for this lecture have been largely based on those accompanying the textbook Operating Systems Concepts with Java, by Silberschatz, Galvin, and Gagne (2007).
More informationLab 3 Process Scheduling Due date: 29-Nov-2018
Introduction Lab 3 Process Scheduling Due date: 29-Nov-2018 Modern operating system employ scheduling algorithms that are based on the round-robin concept as described in class. The scheduling policy is
More informationEECE.4810/EECE.5730: Operating Systems Spring 2017 Homework 3 Solution
1. (16 points) Consider the following set of processes, with the length of the CPU-burst time given in milliseconds: Process Burst Priority P1 20 4 P2 5 3 P3 30 2 P4 2 3 P5 5 1 a. (12 points) Assume the
More informationProcesses. Operating System CS 217. Supports virtual machines. Provides services: User Process. User Process. OS Kernel. Hardware
es CS 217 Operating System Supports virtual machines Promises each process the illusion of having whole machine to itself Provides services: Protection Scheduling Memory management File systems Synchronization
More informationVBA Collections A Group of Similar Objects that Share Common Properties, Methods and
VBA AND MACROS VBA is a major division of the stand-alone Visual Basic programming language. It is integrated into Microsoft Office applications. It is the macro language of Microsoft Office Suite. Previously
More informationEECE.4810/EECE.5730: Operating Systems Spring Midterm Exam March 8, Name: Section: EECE.4810 (undergraduate) EECE.
EECE.4810/EECE.5730: Operating Systems Spring 2017 Midterm Exam March 8, 2017 Name: Section: EECE.4810 (undergraduate) EECE.5730 (graduate) For this exam, you may use two 8.5 x 11 double-sided page of
More informationChapter 3: Processes. Operating System Concepts 9 th Edit9on
Chapter 3: Processes Operating System Concepts 9 th Edit9on Silberschatz, Galvin and Gagne 2013 Chapter 3: Processes 1. Process Concept 2. Process Scheduling 3. Operations on Processes 4. Interprocess
More informationLecture Topics. Announcements. Today: Uniprocessor Scheduling (Stallings, chapter ) Next: Advanced Scheduling (Stallings, chapter
Lecture Topics Today: Uniprocessor Scheduling (Stallings, chapter 9.1-9.3) Next: Advanced Scheduling (Stallings, chapter 10.1-10.4) 1 Announcements Self-Study Exercise #10 Project #8 (due 11/16) Project
More information