CS A320 Operating Systems for Engineers
|
|
- Neal Nicholson
- 6 years ago
- Views:
Transcription
1 CS A320 Operating Systems for Engineers Lecture 8 Review Through MOS Chapter 4 and Material Up to EXAM #1 October 14, 2013 Sam Siewert
2 History of OS and Abstraction History of Unix and Linux (Multics) OS as a Resource Manager CPU, Processing Processes, Threads and Kernel Tasks Memory Virtual Memory, Page Cache, Buffer Cache, Swap Storage Spinning Disk Drives, Newer NVM (Non-Volatile Memory) I/O Bandwidth and Devices Power System Calls from User Space to Kernel Space OS Interfaces GUI (Graphical User Interface) or CLI (Command Line Interface) Sam Siewert 2
3 Hardware Resources to Manage CPU, I/O, Memory, Devices, Power Sam Siewert 3
4 System Calls OS API Library APIs are Difference Collections of Useful Code in User Space Archives (e.g. built with ar ) System Calls Cross from User Space to Kernel Space Requires System Call Trap (Interrupt to Kernel) to Execute Kernel Code on Behalf of Caller in Supervisor Mode Used to Interface to all I/O Drivers Used to Interface to Kernel API Run-Time Environment Linker Static or Dynamic Loader Program File is put into Execution as a Process Scheduler Ready Queue, Dispatch, Context Switch, Load Balance for SMP Sam Siewert 4
5 Anatomy of System Call User Space (Process) to Kernel Space (Task or Handler in User Context Task), Look-up-table for Kernel Handler, Return Sam Siewert 5
6 Multi-Programming Why Do We Have More Processes than CPUs? Waiting on Disk and Other I/O Where p=fraction of time waiting on I/O, n=number of processes, CPU utility = 1 p n Sam Siewert 6
7 Processing Linux/Unix Process Container for Address Space, I/O resources (file descriptors) and 1 or more threads Memory Protection (from other bad code) User Space OS Manages memory, CPU, and I/O resources for Process CFS Completely Fair Scheduler Fork(), Execve() POSIX Threads Sequence of Machine Code Instructions (Minimum) Stack for Local Variables and Parameters Mapped to Kernel Tasks in Linux (NPTL Native POSIX Threads Library) FIFO, RR, and OTHER (CFS Completely Fair Scheduler) Sam Siewert 7
8 Linux Uses Fair Scheduler Default Scheduler is the CFS Completely Fair Scheduler Each Process Gets a Timeslice a Frequency Frequency is Based on the Tick, A software Counter Driven by an Interrupt Some Processes get Slices (of Pie) more Often than Others Priority Use nice for example to set CFS prio high Use nice -19 to set it low POSIX threads may Be Scheduled in a Library or by an OS Kernel For Us, we Use NPTL, so by the OS Kernel POSIX has RR, OTHER, and FIFO Sam Siewert 8
9 A Schedule is a State Machine A Process (task) Can 1. Execute 2. Yield the CPU core 3. Wait in the Ready Queue to Execute 4. Delay using the sleep() call for example 5. Pend by taking and Empty Semaphore for example 6. Suspend by causing and Exception (divide by 0) Sam Siewert 9
10 Producer/Consumer - Message Queues Producer / Consumer Bounded Buffer is the Problem! Message Queues are the Answer But, How do We Implement One?? We need mutual exclusion? We need counting semaphores? What is a Message Queue? Atomic Operations for: 1. Enqueue 2. Dequeue 3. Tests and Notification for Is-Empty, Is-Full 4. Blocks on Empty (or returns Empty Error EAGAIN) 5. Blocks on Full (or returns Full Error EAGAIN) Sam Siewert 10
11 POSIX Message Queue POSIX/ mq_open mq_send mq_receive Name of Message Queue must be KNOWN globally It is a Global Bounded Buffer Where One Service Produces Message and Another Consumes Can be Simplex or Duplex Can have Priority and Head of Queue Features Sam Siewert 11
12 Blocking Blocking Indefinitely Can Be Viewed as Failure of a Service Caused by Need for Shared Resource that is Unavailable Despite Availability of CPU Core Ideally Eliminate Potential for Blocking During Service Execution, Or Use Timeouts! If Elimination Impossible, Then We Want Bounded Blocking (Known Upper Bound on Blocking Time) Sam Siewert 12
13 Resource Deadlock (Circular Wait) Request X A is holding X and would like Y B is holding Y and would like X How is this resolved? A and B could Block Indefinitely Each could release X or Y and try again? Can Result in Livelock A(X) B(Y) They Release, A grabs X, B grabs Y, Deadlock, Detection, Release, A grabs X, B grabs Y Circular Wait Can Evolve over Complex Sets of Tasks and Resources (Hard to Detect or Prevent) Unbounded Blocking Detection Most Often with Watch-Dog and Sanity Monitors Request Y Sam Siewert 13
14 Mutual Exclusion Critical Section Protects Global Data for Multi-threaded Read/Write Access without Potential for Data Corruption Linux see this as non-issue because of CFS (but is an issue for FIFO, but perhaps prefers use of Priority Ceiling solutions) Against priority inheritance, by Victor Yodaiken Sam Siewert 14
15 Priority Inversion Problem: Service Using Shared Resource May Suffer Unbounded Priority Inversion Mutex Protection of a Resource May Result in Unbounded Inversion 3 Necessary Conditions for Unbounded Inversion Three or More Services With Unique Priority in the System - High, Medium, Low Priority Sets of Services At Least Two Services of Different Priority Share a Resource with Mutex Protection - One or More High and One or More Low Involved One or More Services Not Involved in the Mutex Has Priority Between the Two Involved in the Mutex What Happens? Low Priority Service Enters Mutex and High Priority Blocks on Mutex The Medium Priority Services Not Involved in the Mutex Can Interfere with the Low Priority Service for An Indeterminate Amount of Time Possible Solution: Priority Inheritance or Priority Ceiling Sam Siewert 15
16 Priority Inheritance When Higher Priority Task is Blocked on Mutex and Lower Priority Task is in Mutex, Higher Prio Loans Its Prio to the Lower for Scope of Mutex Can Chain Even Higher Prio Task Also Blocks and Again Loans Even Higher Prio As More Block More Temporary Prio Transfers Occur All Prios Must Ultimately Be Restored What is the Limit of Chaining? What Happens if Mutexes are Nested? Sam Siewert 16
17 Priority Ceiling Instead of Chaining, Simply Set Prio of Task in Mutex to Highest Immediately When There is an Inversion Could be highest Prio in the System May Over-amplify Simple to Implement More Precisely Can Be highest Prio of Those Tasks Actually Involved in Mutex Sam Siewert 17
18 Thread Safety Thread Safe Re-entrant Code can Be Executed by More Than 1 Thread at the Same Time Use Stack Only Use Thread Indexed Global Data (Unique Copy per Thread) Use Semaphore Protected Critical Sections Use TaskLock Protected Critical Sections (Not Advised) Use InterruptLock Protected Critical Sections (Not Advised) API Libraries Should Indicate Thread Safe in Manual Pages Sam Siewert 18
19 Review Day 2 Chapters 3 & 4 of MOS Sam Siewert 19
20 Memory Management Virtual Memory Virtual Address Space Larger then Main Memory Address Space Allows for Use of Swap (Pages Spilled to Disk) Allows for Page Protection (Read Only Code Segments), Ownership by Process Allows for Creation of Page Cache Requires Page Look-Up-Table (TLB Translation Look-aside Buffer) Allows for Management of Segments in Page Size Chunks Compromise Between External and Internal Fragmentation for Memory Management N=segments in memory P=page size Worst Case = (N x (P-1)) Bytes Average Case = (N x P)/2 Bytes Best Case = 0, for Exact fit to Page MMU (Memory Management Unit) Hardware for Page Table and Page Protection Sam Siewert 20
21 Paging Continued Segments are Paged Code or Text Segment Machine Code Data Segment Global Data per Process BSS Uninitialized Global Data Data Statically Initialized Global Data Stack Segment Local Variables and Parameters Heap Malloc Page Replacement Policy in Page Cache LRU, Approximate LRU LFU Working Set Sam Siewert 21
22 Page Faults Swap Partition in Linux (Normally Dedicated) Sam Siewert 22
23 Page Replacement Summary Sam Siewert 23
24 Paged Segmented Executables The Norm today in Linux, Solaris, OS-X, etc. Demand Paging (Dynamic Allocation) Try file myprog.exe in Linux Understand the Integration of the Two Concepts and Theory (Internal/External Fragmentation) Sam Siewert 24
25 File Systems Name Space for Collections of Bytes Disk I/O is Blocks (512 Byte today, 4K IDEMA Future) Files have Logical Block Size that Maps to Disk (e.g. Linux 4K, Windows 16K to 64K) I-Nodes Hierarchical (Indirection to Lists of Blocks) More Efficient than Simple Linked List of File Blocks Free List (Blocks Available) Directory Structure for Namespace Disk Partitioning Standard Entry Points Open, Create, Read, Write, Close Buffer Cache Sam Siewert 25
26 Linux VFS Page Cache Syscalls (Open, Create, Read, Write, Close) VFS User Kernel Inode Cache NFS Ext4 /proc Directory Cache Buffer Cache Sam Siewert Device Drivers Devices SW HW
27 Fragmentation Impact Fragmented Files Waste Space AND take Longer to Read/Write Seek and Rotate Delays (E.g. Seek Time + ½ Rotation at 7200 RPM for Each Non-contiguous set of Blocks) Sam Siewert 27
28 General Disk Block I/O Performance Spinning Disk Low Random IOPs, 200MB Sequential BW SSD High Random IOPs, similar BW over Wider range of I/O Request Sizes Sam Siewert 28
29 Free Block Tracking Issues with Fragmentation Again (Internal / External) for Disk Block Size and File System Pages Overhead of Tracking Free Blocks that Are Not Contiguous Sam Siewert 29
30 Buffer Cache Immediate Read after Write (Common) Cached Recent and Frequently Used File system Pages Cached Write-back of Large Updates to Disk, Coalesced for More Sequential Large Write (Disk Optimal) Elevator Algorithm Sam Siewert 30
31 Disk Arm Motion Random IOPs are the Problem (200 per Disk Typical) Due to Seek time + ½ Rotation on Average (milliseconds) An Eternity compared to Nanoseconds (1, 10, 100 s) for CPU and Memory running at GhZ Rates Sam Siewert 31
32 Disk Access Latency Calculations Ex #1 an HDD with 3 5cm diameter platters turns at 3000 RPM, what is the average latency for the drive? Latency = (1/2) x ( 60 sss/mmm 3000 rrr/mmm ) = 0.01 sec Ex #2 an HDD with 12.7cm diameter disk spins at 5600 RPM the average access time is 11 ms, what is the average rotational delay? Latency = (1/2) x (60 sss/mmm) ( Seek + Rotate Delay HDD IOPs, 200MB/sec Typical Max Perf Slow Random Access Good Sequential Reason for Multiprogramming Reason for Buffer Cache 1000 ms/sss 5600 rrr/mmm ) = ms Sam Siewert 32
33 Unix / Linux I-Nodes First I-Node Handles Small Files (64 KB) Second Handles Medium (E.g. 64 MB) Third Handles Large (E.g. 64 GB) Sam Siewert 33
34 Day 1: Example Problems [5 40%] [1] Concepts (Ch 1) System Calls (Diagram), Kernel vs. User Space, OS as Resource Manager, Multi-User [2] Processing (Ch 2) - Fork(), Execve(), Threading, Degree of Multi-programming Required, Producer-Consumer, Deadlock/Livelock, Unbounded Priority Inversion, CFS v. FIFO Scheduling [1] Virtual Memory (Ch 3) Compute Fragmentation, Virtual to Physical Address Translation (Page and Offset Computation), Segmentation, Replacement Policies [1] Storage and Files (Ch 4) E.g. Disk Access Latency Calculation Based on Seek and Rotate or Bandwidth and IOPs, I-Node Traversal, Free-List (Linked) vs. Bitmaps Sam Siewert 34
35 Day 2: Design, Take Home and Program 60% #1 Processes and/or Threading, Producer-Consumer, Syncrhonization of Threads [Coding] Design in Class Implement, Test, Upload at Home #2 Memory Management and Use by Processes (in execution) and Programs (at rest) [Analysis] Answer Based on Theory in Class Answer Based on Analysis, Upload at Home #3 File systems and Block Devices Answer Based on Knowledge and Theory in Class Explore, Analyze and Upload at Home Sam Siewert 35
CS A320 Operating Systems for Engineers
CS A320 Operating Systems for Engineers Lecture 4 Conclusion of MOS Chapter 2 September 18, 2013 Sam Siewert Many Ways to Schedule a CPU Core We ve Come a Long way Since Batch Scheduling Sam Siewert 2
More informationCS A331 Programming Language Concepts
CS A331 Programming Language Concepts Lecture 12 Alternative Language Examples (General Concurrency Issues and Concepts) March 30, 2014 Sam Siewert Major Concepts Concurrent Processing Processes, Tasks,
More informationFinal Exam Preparation Questions
EECS 678 Spring 2013 Final Exam Preparation Questions 1 Chapter 6 1. What is a critical section? What are the three conditions to be ensured by any solution to the critical section problem? 2. The following
More information2 nd Half. Memory management Disk management Network and Security Virtual machine
Final Review 1 2 nd Half Memory management Disk management Network and Security Virtual machine 2 Abstraction Virtual Memory (VM) 4GB (32bit) linear address space for each process Reality 1GB of actual
More informationDEPARTMENT 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 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 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 informationQUESTION BANK UNIT I
QUESTION BANK Subject Name: Operating Systems UNIT I 1) Differentiate between tightly coupled systems and loosely coupled systems. 2) Define OS 3) What are the differences between Batch OS and Multiprogramming?
More informationCS350: Final Exam Review
University of Waterloo CS350: Final Exam Review Gwynneth Leece, Andrew Song, Rebecca Putinski Winter, 2010 Intro, Threads & Concurrency What are the three views of an operating system? Describe them. Define
More informationChapter 8 & Chapter 9 Main Memory & Virtual Memory
Chapter 8 & Chapter 9 Main Memory & Virtual Memory 1. Various ways of organizing memory hardware. 2. Memory-management techniques: 1. Paging 2. Segmentation. Introduction Memory consists of a large array
More informationINSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad COMPUTER SCIENCE AND ENGINEERING QUESTION BANK OPERATING SYSTEMS
INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad - 500 043 COMPUTER SCIENCE AND ENGINEERING QUESTION BANK Title Code Regulation Structure Coordinator Team of Instructors OPERATING SYSTEMS A50510
More informationMC7204 OPERATING SYSTEMS
MC7204 OPERATING SYSTEMS QUESTION BANK UNIT I INTRODUCTION 9 Introduction Types of operating systems operating systems structures Systems components operating systems services System calls Systems programs
More informationCSE 4/521 Introduction to Operating Systems. Lecture 27 (Final Exam Review) Summer 2018
CSE 4/521 Introduction to Operating Systems Lecture 27 (Final Exam Review) Summer 2018 Overview Objective: Revise topics and questions for the final-exam. 1. Main Memory 2. Virtual Memory 3. Mass Storage
More informationDisk Scheduling COMPSCI 386
Disk Scheduling COMPSCI 386 Topics Disk Structure (9.1 9.2) Disk Scheduling (9.4) Allocation Methods (11.4) Free Space Management (11.5) Hard Disk Platter diameter ranges from 1.8 to 3.5 inches. Both sides
More informationVirtual Memory Outline
Virtual Memory Outline Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating Kernel Memory Other Considerations Operating-System Examples
More informationClassifying Information Stored in Memory! Memory Management in a Uniprogrammed System! Segments of a Process! Processing a User Program!
Memory Management in a Uniprogrammed System! A! gets a fixed segment of (usually highest )"! One process executes at a time in a single segment"! Process is always loaded at "! Compiler and linker generate
More informationExam Guide COMPSCI 386
FOUNDATIONS We discussed in broad terms the three primary responsibilities of an operating system. Describe each. What is a process? What is a thread? What parts of a process are shared by threads? What
More informationOperating Systems. Designed and Presented by Dr. Ayman Elshenawy Elsefy
Operating Systems Designed and Presented by Dr. Ayman Elshenawy Elsefy Dept. of Systems & Computer Eng.. AL-AZHAR University Website : eaymanelshenawy.wordpress.com Email : eaymanelshenawy@yahoo.com Reference
More informationCHAPTER NO - 1 : Introduction:
Sr. No L.J. Institute of Engineering & Technology Semester: IV (26) Subject Name: Operating System Subject Code:21402 Faculties: Prof. Saurin Dave CHAPTER NO - 1 : Introduction: TOPIC:1 Basics of Operating
More informationCOMP 3361: Operating Systems 1 Final Exam Winter 2009
COMP 3361: Operating Systems 1 Final Exam Winter 2009 Name: Instructions This is an open book exam. The exam is worth 100 points, and each question indicates how many points it is worth. Read the exam
More informationCSI3131 Final Exam Review
CSI3131 Final Exam Review Final Exam: When: April 24, 2015 2:00 PM Where: SMD 425 File Systems I/O Hard Drive Virtual Memory Swap Memory Storage and I/O Introduction CSI3131 Topics Process Computing Systems
More informationCLASS: II YEAR / IV SEMESTER CSE SUBJECT CODE AND NAME: CS6401 OPERATING SYSTEMS UNIT I OPERATING SYSTEMS OVERVIEW
CLASS: II YEAR / IV SEMESTER CSE SUBJECT CODE AND NAME: CS6401 OPERATING SYSTEMS SYLLABUS UNIT I OPERATING SYSTEMS OVERVIEW Computer System Overview-Basic Elements, Instruction Execution, Interrupts, Memory
More informationCS450/550 Operating Systems
CS450/550 Operating Systems Lecture 4 memory Palden Lama Department of Computer Science CS450/550 Memory.1 Review: Summary of Chapter 3 Deadlocks and its modeling Deadlock detection Deadlock recovery Deadlock
More informationChapter 4 Memory Management. Memory Management
Chapter 4 Memory Management 4.1 Basic memory management 4.2 Swapping 4.3 Virtual memory 4.4 Page replacement algorithms 4.5 Modeling page replacement algorithms 4.6 Design issues for paging systems 4.7
More informationOperating Systems Design Exam 2 Review: Fall 2010
Operating Systems Design Exam 2 Review: Fall 2010 Paul Krzyzanowski pxk@cs.rutgers.edu 1 1. Why could adding more memory to a computer make it run faster? If processes don t have their working sets in
More informationFile System Internals. Jo, Heeseung
File System Internals Jo, Heeseung Today's Topics File system implementation File descriptor table, File table Virtual file system File system design issues Directory implementation: filename -> metadata
More informationLecture 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 informationOperating Systems. IV. Memory Management
Operating Systems IV. Memory Management Ludovic Apvrille ludovic.apvrille@telecom-paristech.fr Eurecom, office 470 http://soc.eurecom.fr/os/ @OS Eurecom Outline Basics of Memory Management Hardware Architecture
More informationOPERATING SYSTEM. Chapter 9: Virtual Memory
OPERATING SYSTEM Chapter 9: Virtual Memory Chapter 9: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating Kernel Memory
More informationSNS COLLEGE OF ENGINEERING
SNS COLLEGE OF ENGINEERING Coimbatore. Department of Computer Science and Engineering Question Bank- Even Semester 2015-2016 CS6401 OPERATING SYSTEMS Unit-I OPERATING SYSTEMS OVERVIEW 1. Differentiate
More informationMemory management. Requirements. Relocation: program loading. Terms. Relocation. Protection. Sharing. Logical organization. Physical organization
Requirements Relocation Memory management ability to change process image position Protection ability to avoid unwanted memory accesses Sharing ability to share memory portions among processes Logical
More informationOperating System Concepts
Chapter 9: Virtual-Memory Management 9.1 Silberschatz, Galvin and Gagne 2005 Chapter 9: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped
More informationOperating Systems. Week 9 Recitation: Exam 2 Preview Review of Exam 2, Spring Paul Krzyzanowski. Rutgers University.
Operating Systems Week 9 Recitation: Exam 2 Preview Review of Exam 2, Spring 2014 Paul Krzyzanowski Rutgers University Spring 2015 March 27, 2015 2015 Paul Krzyzanowski 1 Exam 2 2012 Question 2a One of
More informationMemory Management. Chapter 4 Memory Management. Multiprogramming with Fixed Partitions. Ideally programmers want memory that is.
Chapter 4 Memory Management Ideally programmers want memory that is Memory Management large fast non volatile 4.1 Basic memory management 4.2 Swapping 4.3 Virtual memory 4.4 Page replacement algorithms
More informationCS370 Operating Systems
CS370 Operating Systems Colorado State University Yashwant K Malaiya Spring 2018 L17 Main Memory Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 FAQ Was Great Dijkstra a magician?
More information(b) External fragmentation can happen in a virtual memory paging system.
Alexandria University Faculty of Engineering Electrical Engineering - Communications Spring 2015 Final Exam CS333: Operating Systems Wednesday, June 17, 2015 Allowed Time: 3 Hours Maximum: 75 points Note:
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 informationDistributed Systems Operation System Support
Hajussüsteemid MTAT.08.009 Distributed Systems Operation System Support slides are adopted from: lecture: Operating System(OS) support (years 2016, 2017) book: Distributed Systems: Concepts and Design,
More informationPROCESS 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( D ) 4. Which is not able to solve the race condition? (A) Test and Set Lock (B) Semaphore (C) Monitor (D) Shared memory
CS 540 - Operating Systems - Final Exam - Name: Date: Wenesday, May 12, 2004 Part 1: (78 points - 3 points for each problem) ( C ) 1. In UNIX a utility which reads commands from a terminal is called: (A)
More informationChapter 4 Memory Management
Chapter 4 Memory Management 4.1 Basic memory management 4.2 Swapping 4.3 Virtual memory 4.4 Page replacement algorithms 4.5 Modeling page replacement algorithms 4.6 Design issues for paging systems 4.7
More informationCMPS 111 Spring 2003 Midterm Exam May 8, Name: ID:
CMPS 111 Spring 2003 Midterm Exam May 8, 2003 Name: ID: This is a closed note, closed book exam. There are 20 multiple choice questions and 5 short answer questions. Plan your time accordingly. Part I:
More informationOperating Systems Design Exam 2 Review: Spring 2011
Operating Systems Design Exam 2 Review: Spring 2011 Paul Krzyzanowski pxk@cs.rutgers.edu 1 Question 1 CPU utilization tends to be lower when: a. There are more processes in memory. b. There are fewer processes
More informationMemory Management. Disclaimer: some slides are adopted from book authors slides with permission 1
Memory Management Disclaimer: some slides are adopted from book authors slides with permission 1 CPU management Roadmap Process, thread, synchronization, scheduling Memory management Virtual memory Disk
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 informationMain Points of the Computer Organization and System Software Module
Main Points of the Computer Organization and System Software Module You can find below the topics we have covered during the COSS module. Reading the relevant parts of the textbooks is essential for a
More informationCS 416: Opera-ng Systems Design March 23, 2012
Question 1 Operating Systems Design Exam 2 Review: Spring 2011 Paul Krzyzanowski pxk@cs.rutgers.edu CPU utilization tends to be lower when: a. There are more processes in memory. b. There are fewer processes
More informationCS370 Operating Systems
CS370 Operating Systems Colorado State University Yashwant K Malaiya Spring 2018 L20 Virtual Memory Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 Questions from last time Page
More informationDesign of Operating System
Design of Operating System Architecture OS protection, modes/privileges User Mode, Kernel Mode https://blog.codinghorror.com/understanding-user-and-kernel-mode/ a register of flag to record what mode the
More informationCS370 Operating Systems
CS370 Operating Systems Colorado State University Yashwant K Malaiya Spring 2018 Lecture 22 File Systems Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 Disk Structure Disk can
More informationFile system internals Tanenbaum, Chapter 4. COMP3231 Operating Systems
File system internals Tanenbaum, Chapter 4 COMP3231 Operating Systems Architecture of the OS storage stack Application File system: Hides physical location of data on the disk Exposes: directory hierarchy,
More informationCS3600 SYSTEMS AND NETWORKS
CS3600 SYSTEMS AND NETWORKS NORTHEASTERN UNIVERSITY Lecture 11: File System Implementation Prof. Alan Mislove (amislove@ccs.neu.edu) File-System Structure File structure Logical storage unit Collection
More informationFirst-In-First-Out (FIFO) Algorithm
First-In-First-Out (FIFO) Algorithm Reference string: 7,0,1,2,0,3,0,4,2,3,0,3,0,3,2,1,2,0,1,7,0,1 3 frames (3 pages can be in memory at a time per process) 15 page faults Can vary by reference string:
More informationFile system internals Tanenbaum, Chapter 4. COMP3231 Operating Systems
File system internals Tanenbaum, Chapter 4 COMP3231 Operating Systems Summary of the FS abstraction User's view Hierarchical structure Arbitrarily-sized files Symbolic file names Contiguous address space
More informationDevice-Functionality Progression
Chapter 12: I/O Systems I/O Hardware I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Incredible variety of I/O devices Common concepts Port
More informationChapter 12: I/O Systems. I/O Hardware
Chapter 12: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations I/O Hardware Incredible variety of I/O devices Common concepts Port
More informationINSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad
INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad - 500 043 INFORMATION TECHNOLOGY TUTORIAL QUESTION BANK Course Name Course Code Class Branch OPERATING SYSTEMS ACS007 IV Semester
More informationChapter 8: Main Memory
Chapter 8: Main Memory Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel 32 and 64-bit Architectures Example:
More informationChapter 8: Virtual Memory. Operating System Concepts
Chapter 8: Virtual Memory Silberschatz, Galvin and Gagne 2009 Chapter 8: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating
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
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 informationCHAPTER 8 - MEMORY MANAGEMENT STRATEGIES
CHAPTER 8 - MEMORY MANAGEMENT STRATEGIES OBJECTIVES Detailed description of various ways of organizing memory hardware Various memory-management techniques, including paging and segmentation To provide
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 informationScheduling. 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 informationCS 143A - Principles of Operating Systems
CS 143A - Principles of Operating Systems Operating Systems - Review of content from midterm to final Prof. Nalini Venkatasubramanian nalini@ics.uci.edu Deadlocks System Model Resource allocation graph,
More informationBasic Memory Management
Basic Memory Management CS 256/456 Dept. of Computer Science, University of Rochester 10/15/14 CSC 2/456 1 Basic Memory Management Program must be brought into memory and placed within a process for it
More informationCS370 Operating Systems
CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2017 Lecture 24 File Systems Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 Questions from last time How
More informationCS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 13: Address Translation
CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring 2004 Lecture 13: Address Translation 13.0 Main Points 13.1 Hardware Translation Overview CPU Virtual Address Translation
More informationIntroduction Disks RAID Tertiary storage. Mass Storage. CMSC 420, York College. November 21, 2006
November 21, 2006 The memory hierarchy Red = Level Access time Capacity Features Registers nanoseconds 100s of bytes fixed Cache nanoseconds 1-2 MB fixed RAM nanoseconds MBs to GBs expandable Disk milliseconds
More informationModeling Page Replacement: Stack Algorithms. Design Issues for Paging Systems
Modeling Page Replacement: Stack Algorithms 7 4 6 5 State of memory array, M, after each item in reference string is processed CS450/550 Memory.45 Design Issues for Paging Systems Local page replacement
More informationPerformance of Various Levels of Storage. Movement between levels of storage hierarchy can be explicit or implicit
Memory Management All data in memory before and after processing All instructions in memory in order to execute Memory management determines what is to be in memory Memory management activities Keeping
More informationCS370 Operating Systems
CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2017 Lecture 21 Main Memory Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 FAQ Why not increase page size
More informationBackground. Contiguous Memory Allocation
Operating System Lecture 8 2017.5.9 Chapter 8 (Main Memory) Background Swapping Contiguous Memory Allocation Segmentation - Paging Memory Management Selection of a memory-management method for a specific
More informationChapter 8: Memory-Management Strategies
Chapter 8: Memory-Management Strategies Chapter 8: Memory Management Strategies Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel 32 and
More informationProcesses. Process Scheduling, Process Synchronization, and Deadlock will be discussed further in Chapters 5, 6, and 7, respectively.
Processes Process Scheduling, Process Synchronization, and Deadlock will be discussed further in Chapters 5, 6, and 7, respectively. 1. Process Concept 1.1 What is a Process? A process is a program in
More informationChapter 9 Memory Management
Contents 1. Introduction 2. Computer-System Structures 3. Operating-System Structures 4. Processes 5. Threads 6. CPU Scheduling 7. Process Synchronization 8. Deadlocks 9. Memory Management 10. Virtual
More informationEXAMS CS604- OPERATING SYSTEMS
MUHAMMAD FAISAL MIT 4 th Semester Al-Barq Campus (VGJW01) Gujranwala faisalgrw123@gmail.com Solved Reference MCQ s For Final TERM EXAMS CS604- OPERATING SYSTEMS Question No: 1 ( Marks: 1 ) - Please choose
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 informationDelhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:
Serial :. T_CS_A_Operating System_ Delhi Noida Bhopal yderabad Jaipur Lucknow Indore une Bhubaneswar Kolkata atna Web: E-mail: info@madeeasy.in h: - CLASS TEST - COMUTER SCIENCE & IT Subject : Operating
More informationArchitectural Support. Processes. OS Structure. Threads. Scheduling. CSE 451: Operating Systems Spring Module 28 Course Review
Architectural Support CSE 451: Operating Systems Spring 2012 Module 28 Course Review Ed Lazowska lazowska@cs.washington.edu Allen Center 570 Privileged instructions what are they? how does the CPU know
More informationCS604 Final term Paper Fall (2012)
CS604- Operating Systems Solved Subjective From Final term Papers 10 July,2013 MC100401285 Moaaz.pk@gmail.com Mc100401285@gmail.com PSMD01 CS604 Final term Paper Fall (2012) 1. Write the names of common
More informationCS252 S05. Main memory management. Memory hardware. The scale of things. Memory hardware (cont.) Bottleneck
Main memory management CMSC 411 Computer Systems Architecture Lecture 16 Memory Hierarchy 3 (Main Memory & Memory) Questions: How big should main memory be? How to handle reads and writes? How to find
More informationComputer Systems Laboratory Sungkyunkwan University
File System Internals Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics File system implementation File descriptor table, File table
More informationBasic Memory Management. Basic Memory Management. Address Binding. Running a user program. Operating Systems 10/14/2018 CSC 256/456 1
Basic Memory Management Program must be brought into memory and placed within a process for it to be run Basic Memory Management CS 256/456 Dept. of Computer Science, University of Rochester Mono-programming
More informationCS399 New Beginnings. Jonathan Walpole
CS399 New Beginnings Jonathan Walpole Memory Management Memory Management Memory a linear array of bytes - Holds O.S. and programs (processes) - Each cell (byte) is named by a unique memory address Recall,
More informationECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective. Part I: Operating system overview: Processes and threads
ECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective Part I: Operating system overview: Processes and threads 1 Overview Process concept Process scheduling Thread
More informationChapter 8: Main Memory. Operating System Concepts 9 th Edition
Chapter 8: Main Memory Silberschatz, Galvin and Gagne 2013 Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel
More informationCourse Description: This course includes the basic concepts of operating system
Operating Systems Course Title: Operating Systems Full Marks:60+ 20+20 Course No: CSC259 Pass Marks: 24+8+8 Nature of the Course: Theory + Lab Credit Hrs: 3 Course Description: This course includes the
More informationChapter 8 Memory Management
Chapter 8 Memory Management Da-Wei Chang CSIE.NCKU Source: Abraham Silberschatz, Peter B. Galvin, and Greg Gagne, "Operating System Concepts", 9th Edition, Wiley. 1 Outline Background Swapping Contiguous
More informationChapter 11. I/O Management and Disk Scheduling
Operating System Chapter 11. I/O Management and Disk Scheduling Lynn Choi School of Electrical Engineering Categories of I/O Devices I/O devices can be grouped into 3 categories Human readable devices
More informationOperating Systems CMPSC 473 Midterm 2 Review April 15, Lecture 21 Instructor: Trent Jaeger
Operating Systems CMPSC 473 Midterm Review April 15, 8 - Lecture 1 Instructor: Trent Jaeger Scope Chapter 6 -- Synchronization Chapter 7 -- Deadlocks Chapter 8 -- Main Memory (Physical) Chapter 9 -- Virtual
More informationAUTOBEST: A United AUTOSAR-OS And ARINC 653 Kernel. Alexander Züpke, Marc Bommert, Daniel Lohmann
AUTOBEST: A United AUTOSAR-OS And ARINC 653 Kernel Alexander Züpke, Marc Bommert, Daniel Lohmann alexander.zuepke@hs-rm.de, marc.bommert@hs-rm.de, lohmann@cs.fau.de Motivation Automotive and Avionic industry
More informationVirtual or Logical. Logical Addr. MMU (Memory Mgt. Unit) Physical. Addr. 1. (50 ns access)
Virtual Memory - programmer views memory as large address space without concerns about the amount of physical memory or memory management. (What do the terms 3-bit (or 6-bit) operating system or overlays
More informationChapter 9: Virtual Memory. Operating System Concepts 9th Edition
Chapter 9: Virtual Memory Chapter 9: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating Kernel Memory Other Considerations
More informationCS 450 Fall xxxx Final exam solutions. 2) a. Multiprogramming is allowing the computer to run several programs simultaneously.
CS 450 Fall xxxx Final exam solutions 1) 1-The Operating System as an Extended Machine the function of the operating system is to present the user with the equivalent of an extended machine or virtual
More informationChapter 7: Main Memory. Operating System Concepts Essentials 8 th Edition
Chapter 7: Main Memory Operating System Concepts Essentials 8 th Edition Silberschatz, Galvin and Gagne 2011 Chapter 7: Memory Management Background Swapping Contiguous Memory Allocation Paging Structure
More informationFall COMP3511 Review
Outline Fall 2015 - COMP3511 Review Monitor Deadlock and Banker Algorithm Paging and Segmentation Page Replacement Algorithms and Working-set Model File Allocation Disk Scheduling Review.2 Monitors Condition
More informationLast Class: Deadlocks. Where we are in the course
Last Class: Deadlocks Necessary conditions for deadlock: Mutual exclusion Hold and wait No preemption Circular wait Ways of handling deadlock Deadlock detection and recovery Deadlock prevention Deadlock
More informationChapter 8: Main Memory
Chapter 8: Main Memory Silberschatz, Galvin and Gagne 2013 Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel
More informationCS 4410 Operating Systems. Review 1. Summer 2016 Cornell University
CS 4410 Operating Systems Review 1 Summer 2016 Cornell University 1 A modern computer system keyboard disks mouse printer monitor CPU Disk controller USB controller Graphics adapter memory OS device driver
More information16 Sharing Main Memory Segmentation and Paging
Operating Systems 64 16 Sharing Main Memory Segmentation and Paging Readings for this topic: Anderson/Dahlin Chapter 8 9; Siberschatz/Galvin Chapter 8 9 Simple uniprogramming with a single segment per
More information