Chapter 1 and 2 Computer System and Operating System Overview

Slides:



Advertisements
Similar presentations
Chapter 2 Operating System Overview Operating Systems: Internals and Design Principles, 6/E William Stallings.
Advertisements

Computer System Overview
CS 345 Computer System Overview
Informationsteknologi Thursday, September 6, 2007Computer Systems/Operating Systems - Class 21 Today’s class Finish computer system overview Review of.
Chapter 1 Computer System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Lecture 1: History of Operating System
1 Lecture 2: Review of Computer Organization Operating System Spring 2007.
1 School of Computing Science Simon Fraser University CMPT 300: Operating Systems I Dr. Mohamed Hefeeda.
1: Operating Systems Overview
Computer System Overview
1 Computer System Overview OS-1 Course AA
1 CSIT431 Introduction to Operating Systems Welcome to CSIT431 Introduction to Operating Systems In this course we learn about the design and structure.
Computer System Overview
Chapter 1 and 2 Computer System and Operating System Overview
Computer Organization and Architecture
Computer System Overview Chapter 1. Basic computer structure CPU Memory memory bus I/O bus diskNet interface.
Rensselaer Polytechnic Institute CSC 432 – Operating Systems David Goldschmidt, Ph.D.
1 Computer System Overview Chapter 1 Review of basic hardware concepts.
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Operating System Overview
Operating System A program that controls the execution of application programs An interface between applications and hardware 1.
Operating System Overview Dr. Sunny Jeong & Mr. M.H. Park Operating Systems: Internals and Design Principles, 6/E William Stallings.
Operating Systems.  Operating System Support Operating System Support  OS As User/Computer Interface OS As User/Computer Interface  OS As Resource.
Chapter 1 Computer System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
LOGO OPERATING SYSTEM Dalia AL-Dabbagh
Computer Systems Overview. Page 2 W. Stallings: Operating Systems: Internals and Design, ©2001 Operating System Exploits the hardware resources of one.
1 Computer System Overview Chapter 1. 2 n An Operating System makes the computing power available to users by controlling the hardware n Let us review.
Computer System Overview Chapter 1. Operating System Exploits the hardware resources of one or more processors Provides a set of services to system users.
Chapter 1 Computer System Overview Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William.
Chapter 1 Computer System Overview
Fall 2000M.B. Ibáñez Lecture 01 Introduction What is an Operating System? The Evolution of Operating Systems Course Outline.
Chapter 5 Operating System Support. Outline Operating system - Objective and function - types of OS Scheduling - Long term scheduling - Medium term scheduling.
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.
Operating Systems and Networks AE4B33OSS Introduction.
Operating Systems Lecture 02: Computer System Overview Anda Iamnitchi
Chapter 1 Computer System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Ihr Logo Operating Systems Internals & Design Principles Fifth Edition William Stallings Chapter 1 Computer System Overview.
COMPUTER SYSTEM OVERVIEW. Operating Systems: Internals and Design Principles “No artifact designed by man is so convenient for this kind of functional.
Operating systems, lecture 4 Team Viewer Tom Mikael Larsen, Thursdays in D A look at assignment 1 Brief rehearsal from lecture 3 More about.
Operating Systems David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 432.
COMPUTER SYSTEM OVERVIEW
Operating System Isfahan University of Technology Note: most of the slides used in this course are derived from those of the textbook (see slide 4)
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 4 Computer Systems Review.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Lecture 1: Review of Computer Organization
Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower than CPU.
Faculty of Sciences and Social Sciences HOPE Chapter 2 Operating System Overview Stewart Blakeway FML
1 Computer Architecture. 2 Basic Elements Processor Main Memory –volatile –referred to as real memory or primary memory I/O modules –secondary memory.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
CISC 3595 Operating Systems Introduction Tuesday / Friday 10:00-11:15am X. Zhang.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview: Using Hardware.
Chapter 1 Computer System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Copyright Prentice Hall, Inc. 1 Operating System Overview.
Computer Systems Overview. Lecture 1/Page 2AE4B33OSS W. Stallings: Operating Systems: Internals and Design, ©2001 Operating System Exploits the hardware.
Operating systems, Lecture 1 Microsoft Windows –Windows 7 –Windows 8 –Windows RT UNIX –Linux –IOS –Android.
Chapter 2 Operating System Overview Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William.
1 Computer System Overview Chapter 1. 2 Operating System Exploits the hardware resources of one or more processors Provides a set of services to system.
Operating System Overview
Computer System Overview
Chapter 1 Computer System Overview
Interrupts.
Introduction to Operating System (OS)
Operating Systems.
Chapter 1 Computer System Overview
Chapter 2 Operating System Overview
Operating System Overview
Presentation transcript:

Chapter 1 and 2 Computer System and Operating System Overview The Evolution of Operating Systems OS Objectives and Functions Instruction Execution Interrupts The Memory Hierarchy Cache Memory I/O Communication Techniques

Evolution of Operating Systems It may be easier to understand the key requirements of an OS by considering the evolution of Operating Systems Stages include Serial Processing Simple Batch Systems Multiprogrammed Batch Systems Time Sharing Systems 2

Serial Processing (late 1940s to mid-1950s) No operating system Machines run from a console with display lights, toggle switches, input device, and printer Problems include: Scheduling using a hardcopy sign-up sheet Setup time loading complier and source program into memory saving the object program loading and linking object program and common functions 3

Simple Batch System (mid-1950s) Early computers were extremely expensive Important to maximize processor utilization Monitor Software that controls the sequence of events Batch jobs together Program returns control to monitor when finished 4

Monitor’s perspective Monitor controls the sequence of events Resident Monitor is software always in memory Monitor reads in job and gives control Job returns control to monitor 5

Multiprogrammed Batch Systems CPU is often idle Even with automatic job sequencing. I/O devices are slow compared to processor 6

Uniprogramming Processor must wait for I/O instruction to complete before preceding 7

Multiprogramming When one job needs to wait for I/O, the processor can switch to the other job 8

Multiprogramming 9

Time Sharing Systems (early 1960s) Using multiprogramming to handle multiple interactive jobs Processor’s time is shared among multiple users Multiple users simultaneously access the system through terminals 10

Batch Multiprogramming vs. Time Sharing 11

Early Example: CTSS Compatible Time-Sharing System (CTSS) Developed at MIT as project MAC Time Slicing: When control was passed to a user User program and data loaded Clock generates interrupts about every 0.2 sec At each interrupt OS gained control and could assign processor to another user 12

CTSS Operation 13

Roadmap OS Objectives and Functions The Evolution of Operating Systems Instruction Execution Interrupts The Memory Hierarchy Cache Memory I/O Communication Techniques 14

Operating System A program that controls the execution of application programs An interface between applications and hardware Main objectives of an OS: Convenience Efficiency Ability to evolve 15

Layers and Views 16

OS as Service Provider Program development Program execution e.g., editors and debuggers Program execution Access I/O devices Controlled access to files System access for shared systems Error detection and response e.g., memory error, device failure, division by zero Accounting for resources and performance monitoring 17

OS as Resource Manager A computer is a set of resources for the movement, storage, and processing of data. The OS is responsible for managing these resources.

OS as Resource Manager 19

Roadmap Instruction Execution The Evolution of Operating Systems OS Objectives and Functions Instruction Execution Interrupts The Memory Hierarchy Cache Memory I/O Communication Techniques

Instruction Execution A program consists of a set of instructions stored in memory Two steps Processor reads (fetches) instructions from memory Processor executes each instruction

Example of Program Execution

Roadmap Interrupts The Evolution of Operating Systems OS Objectives and Functions Instruction Execution Interrupts The Memory Hierarchy Cache Memory I/O Communication Techniques

Interrupts Interrupt the normal sequencing of the processor Provided to improve processor utilization Most I/O devices are slower than the processor Processor must pause to wait for device

Flow of Control without Interrupts

Interrupts and the Instruction Cycle

Transfer of Control via Interrupts

Instruction Cycle with Interrupts

I/O Wait

Simple Interrupt Processing

Changes in Memory and Registers for an Interrupt

Multiprogramming Processor has more than one program to execute The sequence the programs are executed depend on their relative priority and whether they are waiting for I/O After an interrupt handler completes, control may not return to the program that was executing at the time of the interrupt

Roadmap The Memory Hierarchy The Evolution of Operating Systems OS Objectives and Functions Instruction Execution Interrupts The Memory Hierarchy Cache Memory I/O Communication Techniques

Memory Hierarchy Major constraints in memory Amount Speed Expense Faster access time, greater cost per bit Greater capacity, smaller cost per bit Greater capacity, slower access speed

The Memory Hierarchy Going down the hierarchy Decreasing cost per bit Increasing capacity Increasing access time Decreasing frequency of access to the memory by the processor

Secondary Memory Auxiliary memory External Nonvolatile Used to store program and data files

Roadmap Cache Memory The Evolution of Operating Systems OS Objectives and Functions Instruction Execution Interrupts The Memory Hierarchy Cache Memory I/O Communication Techniques

Cache Memory Processor must access memory at least once per instruction cycle Processor speed faster than memory access speed Exploit the principle of locality with a small fast memory Data which is required soon is often close to the current data. If data is referenced, then it’s neighbour might be needed soon.

Cache Principles Contains copy of a portion of main memory Processor first checks cache If not found, block of memory read into cache Because of locality of reference, likely future memory references are in that block

Cache/Main-Memory Structure 40

Cache Read Operation

Cache Design Issues Main categories are: Cache size Block size Mapping function Replacement algorithm Write policy

Size issues Cache size Block size Small caches have significant impact on performance Block size The unit of data exchanged between cache and main memory Larger block size means more hits But too large reduces chance of reuse.

Mapping function Determines which cache location the block will occupy Two constraints: When one block read in, another may need replaced Complexity of mapping function increases circuitry costs for searching.

Replacement Algorithm Chooses which block to replace when a new block is to be loaded into the cache. Ideally replacing a block that isn’t likely to be needed again Impossible to guarantee Effective strategy is to replace a block that has been used less than others Least Recently Used (LRU)

Write policy Dictates when the memory write operation takes place Can occur every time the block is updated Can occur when the block is replaced Minimize write operations Leave main memory in an obsolete state

Roadmap I/O Communication Techniques The Evolution of Operating Systems OS Objectives and Functions Instruction Execution Interrupts The Memory Hierarchy Cache Memory I/O Communication Techniques

I/O Techniques When the processor encounters an instruction relating to I/O, it executes that instruction by issuing a command to the appropriate I/O module. Three techniques are possible for I/O operations: Programmed I/O Interrupt-driven I/O Direct memory access (DMA)

Programmed I/O The I/O module performs the requested action then sets the appropriate bits in the I/O status register but takes no further action to alert the processor. As there are no interrupts, the processor must determine when the instruction is complete

Programmed I/O Example Data read in a word at a time Processor remains in status-checking loop while reading

Interrupt-Driven I/O Processor issues an I/O command to a module and then goes on to do some other useful work. The I/O module will then interrupt the processor to request service when it is ready to exchange data with the processor.

Interrupt- Driven I/O Eliminates needless waiting But everything passes through processor.

Direct Memory Access Performed by a separate module on the system When needing to read/write, processor issues a command to DMA module with: Whether a read or write is requested The address of the I/O device involved The starting location in memory to read/write The number of words to be read/written

Direct Memory Access I/O operation delegated to DMA module Processor only involved when beginning and ending transfer. Much more efficient.