Operating System Overview

Slides:



Advertisements
Similar presentations
OPERATING SYSTEMS Lecturer: Szabolcs Mikulas Office: B38B
Advertisements

Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc
Winter 2005 CMPE 151: Network Administration Lecture 2.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
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.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 1 Introduction Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
Figure 1.1 Interaction between applications and the operating system.
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.
Introduction Operating Systems’ Concepts and Structure Lecture 1 ~ Spring, 2008 ~ Spring, 2008TUCN. Operating Systems. Lecture 1.
Chapter 1 Introduction 1.1 What is an operating system
1 What is an operating system? CSC330Patricia Van Hise.
Copyright ©: Nahrstedt, Angrave, Abdelzaher
CS 6560 Operating System Design Lecture 1. Overview 1.1 What is an operating system 1.2 History of operating systems 1.3 The operating system zoo 1.4.
CS Fall 2011 CS 423 – Operating Systems Design Lecture 2 – Concepts Review Klara Nahrstedt Fall 2011.
Introduction to Operating Systems Chapter 1. cs431 -cotter2 Lecture Objectives Understand the relationship between computing hardware, operating system,
1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Chapter 1 Introduction 1.1 What is an operating system
ITEC 502 컴퓨터 시스템 및 실습 Chapter 1: Introduction. ITEC 502 컴퓨터 시스템 및 실습 Chapter 1: Introduction Mi-Jung Choi DPNM Lab. Dept. of CSE,
1 Instructor :Erdal Kose Office hours: Tuesday 9:00-9:30 pm. Mail box : 2109 Ingersoll Hall (Erdal ) Web site :
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.
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: Phone:
1 Introduction. 2 A computer system consists of –hardware –system programs –application programs.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 1 Introduction Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc.
Operating Systems Lecture 7 OS Potpourri Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing Liu School of Software.
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.
Background: Operating Systems Brad Karp UCL Computer Science CS GZ03 / M th November, 2008.
1 Operating Systems: Principles and Practice Cpr E 308.
Copyright ©: University of Illinois CS 241 Staff1 Operating Systems Orientation.
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
Concurrency, Processes, and System calls Benefits and issues of concurrency The basic concept of process System calls.
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.
Copyright ©: Nahrstedt, Angrave, Abdelzaher1 Operating System Overview Tarek Abdelzaher Lawrence Angrave Vikram Adve.
Chapter 1 Introduction  What is an operating system  History of operating systems  The operating system zoo  Computer hardware review  Operating system.
操作系统原理 OPERATING SYSTEM Chapter 1 Introduction 概 述.
L ECTURE -6 Topics: Introduction to Operating system. Functions of an Operating system. Classification of Operating systems.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
OS HISTORY Module 1.3 Richard Newman University of Florida.
CIT 140: Introduction to ITSlide #1 CSC 140: Introduction to IT Operating Systems.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 4: Threads.
Multiprogramming. Readings r Chapter 2.1 of the textbook.
Introduction to Operating Systems Concepts
Lecture 3: Basic OS Concepts
Introduction to Kernel
Processes and threads.
Chapter 1: A Tour of Computer Systems
Evolution of Operating Systems
Chapter 2 Processes and Threads Today 2.1 Processes 2.2 Threads
CS 286 Computer Organization and Architecture
CS703 - Advanced Operating Systems
Chapter 1: Introduction
Chapter 4: Threads.
Lecture 2: Hardware Review
Computer Science I CSC 135.
MODERN OPERATING SYSTEMS Third Edition ANDREW S
CGS 3763 Operating Systems Concepts Spring 2013
CS703 - Advanced Operating Systems
Lecture Topics: 11/1 General Operating System Concepts Processes
Introduction to Operating Systems
Computer Organization
Introduction to Operating Systems
Lecture 2: Hardware Review
Lecture 3: Basic OS Concepts
Prof. Leonardo Mostarda University of Camerino
Operating System Introduction
Operating Systems Principles Lecture 1: Introduction
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment. Phone:
Introduction and Overview
Presentation transcript:

Operating System Overview Tarek Abdelzaher Lawrence Angrave Vikram Adve Copyright ©: Nahrstedt, Angrave, Abdelzaher

Today’s Objectives By the end of the hour you should be able to: Copyright ©: Nahrstedt, Angrave, Abdelzaher Today’s Objectives By the end of the hour you should be able to: Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental machine concepts such as: Instruction processing, Memory hierarchy, Interrupts, and I/O Explain fundamental OS concepts such as: System calls, processes, synchronization, Files Explain the POSIX standard (UNIX specification)

Copyright ©: Nahrstedt, Angrave, Abdelzaher Today’s Applications Application Software Browser Second Life Yahoo Chat Client Pop Mail Hardware Network

Application Requirements Copyright ©: Nahrstedt, Angrave, Abdelzaher Application Requirements Application Software Browser Second Life Yahoo Chat Client Pop Mail Store Read/write Display Print Send/receive Hardware Network

Application Requirements Copyright ©: Nahrstedt, Angrave, Abdelzaher Application Requirements Application Software Browser Second Life Yahoo Chat Client Pop Mail Store Read/write Display Print Store Read/write Display Print Send/receive Send/receive Hardware Network

Application Requirements Copyright ©: Nahrstedt, Angrave, Abdelzaher Application Requirements Application Software Browser Second Life Yahoo Chat Client Pop Mail Store Read/write Display Print Print Store Store Send/receive Read/write Display Print Display Send/receive Send/receive Read/write Hardware Network

Application Requirements Copyright ©: Nahrstedt, Angrave, Abdelzaher Application Requirements Application Software Browser Second Life Yahoo Chat Client Pop Mail Read/write Store Display Print Store Print Store Store Send/receive Send/receive Read/write Display Print Display Send/receive Send/receive Display Read/write Read/write Print Hardware Network

Delegate Common Functions? Copyright ©: Nahrstedt, Angrave, Abdelzaher Delegate Common Functions? Application Software Browser Second Life Yahoo Chat Client Pop Mail Read/write Store Display Print Store Print Store Store Send/receive Send/receive Read/write Display Print Display Send/receive Send/receive Display Read/write Read/write Print Hardware Network

Delegate Common Functions to an Operating System Copyright ©: Nahrstedt, Angrave, Abdelzaher Delegate Common Functions to an Operating System Application Software Web Server Second Life Yahoo Chat Pop Mail Operating System Read/Write Standard Output Device Control File System Communication Hardware Network

OS Exports a Virtual Machine Interface Copyright ©: Nahrstedt, Angrave, Abdelzaher OS Exports a Virtual Machine Interface Application Software Web Server Second Life Yahoo Chat Pop Mail Standard Operating System Interface (Virtual Machine) Operating System Read/Write Standard Output Device Control File System Communication Hardware Network

Increase Portability = Minimize Machine-Specific Code Copyright ©: Nahrstedt, Angrave, Abdelzaher Increase Portability = Minimize Machine-Specific Code Application Software Web Server Second Life Yahoo Chat Pop Mail Standard Operating System Interface (Virtual Machine) Operating System (machine independent part) Read/Write Standard Output Device Control File System Communication Machine specific part Hardware Network

Increase Portability = Minimize Machine-Specific Code Copyright ©: Nahrstedt, Angrave, Abdelzaher Increase Portability = Minimize Machine-Specific Code Application Software Web Server Second Life Yahoo Chat Pop Mail Standard Operating System Interface (Virtual Machine) Operating System (machine independent part) Portable Read/Write Standard Output Device Control File System Communication Machine specific part Hardware Network

OS Runs on Multiple Platforms while Presenting same Interface Copyright ©: Nahrstedt, Angrave, Abdelzaher OS Runs on Multiple Platforms while Presenting same Interface Application Software Web Server Second Life Yahoo Chat Pop Mail Standard Operating System Interface (Virtual Machine) Operating System (machine independent part) Portable Read/Write Standard Output Device Control File System Communication

OS Runs on Multiple Platforms while Presenting same Interface Copyright ©: Nahrstedt, Angrave, Abdelzaher OS Runs on Multiple Platforms while Presenting same Interface Application Software Web Server Second Life Yahoo Chat Pop Mail Standard Operating System Interface (Virtual Machine) Operating System (machine independent part) Portable Read/Write Standard Output Device Control File System Communication Machine specific part Hardware Network

POSIX – The UNIX Interface Standard Copyright ©: Nahrstedt, Angrave, Abdelzaher POSIX – The UNIX Interface Standard Application Software Web Server Second Life Yahoo Chat Pop Mail The POSIX Standard Specifies UNIX Interface Operating System (machine independent part) Portable Read/Write Standard Output Device Control File System Communication Machine specific part Hardware Network

A peek into Unix Application Libraries User space/level Copyright ©: Nahrstedt, Angrave, Abdelzaher A peek into Unix Application Libraries User space/level Kernel space/level Portable OS Layer Machine-dependent layer User/kernel modes are supported by hardware Some systems do not have clear user-kernel boundary

Unix: Application Application (E.g., emacs) Libraries Copyright ©: Nahrstedt, Angrave, Abdelzaher Unix: Application Application (E.g., emacs) Written by programmer Compiled by programmer Uses function calls Libraries Portable OS Layer Machine-dependent layer

Unix: Libraries Application Libraries (e.g., stdio.h) Copyright ©: Nahrstedt, Angrave, Abdelzaher Unix: Libraries Application Provided pre-compiled Defined in headers Input to linker (compiler) Invoked like functions Libraries (e.g., stdio.h) Portable OS Layer Machine-dependent layer

Typical Unix OS Structure Copyright ©: Nahrstedt, Angrave, Abdelzaher Typical Unix OS Structure Application Libraries Machine-dependent layer Portable OS Layer system calls (read, open..) All “high-level” code

Typical Unix OS Structure Copyright ©: Nahrstedt, Angrave, Abdelzaher Typical Unix OS Structure Application Bootstrap System initialization Interrupt and exception I/O device driver Memory management Kernel/user mode switching Processor management Libraries Portable OS Layer Machine-dependent layer

Summary: What is an Operating System? Copyright ©: Nahrstedt, Angrave, Abdelzaher Summary: What is an Operating System? It is an extended machine Hides the messy details which must be performed Presents user with a virtual machine, easier to use It is a resource manager Each program gets time with the resource Each program gets space on the resource

History of Operating Systems Copyright ©: Nahrstedt, Angrave, Abdelzaher History of Operating Systems Early systems bring cards to 1401 read cards to tape put tape on 7094 which does computing put tape on 1401 which prints output Batch  Multiprogramming  Time sharing  Personal

History of Operating Systems Copyright ©: Nahrstedt, Angrave, Abdelzaher History of Operating Systems Structure of a typical job – 2nd generation

History of Operating Systems Copyright ©: Nahrstedt, Angrave, Abdelzaher History of Operating Systems Multiprogramming/timesharing system three jobs in memory – 3rd generation

History of Operating Systems Copyright ©: Nahrstedt, Angrave, Abdelzaher History of Operating Systems Memory Management Process Management Multiprogramming/timesharing system three jobs in memory – 3rd generation

History of Computer Generations Copyright ©: Nahrstedt, Angrave, Abdelzaher History of Computer Generations First generation 1945 – 1955 vacuum tubes, plug boards Second generation 1955 - 1965 transistors, batch systems Third generation 1965 – 1980 ICs and multiprogramming Fourth generation 1980 – present personal computers

Computer Hardware Review Copyright ©: Nahrstedt, Angrave, Abdelzaher Computer Hardware Review Bus Components of a simple personal computer

Computer Hardware Review Copyright ©: Nahrstedt, Angrave, Abdelzaher Computer Hardware Review CPU Bus Components of a simple personal computer

Copyright ©: Nahrstedt, Angrave, Abdelzaher CPU Fetch instruction from code memory Fetch operands from data memory Perform operation (and store result) Go to next instruction

Copyright ©: Nahrstedt, Angrave, Abdelzaher CPU Registers Fetch instruction from code memory Fetch operands from data memory Perform operation (and store result) Go to next instruction Note: CPU must maintain certain state Current instructions to fetch (program counter) Location of code memory segment Location of data memory segment

Copyright ©: Nahrstedt, Angrave, Abdelzaher CPU Register Examples Hold instruction operands Point to start of Code segment Data segment Stack segment Point to current position of Instruction pointer Stack pointer

Code Layout for Process Copyright ©: Nahrstedt, Angrave, Abdelzaher Code Layout for Process Processes have three segments: text, data, stack

Copyright ©: Nahrstedt, Angrave, Abdelzaher Memory Hierarchy Typical memory hierarchy numbers shown are rough approximations (old generation of computers)

Computer Hardware Review Copyright ©: Nahrstedt, Angrave, Abdelzaher Computer Hardware Review CPU Memory Bus Components of a simple personal computer

Computer Hardware Review Copyright ©: Nahrstedt, Angrave, Abdelzaher Computer Hardware Review CPU Memory I/O Devices Bus Components of a simple personal computer

Computer Hardware Review Example I/O Device: Disk Copyright ©: Nahrstedt, Angrave, Abdelzaher Computer Hardware Review Example I/O Device: Disk Structure of a disk drive

Example of modern architecture Copyright ©: Nahrstedt, Angrave, Abdelzaher Example of modern architecture Graphics Processor MPEG Comp. Digital Video Copper Fibre Channel Network Interface Fibre Channel Network Interface IEEE 1394 Discrete IO IO CPU+Multi- Level Cache PCI Bus 0a PCI Bus 1a Shared Memory Ethernet RS-485 PCI Bus 0b PCI Bus 1b System Controller Power PC clocked @ 1000 MHz 64 Bit Wide Memory Bus 256 MB DDR SDRAM Clocked @ 125 MHz 64 Bit PCI-X Clocked @ 100 MHz 32 Bit PCI Clocked @ 66 MHz Clocked @ 33 MHz PCI to PCI Bridge PCI-X to PCI Bridge Port 1 Port 2 Inactive

Interrupts CPU hardware has the interrupt report line that the CPU senses after executing each instruction Why interrupts? Real life analogy for interrupts An alarm sets off when the food/laundry is ready You can do other things in between and handle the event once notified

Operating System Review: Processes Copyright ©: Nahrstedt, Angrave, Abdelzaher Operating System Review: Processes A process tree A created two child processes, B and C B created three child processes, D, E, and F

Copyright ©: Nahrstedt, Angrave, Abdelzaher Context Switching How would you switch CPU execution from one process to another?

Semaphores (synchronization) Copyright ©: Nahrstedt, Angrave, Abdelzaher Semaphores (synchronization) Control access to shared resources (like shared data structures) Prevent race conditions, synchronize access to shared resources. Needed for concurrent programming (we will discuss a lot about this topic)

Copyright ©: Nahrstedt, Angrave, Abdelzaher Why Synchronization? Processes and threads can be preempted at arbitrary times, which may generate problems. Example: What is the execution outcome of the following two threads (initially x=0)? Thread 1: Read X Add 1 Write X Thread 2: Read X Add 1 Write X 42

Copyright ©: Nahrstedt, Angrave, Abdelzaher Why Synchronization? Example: What is the execution outcome of the following two threads (initially x=0)? Depending on the execution order of thread 1 and 2, the outcome can be x=1 or x=2. Thread 1: Read X Add 1 Write X Thread 2: Read X Add 1 Write X 43

Inter-process Communication Copyright ©: Nahrstedt, Angrave, Abdelzaher Inter-process Communication Two processes connected by a pipe