Operating System Overview

Similar documents
COS 318: Operating Systems. Overview. Andy Bavier Computer Science Department Princeton University

COS 318: Operating Systems

COS 318: Operating Systems. Overview. Prof. Margaret Martonosi Computer Science Department Princeton University

9/19/18. COS 318: Operating Systems. Overview. Important Times. Hardware of A Typical Computer. Today CPU. I/O bus. Network

COS 318: Operating Systems. Overview. Jaswinder Pal Singh Computer Science Department Princeton University

OS - Introduction Ezio Bartocci Institute for Computer Engineering

Operating System Review

Operating Systems Overview. Chapter 2

Operating Systems : Overview

Introduction. CS3026 Operating Systems Lecture 01

Protection and System Calls. Otto J. Anshus

OS and Computer Architecture. Chapter 3: Operating-System Structures. Common System Components. Process Management

Introduction and Overview

OPERATING SYSTEMS & Network OVERVIEW. 1: OS & Network Overview

Operating Systems. Lecture Course in Autumn Term 2015 University of Birmingham. Eike Ritter. September 22, 2015

Processes and Non-Preemptive Scheduling. Otto J. Anshus

Lecture 1 Introduction (Chapter 1 of Textbook)

Part I Overview Chapter 1: Introduction

Course Details. Operating Systems with C/C++ Course Details. What is an Operating System?

Operating System Overview. Chapter 2

I/O Systems. Amir H. Payberah. Amirkabir University of Technology (Tehran Polytechnic)

OPERATING SYSTEMS: Lesson 1: Introduction to Operating Systems

Operating Systems. Operating System Structure. Lecture 2 Michael O Boyle

OS structure. Process management. Major OS components. CSE 451: Operating Systems Spring Module 3 Operating System Components and Structure

To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization

Operating System. Operating System Overview. Structure of a Computer System. Structure of a Computer System. Structure of a Computer System

Last class: OS and Architecture. OS and Computer Architecture

Last class: OS and Architecture. Chapter 3: Operating-System Structures. OS and Computer Architecture. Common System Components

Chapter 13: I/O Systems

Computer System Overview

Operating System. Operating System Overview. Layers of Computer System. Operating System Objectives. Services Provided by the Operating System

Operating System Overview. Operating System

Chapter 1: Introduction

Subject: Operating System (BTCOC403) Class: S.Y.B.Tech. (Computer Engineering)

CSC 2405: Computer Systems II

Introduction. What is an Operating System? A Modern Computer System. Computer System Components. What is an Operating System?

Operating Systems: Internals and Design Principles. Chapter 2 Operating System Overview Seventh Edition By William Stallings

Main Points of the Computer Organization and System Software Module

Chapter 3: Operating-System Structures

Announcement. Exercise #2 will be out today. Due date is next Monday

Overview of Operating Systems

Operating-System Structures

Multiprogramming. Evolution of OS. Today. Comp 104: Operating Systems Concepts 28/01/2013. Processes Management Scheduling & Resource Allocation

CPSC/ECE 3220 Fall 2017 Exam Give the definition (note: not the roles) for an operating system as stated in the textbook. (2 pts.

Chapter 2: Operating-System Structures

Module 3: Operating-System Structures. Common System Components

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

Computer-System Architecture (cont.) Symmetrically Constructed Clusters (cont.) Advantages: 1. Greater computational power by running applications

Chapter 13: I/O Systems

Module 3: Operating-System Structures

Chapter 13: I/O Systems

Introduction to Operating Systems. Chapter Chapter

Operating Systems. Introduction & Overview. Outline for today s lecture. Administrivia. ITS 225: Operating Systems. Lecture 1

(MCQZ-CS604 Operating Systems)

Chapter 13: I/O Systems. Operating System Concepts 9 th Edition

OPERATING SYSTEMS UNIT - 1

CS 153 Design of Operating Systems Winter 2016

Chapter 1: Introduction

Preemptive Scheduling and Mutual Exclusion with Hardware Support

Computer Fundamentals : Pradeep K. Sinha& Priti Sinha

Last class: Today: Course administration OS definition, some history. Background on Computer Architecture

Unit 2 : Computer and Operating System Structure

Chapter 12: I/O Systems

Chapter 13: I/O Systems

Chapter 12: I/O Systems. Operating System Concepts Essentials 8 th Edition

CS2506 Quick Revision

Operating System: Chap13 I/O Systems. National Tsing-Hua University 2016, Fall Semester

Chapter 13: I/O Systems

Operating-System Structures

Chapter 1 Computer System Overview

Overview of Operating Systems

Concurrency, Mutual Exclusion and Synchronization C H A P T E R 5

CS370 Operating Systems

Module 11: I/O Systems

I/O. Fall Tore Larsen. Including slides from Pål Halvorsen, Tore Larsen, Kai Li, and Andrew S. Tanenbaum)

I/O. Fall Tore Larsen. Including slides from Pål Halvorsen, Tore Larsen, Kai Li, and Andrew S. Tanenbaum)

Chapter 3: Operating-System Structures

Introduction to Operating Systems. Chapter Chapter

Timers 1 / 46. Jiffies. Potent and Evil Magic

Operating Systems. V. Input / Output

Chapter 3: Operating-System Structures

Operating Systems. studykorner.org

What s the difference between threads/processes. Operating Systems

Computer System Architecture. CMPT 300 Operating Systems I. Summer Segment 3: Computer System Architecture. Melissa O Neill

Chapter 14 Operating Systems

Computer Organization and Structure. Bing-Yu Chen National Taiwan University

CPSC 341 OS & Networks. Introduction. Dr. Yingwu Zhu

UNIX rewritten using C (Dennis Ritchie) UNIX (v7) released (ancestor of most UNIXs).

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Computer Systems Engineering: Spring Quiz I Solutions

Introduction to System Programming

CPS 210: Operating Systems

Introduction to Operating Systems

Chapter 2: Operating-System Structures

Introduction to Operating. Chapter Chapter

CSC 453 Operating Systems

Lecture 15: I/O Devices & Drivers

Operating Systems (Classroom Practice Booklet Solutions)

Operating System Architecture. CS3026 Operating Systems Lecture 03

CS370 Operating Systems

Operating System Services

Transcription:

A Typical Computer from a Hardware Point of View... Operating System Overview Otto J. Anshus Memory Chipset I/O bus (including slides from, Princeton University) University of Tromsø Keyboard Network /OJA A Typical Computer System Typical Unix OS Structure. Memory Programs and data Operating System Software Application Standard library C Assembler...have to Performance Low-level system initialization and bootstrap OS Apps Data Kai /ioja Keyboard Network Portable OS Layer Machine-dependent layer System Call Interface /OJA Fault, trap, interrupt and exception handling Memory management: hardware address translation Low-level kernel/user-mode process context switching I/O device driver and device initialization code

Linux Kernel version 2.0 500,000 lines of C code and 8000 lines of assembler Micro kernel (process & memory management): 5% Device drivers: 90% Network, file systems, initialization, etc.: 5% Memory Address 0-255 byte byte Instructions Data word Intel architecture is little endian Hexadecimal Unix Onion 16 decimal is base 0, 1, 2,,9, A, B, C, D, E, F C4AFh=50351d C*16 3 + 4*16 2 +A*16 1+ F*16 0 12*16 3 + 4*16 2 +10*16 1+ 15*16 0 = 50351d 2 8-1=11111111b =255d =FFh 2 16-1=1111111111111111b =65535d =FFFFh 2 32-1=1111111111111111 1b =4294967295d =FFFFFFFFh Applications Operating system Device Hardware drivers User Level - Kernel Level Boundary

User level vs. Kernel level Kernel (a.k.a. supervisory or privileged) level All instructions are available Total control possible so OS must say Mine, all mine (Daffy Duck) User level Some instructions are not available any more Programs can be modified and substituted by user Check it out: User vs. Kernel Level on Windows NT Start the PerfMon (start->administrative tools) add %user time and %privileged time Move the mouse around %pt spikes Grab the perf mon window and move it around %pt peaks In theory, but not always in practice The Service Model OS Service Examples Request Reply A.k.a. the client/server model Model of interaction Used in both centralized and distributed systems Client can be Server and vice versa Examples that are not provided at user level File open, close, read and write Control the, or a single user takes over by doing while ( 1 ) ; Protection: Keep user programs from crashing OS Keep user programs from crashing each other Examples that can be provided at user level Read time of the day Protected user level stuff Procedure Calls, System Calls, Traps, Interrupts, Shared Variables, or Message Passing /OJA

OS Responsibilities (1) Job control Start, stop, kill User interface Job Control Language (JCL) Interpretation Window system Error handling Protection I/O handling Interrupt handling Hardware Software Part of the OS? Discussion topic: Window System part of the OS (1)? Yes: Windows NT Window Manager runs in Kernel Mode Integrated with Graphic Device Drivers Can not easily use several file systems at the same time or use another FS than NTFS Performance benefit No: Unix X runs in User mode Flexibility and openness More overhead Discussion topic: Window System part of the OS (2)? Solution space: All in Kernel All at user level Must protect the display device or chaos possible Split between Kernel and User level Display drivers in Kernel Rest at User level OS Responsibilities Resource Control Sharing Scheduling Memory (Registers, cache, memory (main, remote, disk) I/O (network, interconnect, busses) Multi access Accounting

OS Characteristics OS Characteristics Concurrency Switching between tasks Mutual exclusion Condition synchronization Sharing Allocation of resources Concurrent access to data and other resources Concurrent program execution Protection of all resources including data and programs Single process- single user Single process - Multi user? Multi process - Single user Multi process - Multi user Efficiency Overhead (low) OS resource use (low) idle time (low) Throughput (high) Response time (short) Fairness (yes, but what if not?) Reliability Error isolation Graceful degradation Multiprogramming High & Long Low and Short Starvation History: waiting for I/O Processor Management Assume 1200 card program :-) The assembler speed: 300 cards/sec Card reader: 20 cards/sec Observations 60 seconds to read program to memory runs the assembler for 4 seconds Implication is idle for 56 seconds = 93.3% of the time utilization is 6.7% and I/O device alternates, no overlap or interleaving Goals Overlap between I/O and computation Time sharing Multiple allocations Issues Do not waste resources Synchronization and mutual exclusion Fairness and deadlock free I/O I/O I/O

Memory Management Registers and memory Goals Support programs to run Register Allocation and management Transfers from and to L2 10x secondary storage Memory 200x Issues Efficiency & convenience Disk 10Mx Fairness Protection Tape 100Mx System-level Registers I/O Device Management Goals Interactions between devices and applications Ability to plug in new devices Issues Efficiency Fairness Protection and sharing User 1 Driver I/O device... Library support... User n Driver I/O device

OS Characteristics File System Storing of data and programs Simple and fast access Protection against programs failures intentional Protection against system failures intentional Non-deterministic Time independence Part of the OS? User vs. Kernel Level? A typical file system Open a file with authentication Read/write data in files Close a file Can the services be moved to user level? User 1... User n File system services File... File Discussion topic: User level FS? OS Characteristics (4) Yes: Minix FS as a server at user level almost a user process......but booted together with OS and never terminates and gets higher priority and a new server means recompiling the kernel disk drivers at Kernel level NO: Unix and Windows NT File system at Kernel level Management Simple Modular Well defined interfaces Good documentation Small size Simpler Less bugs Cheaper Faster

Discussion topic: Network boot Ways to Develop An Operating System Need netboot code in EPROM Netboot must Understand the network protocols (Ethernet, TCP/IP, something) download boot code from a server execute boot code to download OS Issues Client must have name of server and of self Server must have a database of clients Security, Protection, Restrictions A hardware simulator A virtual machine A good kernel debugger When OS crashes, always goes to the debugger Debugging over the network