Chapter 1 Computer System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,

Slides:



Advertisements
Similar presentations
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Advertisements

Computer Systems Lecturer: Szabolcs Mikulas
Computer Systems Lecturer: Szabolcs Mikulas Office: B38B
Computer Organization and Architecture
Chapter 1 Computer System Overview
Computer System Overview
Computer Organization and Architecture
Computer Organization and Architecture
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,
1 Lecture 2: Review of Computer Organization Operating System Spring 2007.
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
Adapted from slides ©2005 Silberschatz, Galvin, and Gagne and Stallings Lecture 2: Computer Systems Overview.
Chapter 1 and 2 Computer System and Operating System Overview
Operating Systems Béat Hirsbrunner Main Reference: William Stallings, Operating Systems: Internals and Design Principles, 6 th Edition, Prentice Hall 2009.
Computer System Overview Chapter 1. Basic computer structure CPU Memory memory bus I/O bus diskNet interface.
1 Computer System Overview Chapter 1 Review of basic hardware concepts.
COSC 4P13 Operating Systems : Design and Implementation.
1 Computer System Overview Let’s figure out what’s inside this thing...
Chapter 3 Process Description and Control Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
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.
Chapter 3 Process Description and Control Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
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
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
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 Lecture No. 2. Basic Elements  At a top level, a computer consists of a processor, memory and I/ O Components.  These components are.
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)
Operating System 1 COMPUTER SYSTEM OVERVIEW Achmad Arwan, S.Kom.
Stored Program A stored-program digital computer is one that keeps its programmed instructions, as well as its data, in read-write,
COMPUTER ORGANIZATION AND ASSEMBLY LANGUAGE Lecture 21 & 22 Processor Organization Register Organization Course Instructor: Engr. Aisha Danish.
Processor Structure and Function Chapter8:. CPU Structure  CPU must:  Fetch instructions –Read instruction from memory  Interpret instructions –Instruction.
Lecture 1: Review of Computer Organization
Computer Organization and System Software Lecturer: Szabolcs Mikulas URL: Textbooks:
Processor Organization
1 Computer Architecture. 2 Basic Elements Processor Main Memory –volatile –referred to as real memory or primary memory I/O modules –secondary memory.
Chapter 1 Computer System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
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.
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.
Computer System Overview
Chapter 1 Computer System Overview
Interrupts.
Computer System Overview
Chapter 1 Computer System Overview
Computer System Overview
Chapter 1 Computer System Overview
11 An operating system (OS) exploits the hardware resources of one or more processors to provide a set of services to system users. The OS also manages.
BIC 10503: COMPUTER ARCHITECTURE
Chapter 1 Computer System Overview
Computer System Overview
Presentation transcript:

Chapter 1 Computer System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William Stallings

Operating System Exploits the hardware resources of one or more processors Provides a set of services to system users Manages secondary memory and I/O devices

Basic Elements Processor –Two internal registers Memory address resister (MAR) –Specifies the address for the next read or write Memory buffer register (MBR) –Contains data written into memory or receives data read from memory

Basic Elements Processor –I/O address register –I/O buffer register

Basic Elements Main Memory –Volatile –Referred to as real memory or primary memory

Basic Elements I/O Modules –Secondary Memory Devices –Communications equipment –Terminals System bus –Communication among processors, main memory, and I/O modules

Computer Components: Top- Level View

Processor Registers User-visible registers –Enable programmer to minimize main memory references by optimizing register use Control and status registers –Used by processor to control operating of the processor –Used by privileged OS routines to control the execution of programs

User-Visible Registers May be referenced by machine language Available to all programs – application programs and system programs

User-Visible Registers Data Address –Index Adding an index to a base value to get the effective address –

User-Visible Registers Address –Segment pointer When memory is divided into segments, memory is referenced by a segment and an offset –Stack pointer Points to top of stack

Control and Status Registers Program counter (PC) –Contains the address of an instruction to be fetched Instruction register (IR) –Contains the instruction most recently fetched Program status word (PSW) –Contains status information

Control and Status Registers Condition codes or flags –Bits set by processor hardware as a result of operations –Example Positive, negative, zero, or overflow result

Instruction Execution Two steps –Processor reads (fetches) instructions from memory –Processor executes each instruction

Basic Instruction Cycle

Instruction Fetch and Execute The processor fetches the instruction from memory Program counter (PC) holds address of the instruction to be fetched next PC is incremented after each fetch

Instruction Register Fetched instruction loaded into instruction register Categories –Processor-memory, processor-I/O, data processing, control

Characteristics of a Hypothetical Machine

Example of Program Execution

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

Classes of Interrupts

Program Flow of Control

Interrupt Stage Processor checks for interrupts If interrupt –Suspend execution of program –Execute interrupt-handler routine

Transfer of Control via Interrupts

Instruction Cycle with Interrupts

Program Timing: Short I/O Wait

Program Timing: Long I/O Wait

Simple Interrupt Processing

Changes in Memory and Registers for an Interrupt

Sequential Interrupt Processing

Nested Interrupt Processing

Multiple Interrupts

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

Memory Hierarchy 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

Cache Memory Processor speed faster than memory access speed Exploit the principle of locality with a small fast memory

Memory Hierarchy Performance

Cache and Main Memory

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

Cache Read Operation

Cache Principles Cache size –Small caches have significant impact on performance Block size –The unit of data exchanged between cache and main memory –Larger block size more hits until probability of using newly fetched data becomes less than the probability of reusing data that have to be moved out of cache

Cache Principles Mapping function –Determines which cache location the block will occupy Replacement algorithm –Chooses which block to replace –Least-recently-used (LRU) algorithm

Cache Principles 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

Programmed I/O I/O module performs the action, not the processor Sets the appropriate bits in the I/O status register No interrupts occur Processor checks status until operation is complete

Interrupt-Driven I/O Processor is interrupted when I/O module ready to exchange data Processor saves context of program executing and begins executing interrupt- handler

Interrupt-Driven I/O No needless waiting Consumes a lot of processor time because every word read or written passes through the processor

Direct Memory Access Transfers a block of data directly to or from memory An interrupt is sent when the transfer is complete More efficient

Call-Returns in 2-Level Memories

Locality of Reference

Performance of Two-Level Memories Assume two memories, M 1 and M 2 Size of memories S 1 and S 2 Cost per bit C 1 and C 2 Effective access time T S = HT 1 + (1-H)(T 1 + T 2 ) = T 1 + (1-H)T 2

Cost of Two Level Memories Average cost per bit of 2-level system C S = (C 1 S 1 + C 2 S 2 ) / (S 1 + S 2 ) Want C S approx same as C 2 If C 1 much greater than C 2, this requires S 1 much smaller than S 2

Memory Cost v Size

Access Efficiency How close is T 1 to T S ? Define access efficiency = T 1 /T S = 1/(1 + (1-H)T 2 /T 1 )

Access Efficiency

Hit Ratio v Mem Size

Typical Stack Organization

Nested Procedures

Nested Procs on Stack

Stack Frame Growth

Reentrant Procedures A reentrant procedure is a procedure that can be called again by another process (or thread) while the first process is still executing the procedure Requires all data to be kept separate Use (separate) stack for all local data of reentrant procedure