10/2/20161 Operating Systems Design (CS 423) Elsa L Gunter 2112 SC, UIUC Based on slides by Roy Campbell, Sam King,

Slides:



Advertisements
Similar presentations
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 3 Operating System Organization.
Advertisements

Slide 2-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 2 Using the Operating System 2.
Introduction CSCI 444/544 Operating Systems Fall 2008.
Processes and Threads Chapter Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
Thursday, June 08, 2006 The number of UNIX installations has grown to 10, with more expected. The UNIX Programmer's Manual, 2nd Edition, June, 1972.
Operating Systems High Level View Chapter 1,2. Who is the User? End Users Application Programmers System Programmers Administrators.
UNIX Chapter 01 Overview of Operating Systems Mr. Mohammad A. Smirat.
1 Introduction Chapter What is an operating system 1.2 History of operating systems 1.3 The operating system zoo 1.4 Computer hardware review 1.5.
1 CS 333 Introduction to Operating Systems Class 2 – OS-Related Hardware & Software The Process Concept Jonathan Walpole Computer Science Portland State.
Introduction Operating Systems’ Concepts and Structure Lecture 1 ~ Spring, 2008 ~ Spring, 2008TUCN. Operating Systems. Lecture 1.
Slide 6-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 6.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Operating System Organization.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Operating System A program that controls the execution of application programs An interface between applications and hardware 1.
Introduction and Overview Questions answered in this lecture: What is an operating system? How have operating systems evolved? Why study operating systems?
Operating Systems.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 1 Introduction Read:
CS 1308 Computer Literacy and the Internet. Introduction  Von Neumann computer  “Naked machine”  Hardware without any helpful user-oriented features.
OS provide a user-friendly environment and manage resources of the computer system. Operating systems manage: –Processes –Memory –Storage –I/O subsystem.
Introduction to Operating Systems Chapter 1. cs431 -cotter2 Lecture Objectives Understand the relationship between computing hardware, operating system,
Chapter 1 Introduction 1.1 What is an operating system
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview Part 2: History (continued)
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
Chapter 1: Introduction and History  Where does the operating system fit in a computing system?  What does the operating system achieve?  What are the.
Operating System Structure A key concept of operating systems is multiprogramming. –Goal of multiprogramming is to efficiently utilize all of the computing.
CIS250 OPERATING SYSTEMS Chapter One Introduction.
Chapter 1 Introduction  What is an operating system  History of operating systems  The operating system zoo  Computer hardware review  Operating system.
What is a Process ? A program in execution.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Chapter 2 Operating System Overview Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William.
1 OPERATING SYSTEMS. 2 CONTENTS 1.What is an Operating System? 2.OS Functions 3.OS Services 4.Structure of OS 5.Evolution of OS.
Principles of Operating Systems Abhishek Dubey Daniel Balasubramanian Fall 2014 Slides Based On Power points and book material from William Stallings.
Introduction to Operating Systems Concepts
Virtual Machine Monitors
Chapter 1: Introduction
Chapter 1: Introduction
Operating System.
Chapter 1: Introduction
Chapter 1: Introduction
Process Management Presented By Aditya Gupta Assistant Professor
Operating Systems: A Modern Perspective, Chapter 6
Operating Systems Georgios Varsamopoulos
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Mid Term review CSC345.
Chapter 1: Introduction
Introduction to Operating Systems
Language Processors Application Domain – ideas concerning the behavior of a software. Execution Domain – Ideas implemented in Computer System. Semantic.
Introduction to Operating Systems
Chapter 1: Introduction
Chapter 1: Introduction
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
Operating Systems: A Modern Perspective, Chapter 3
Chapter 1: Introduction
Implementing Processes, Threads, and Resources
Processes in Unix and Windows
CS510 Operating System Foundations
Chapter 1: Introduction
Chapter 2 Operating System Overview
Introduction to Operating Systems
Chapter 1: Introduction
Introduction and History
Introduction and Overview
Presentation transcript:

10/2/20161 Operating Systems Design (CS 423) Elsa L Gunter 2112 SC, UIUC Based on slides by Roy Campbell, Sam King, and Andrew S Tanenbaum

History of Operating Systems Two major forces in OS history Equipment was very expensive, steadily becoming cheaper People viewed as increasingly expensive Systems, including OS growing steadily in complexity Original OS Structure Simple, library of services, single “thread” operation Gave poor utilization of system 10/2/20162

Mainframes and Single Operator Computers Three groups interacted with computers Computer designers / developers configure computers for specific application Operators collects program, runs it on the computer, collects output and returns it to the user Programmers write programs, submits it to the operator, waits for output, looks for errors, repeat Wastes both computer and human time 10/2/20163

Batch Computers Decouple Input, Execution, Output One device reads in a collection of programs Second device (main computer) executes program batch and outputs results to a “relatively fast” storage (magnetic tape) Third device outputs results from tape to line feeder (basically a dot matrix printer) Allows for parallel processing of input, execution, output Executing multiple programs; protection starts to become an issue 10/2/20164

Main Time Sharing Allow multiple humans to interact at the same time Main Idea: Human are very slow I/O Switch / interleave other activities while waiting for human OS much more complicated Multiple sources of input Multiple jobs running in the same time interval Protection needs much more serious 10/2/20165

Personal Computers Computer hardware much much cheaper Single user Simple single threaded OS, basically library routines No time sharing between jobs Wait for printer No protection Gradually migrated to full multi-user OS 10/2/20166

Today’s Computer Everywhere – microwaves, sewing machines, washing machines, cars … Single User computers: Cell phones, gaming devices, TiVo. Etc Many start with modern complex OS (eg Linux) 10/2/20167

Common Modern OS Architecture 10/2/20168 Applications Libraries (e.g. C runtime) Machine Dependant Layer Portable OS Layer User Mode Kernel Mode

Common Modern OS Architecture 10/2/20169 Applications Libraries (e.g. C runtime) Machine Dependant Layer Portable OS Layer Typical System/User Interaction

Common Modern OS Architecture 10/2/ Applications Libraries (e.g. C runtime) Machine Dependant Layer Portable OS Layer Shared Libraries

Common Modern OS Architecture 10/2/ Applications Libraries (e.g. C runtime) Machine Dependant Layer Portable OS Layer High-level OS Abstractions (eg File System, Processes)

Common Modern OS Architecture 10/2/ Applications Libraries (e.g. C runtime) Machine Dependant Layer Portable OS Layer Low-level (eg process switching, register management)

Common Modern OS Architecture OS developer need to be paranoid Application software buggy Hardware unreliable Users untrustworthy (naïve / malicious) OS developer need to be engineers More is better Use as much memory as possible Faster is better Indirections take time, users don’t like to wait 10/2/201613

Monolithic OS Architecture 10/2/ Applications Libraries (e.g. C runtime) Machine Dependant Layer Portable OS Layer User Mode Kernel Mode

Alternative: Microkernel Architecture Protection: How much, what cost? Windows NT, Mac OS X microkernel origins More common on embedded systems 10/2/ Microkernel Client Process Process Server File Server … Memory Server

Alternative: Virtual Machine Monitors VMM like microkernel with simple interface Performance? VMM – Microkernel distinction increasing blurred 10/2/ Operating System Virtual Machine Monitor Hardware Identical interfaces

Abstractions and Interfaces Key Abstractions: file system and process Key Interface: system call Example: read(fd, buffer, nbytes) 10/2/201617

Unix System Calls Process management: fork, exec, wait File handling open, read, write, close File namespace readdir, link, unlink, rename 10/2/201618

Implement a Shell Basic behavior Wait for input; parse it to get command Create child process; wait for it to return Repeat Tools to use: fork(): makes two processes with same code; returns new pid (of child) to parent, 0 to child exec(argv): replace current process with argv wait(pid): wait for process with pid to return 10/2/201619

Implement a Shell while(1) { user_input = display_prompt(); parse_input(user_input,&argv); } 10/2/201620

Implement a Shell (approximation) while(1) { user_input = display_prompt(); parse_input(user_input,&argv); pid = fork(); if (pid == 0) //child process {exec(argv)} else {wait(pid)} //parent } 10/2/201621

Process Illusion Illusion: infinite number of processes, exclusive access to CPU, exclusive access to infinite memory Reality: fixed process table sizes, shared CPUs, finite shared memory Can break illusion: create a process that creates a process that creates a process … Will lock up your system, may need to reboot 10/2/201622

Fork bomb How can we fix this? What price do we pay for the fix? Is it worth it to fix it? Two perspectives: Math and engineering 10/2/201623

Why Processes? Heart of modern (multiprocess) OS a) Multiprogramming of four programs. b) Conceptual model of four independent, sequential processes. c) Only one program is active at once. 10/2/201624

Approx Implementation of Processes Scheduler interleaves processes, preserving their state Abstraction: sequential processes on dedicated CPU 10/2/ Scheduler P(1) P(2)... P(n-1) P(n)

Process States As a process executes, it changes state new: Process being created ready: Process waiting to run running: Instructions are executed waiting: Process waiting for some event to occur terminated: Process finished execution 10/2/201626