CSE 153 Design of Operating Systems Winter 2019

Slides:



Advertisements
Similar presentations
Operating Systems ECE344 Midterm review Ding Yuan
Advertisements

CAS3SH3 Midterm Review. The midterm 50 min, Friday, Feb 27 th Materials through CPU scheduling closed book, closed note Types of questions: True & False,
Chapter 6: Process Synchronization
Operating Systems ECE344 Ding Yuan Final Review Lecture 13: Final Review.
Cpr E 308 Spring 2004 Recap for Midterm Introductory Material What belongs in the OS, what doesn’t? Basic Understanding of Hardware, Memory Hierarchy.
Review: Chapters 1 – Chapter 1: OS is a layer between user and hardware to make life easier for user and use hardware efficiently Control program.
Chapter 2: Processes Topics –Processes –Threads –Process Scheduling –Inter Process Communication (IPC) Reference: Operating Systems Design and Implementation.
CMPT 300: Operating Systems Review THIS REIVEW SHOULD NOT BE USED AS PREDICTORS OF THE ACTUAL QUESTIONS APPEARING ON THE FINAL EXAM.
CS 153 Design of Operating Systems Spring 2015 Lecture 10: Scheduling.
General What is an OS? What do you get when you buy an OS? What does the OS do? What are the parts of an OS? What is the kernel? What is a device.
Chapter 6 Concurrency: Deadlock and Starvation Operating Systems: Internals and Design Principles, 6/E William Stallings Dave Bremer Otago Polytechnic,
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-3 CPU Scheduling Department of Computer Science and Software Engineering.
CS 153 Design of Operating Systems Spring 2015 Midterm Review.
CS 153 Design of Operating Systems Spring 2015 Lecture 11: Scheduling & Deadlock.
Scheduling Basic scheduling policies, for OS schedulers (threads, tasks, processes) or thread library schedulers Review of Context Switching overheads.
Lecture Topics: 11/13 Semaphores Deadlock Scheduling.
Cpr E 308 Spring 2004 Real-time Scheduling Provide time guarantees Upper bound on response times –Programmer’s job! –Every level of the system Soft versus.
CSE 451: Operating Systems Section 5 Midterm review.
Operating Systems ECE344 Ding Yuan Final Review Lecture 13: Final Review.
Processes, Threads, and Process States. Programs and Processes  Program: an executable file (before/after compilation)  Process: an instance of a program.
Review for Quiz-2 Applied Operating System Concepts Chap.s 1,2,6,7 - ECE3055b, Spring 2005.
Exam Review Andy Wang Operating Systems COP 4610 / CGS 5765.
Silberschatz and Galvin  Chapter 3:Processes Processes –State of a process, process control block, –Scheduling of processes  Long term scheduler,
CSE 153 Design of Operating Systems Winter 2015 Midterm Review.
1/31/20161 Final Exam Dec 10. Monday. 4-7pm. Phelp 1160 Similar to midterm The exam is closed book. You can bring 2 page of notes (double sided) Nachos.
Lecture Topics: 11/15 CPU scheduling: –Scheduling goals and algorithms.
What is an Operating System? Various systems and their pros and cons –E.g. multi-tasking vs. Batch OS definitions –Resource allocator –Control program.
1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
CPU Scheduling Operating Systems CS 550. Last Time Deadlock Detection and Recovery Methods to handle deadlock – Ignore it! – Detect and Recover – Avoidance.
Operating Systems Scheduling. Scheduling Short term scheduler (CPU Scheduler) –Whenever the CPU becomes idle, a process must be selected for execution.
Introduction to operating systems What is an operating system? An operating system is a program that, from a programmer’s perspective, adds a variety of.
CPU Scheduling Scheduling processes (or kernel-level threads) onto the cpu is one of the most important OS functions. The cpu is an expensive resource.
CSE 120 Principles of Operating
Copyright ©: Nahrstedt, Angrave, Abdelzaher
CSE 120 Principles of Operating
Sarah Diesburg Operating Systems COP 4610
Applied Operating System Concepts -
Networks and Operating Systems: Exercise Session 2
April 6, 2001 Gary Kimura Lecture #6 April 6, 2001
Section 10: Last section! Final review.
Chapter 2.2 : Process Scheduling
CPU Scheduling Basic Concepts Scheduling Criteria
Chapter 5: CPU Scheduling
Chapter 15 – Part 1 The Internal Operating System
Operating System Concepts
CSE 451: Operating Systems Winter 2007 Module 24 Course Review
Mid Term review CSC345.
Midterm review: closed book multiple choice chapters 1 to 9
COMS Prelim 1 Review Session
COT 4600 Operating Systems Spring 2011
CSE 451: Operating Systems Spring 2005 Module 23 Course Review
Process Description and Control
Lecture 2 Part 2 Process Synchronization
CSE 451: Operating Systems Spring 2005 Module 23 Course Review
Process Scheduling Decide which process should run and for how long
Process Description and Control
CSE 451: Operating Systems Winter 2003 Lecture 6 Scheduling
February 5, 2004 Adrienne Noble
CSE 451: Operating Systems Winter 2006 Module 24 Course Review
Processor Scheduling Hank Levy 1.
CSE 451: Operating Systems Autumn 2003 Lecture 7 Synchronization
CSE 451: Operating Systems Autumn 2005 Lecture 7 Synchronization
CSE 451: Operating Systems Winter 2003 Lecture 7 Synchronization
CSE 153 Design of Operating Systems Winter 19
EECE.4810/EECE.5730 Operating Systems
CSE 542: Operating Systems
CSE 542: Operating Systems
CSE 451: Operating Systems Winter 2001 Lecture 6 Scheduling
CS444/544 Operating Systems II Scheduler
Sarah Diesburg Operating Systems CS 3430
Presentation transcript:

CSE 153 Design of Operating Systems Winter 2019 Midterm Review

Midterm in class on Wednesday 2/13 Covers material through scheduling and deadlock Based upon lecture material and modules of the book indicated on the class schedule Closed book. No additional sheets of notes CSE 153 – Midterm Review

Overview Architectural support for Oses Processes Threads Synchronization Scheduling CSE 153 – Midterm Review

Arch Support for OSes Types of architecture support Manipulating privileged machine state Generating and handling events CSE 153 – Midterm Review

Privileged Instructions What are privileged instructions? Who gets to execute them? How does the CPU know whether they can be executed? Difference between user and kernel mode Why do they need to be privileged? What do they manipulate? Protected control registers Memory management I/O devices CSE 153 – Midterm Review

Events Events What are faults, and how are they handled? Synchronous: faults (exceptions), system calls Asynchronous: interrupts What are faults, and how are they handled? What are system calls, and how are they handled? What are interrupts, and how are they handled? How do I/O devices use interrupts? What is the difference between exceptions and interrupts? CSE 153 – Midterm Review

Processes What is a process? What resource does it virtualize? What is the difference between a process and a program? What is contained in a process? CSE 153 – Midterm Review

Process Data Structures Process Control Blocks (PCBs) What information does it contain? How is it used in a context switch? State queues What are process states? What is the process state graph? When does a process change state? How does the OS use queues to keep track of processes? CSE 153 – Midterm Review

Process Manipulation What does CreateProcess on Windows do? What does fork() on Unix do? What does it mean for it to “return twice”? What does exec() on Unix do? How is it different from fork? How are fork and exec used to implement shells? CSE 153 – Midterm Review

Threads What is a thread? Why are threads useful? What is the difference between a thread and a process? How are they related? Why are threads useful? What is the difference between user-level and kernel-level threads? What are the advantages/disadvantages of one over another? CSE 153 – Midterm Review

Thread Implementation How are threads managed by the run-time system? Thread control blocks, thread queues How is this different from process management? What operations do threads support? Fork, yield, sleep, etc. What does thread yield do? What is a context switch? What is the difference between non-preemptive scheduling and preemptive thread scheduling? Voluntary and involuntary context switches CSE 153 – Midterm Review

Synchronization Why do we need synchronization? Coordinate access to shared data structures Coordinate thread/process execution What can happen to shared data structures if synchronization is not used? Race condition Corruption Bank account example When are resources shared? Global variables, static objects Heap objects CSE 153 – Midterm Review

Mutual Exclusion What is mutual exclusion? What is a critical section? What guarantees do critical sections provide? What are the requirements of critical sections? Mutual exclusion (safety) Progress (liveness) Bounded waiting (no starvation: liveness) Performance How does mutual exclusion relate to critical sections? What are the mechanisms for building critical sections? Locks, semaphores, monitors, condition variables CSE 153 – Midterm Review

Locks What does Acquire do? What does Release do? What does it mean for Acquire/Release to be atomic? How can locks be implemented? Spinlocks Disable/enable interrupts How does test-and-set work? What kind of lock does it implement? What are the limitations of using spinlocks, interrupts? Inefficient, interrupts turned off too long CSE 153 – Midterm Review

Semaphores What is a semaphore? When do threads block on semaphores? What does Wait/P/Decrement do? What does Signal/V/Increment do? How does a semaphore differ from a lock? What is the difference between a binary semaphore and a counting semaphore? When do threads block on semaphores? When are they woken up again? Using semaphores to solve synchronization problems Readers/Writers problem Bounded Buffers problem CSE 153 – Midterm Review

Scheduling What kinds of scheduling is there? Components Long-term scheduling Short-term scheduling Components Scheduler (dispatcher) When does scheduling happen? Job changes state (e.g., waiting to running) Interrupt, exception Job creation, termination CSE 153 – Midterm Review

Scheduling Goals Goals What is the goal of a batch system? Maximize CPU utilization Maximize job throughput Minimize turnaround time Minimize waiting time Minimize response time What is the goal of a batch system? What is the goal of an interactive system? CSE 153 – Midterm Review

Starvation Starvation Causes Indefinite denial of a resource (CPU, lock) Causes Side effect of scheduling Side effect of synchronization Operating systems try to prevent starvation CSE 153 – Midterm Review

Scheduling Algorithms What are the properties, advantages and disadvantages of the following scheduling algorithms? First Come First Serve (FCFS)/First In First Out (FIFO) Shortest Job First (SJF) Priority Round Robin Multilevel feedback queues What scheduling algorithm does Unix use? Why? CSE 153 – Midterm Review

Deadlock Deadlock happens when processes are waiting on each other and cannot make progress What are the conditions for deadlock? Mutual exclusion Hold and wait No preemption Circular wait How to visualize, represent abstractly? Resource allocation graph (RAG) Waits for graph (WFG) CSE 153 – Midterm Review

Deadlock Approaches Dealing with deadlock Ignore it Prevent it (prevent one of the four conditions) Avoid it (have tight control over resource allocation) Detect and recover from it What is the Banker’s algorithm? Which of the four approaches above does it implement? CSE 153 – Midterm Review

Lets do some problems CSE 153 – Midterm Review

CSE 153 – Midterm Review

CSE 153 – Midterm Review

CSE 153 – Midterm Review

CSE 153 – Midterm Review

CSE 153 – Midterm Review

CSE 153 – Midterm Review