CS 153 Design of Operating Systems Winter 2016

Slides:



Advertisements
Similar presentations
CS 221 Chapter 2 Excel. In Excel: A1 = 95 A2 = 95 A3 = 80 A4 = 0 =IF(A1
Advertisements

Fan Qi Database Lab 1, com1 #01-08
Chapter 2.3 : Interprocess Communication
1 Chapter 6: Concurrency: Mutual Exclusion and Synchronization Operating System Spring 2007 Chapter 6 of textbook.
Computer Science 162 Discussion Section Week 3. Agenda Project 1 released! Locks, Semaphores, and condition variables Producer-consumer – Example (locks,
Chapter 7 Quadratic Equations and Functions
BIT 116:JavaScript. BIT 116: Scripting2 Today Ch 9: Object Oriented Programming, Part 1 –Random numbers –Basic OOP stuff Reading quiz turned in?
Midterm 1 – Wednesday, June 4  Chapters 1-3: understand material as it relates to concepts covered  Chapter 4 - Processes: 4.1 Process Concept 4.2 Process.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 7: Process Synchronization Background The Critical-Section Problem Synchronization.
1 Interprocess Communication (IPC) - Outline Problem: Race condition Solution: Mutual exclusion –Disabling interrupts; –Lock variables; –Strict alternation.
1 Lecture 8: Concurrency: Mutual Exclusion and Synchronization(cont.) Advanced Operating System Fall 2009.
Synchronization III: Summary CPE Operating Systems
CSE 451 Section Thursday, October 30. Questions from Lecture?
CSE 153 Design of Operating Systems Winter 2015 Midterm Review.
Midterm Evaluations What you can do… n Study more, ready more, be more attentive in class, come see me more… What I can do… n More examples in class n.
Discrete Structures Class Meeting 1. Outline of Today Information sheet Questionnaire Quiz 0 Learning mathematics – Reading math – Solving problems.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 22 Semaphores Classic.
: Solve using mental math. 1.3x = –18 ANSWER –6 ANSWER –10 2. b + 21 = Simplify the expression 3 ( x + 2 ) – 4x + 1. ANSWER –x + 7.
Chapter 71 Monitor for Reader/Writers  Synchronizes access if all processes follow.  If some don’t go through monitor and database is accessed directly,
Web Server Architecture Client Main Thread for(j=0;j
COP-3530 Data Structures and Algorithms Midterm I
Absolute Value Equations
Assignment: Accounting 201 Review Cornelian Window Washing
August Monday Tuesday Wednesday Thursday Friday A
Chapter 7 – Systems of Linear Equations and Inequalities
BIT 116:JavaScript.
CSE451 Basic Synchronization Spring 2001
The UK Tier 1 Entrepreneur Visa and the UK Representative of Overseas Business Visa - SmartMove2UK
                                                                                                                                                                 

Welcome to SWE 637 Software Testing Jeff Offutt.
CS 3343: Analysis of Algorithms
Condition Variable Implementation (**with correction of signal**)
Do Now: take out OMAM.
CSE 311: Foundations of Computing
CS 3343: Analysis of Algorithms
CS 3343: Analysis of Algorithms
CS 3343: Analysis of Algorithms
Lecture 22 Syed Mansoor Sarwar
Variability.
Computer Science Prototyping.
SRT.
AP World History Monday/Tuesday, Dec
Board Work (Monday, ).
Friday 9/30 Due today: NA Objectives:
CS 3843 Midterm Two Review Fall 2013 Prof. Qi Tian.
Happy November!! 11/7 w3as2t7 STEM class Google code:
Lecture 10: Usable Security
CS-401 Assembly Language Programming
CS 336/536: Computer Network Security Fall 2014 Nitesh Saxena
Realtime System Fundamentals
ECE 8823: GPU Architectures
Homework Do Now: Agenda “An Introduction To Balancing Equations”
int DP_ABString(int count) { int fa[1000], fb[1000]; if(count > 1000) return -1; memset(fa, 0, sizeof(fa)); memset(fb, 0, sizeof(fb)); for(int i.
ENG 1D1 Friday March 27th, 2015.
CS 250, Discrete Structures, Fall 2014 Nitesh Saxena
ELA and Math Post-tests this week! HOMEWORK
Chapter 7: Synchronization Examples
CSE 153 Design of Operating Systems Winter 2019
We will return to this at the end of the session. To Begin With… On the post-it note at the top, rate your confidence in planning engaging lessons.
Hoot Book Check Out on 18th of December
Problem: CFQ (Circular Fifo Queue)
CSE 153 Design of Operating Systems Winter 2019
FIRST SOLUTION Producer Process Consumer Process
CS 336/536: Computer Network Security Fall 2015 Nitesh Saxena
CS 250, Discrete Structures, Fall 2015 Nitesh Saxena
AME Spring Lecture 11 - Thrust and aircraft range
A Look at Wants and Needs
Prof. Qi Tian Fall 2013 CS 3843 Midterm Review Prof. Qi Tian Fall 2013.
Presentation transcript:

CS 153 Design of Operating Systems Winter 2016 Midterm Review

Homework 1 Homework 1 solution to be posted in ilearn today

Midterm in class on Monday Based upon lecture material and Chapters 1 to 7 Closed book. No additional sheets of notes

Lets do some problems

Each person is both Consumer and Producer F F F Person Thread

Thread() { while(true) { // check incoming? // receive incoming // check outgoing? // throw out } Thread_i() { while(true) { wait(full_i); //receive incoming signal(empty_i); wait(empty_(i+1)); // throw out signal(empty_(i+1)); }

Customer queue Worker Thread Register Worker Thread Thread Worker

Customer queue Work Buffer Worker Thread Register Worker Thread Thread

Policeman Thread Queue of cars

Policeman: for each direction, for(int i = 0; i < 5; i++) { wait(mutex); if(count > 0) signal(five_spots); else break; signal(mutex); } Car() wait(mutex); count ++; signal(mutex); wait(five_spots); Car thread Car thread Policeman Thread Car thread