© 2004, D. J. Foreman 1 Computer Organization. © 2004, D. J. Foreman 2 Basic Architecture Review  Von Neumann ■ Distinct single-ALU & single-Control.

Slides:



Advertisements
Similar presentations
1 (Review of Prerequisite Material). Processes are an abstraction of the operation of computers. So, to understand operating systems, one must have a.
Advertisements

Slide 4-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 4 Computer Organization.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 3 Operating System Organization.
WHAT IS AN OPERATING SYSTEM? An interface between users and hardware - an environment "architecture ” Allows convenient usage; hides the tedious stuff.
CS4315A. Berrached:CMS:UHD1 Operating Systems and Computer Organization Chapter 4.
Computer System Overview
Chapter 12 CPU Structure and Function. CPU Sequence Fetch instructions Interpret instructions Fetch data Process data Write data.
Chapter 5 Computing Components. The (META) BIG IDEA Cool, idea but maybe too big DATA – Must be stored somewhere in a storage device PROCESSING – Data.
1 Lecture 2: Review of Computer Organization Operating System Spring 2007.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
Operating System and Computer Organization Background CS 502 Spring 99 WPI MetroWest/Southboro Campus.
© 2004, D. J. Foreman 1 Computer Organization. © 2004, D. J. Foreman 2 Basic Architecture Review  Von Neumann ■ Distinct single-ALU & single-Control.
© 2009, D. J. Foreman 1 Computer Organization. © 2009, D. J. Foreman 2 Basic Architecture Review  Von Neumann ■ Distinct single-ALU & single-Control.
OS Spring’03 Introduction Operating Systems Spring 2003.
Chapter 7 Interupts DMA Channels Context Switching.
Chapter 4 Computer Organization Vishal Shah Vishal Pinto.
Computer System Organization S H Srinivasan
1 Device Management The von Neumann Architecture System Architecture Device Management Polling Interrupts DMA operating systems.
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
Computer System Structures memory memory controller disk controller disk controller printer controller printer controller tape-drive controller tape-drive.
5.1 Chaper 4 Central Processing Unit Foundations of Computer Science  Cengage Learning.
Inside The CPU. Buses There are 3 Types of Buses There are 3 Types of Buses Address bus Address bus –between CPU and Main Memory –Carries address of where.
Group 5 Alain J. Percial Paula A. Ortiz Francis X. Ruiz.
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
Computer Organization
System Calls 1.
Lecture#14. Last Lecture Summary Memory Address, size What memory stores OS, Application programs, Data, Instructions Types of Memory Non Volatile and.
Computer Processing of Data
Three fundamental concepts in computer security: Reference Monitors: An access control concept that refers to an abstract machine that mediates all accesses.
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Overview of Hardware.
I/O Example: Disk Drives To access data: — seek: position head over the proper track (8 to 20 ms. avg.) — rotational latency: wait for desired sector (.5.
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.
1 Chapter 2: Computer-System Structures  Computer System Operation  I/O Structure  Storage Structure  Storage Hierarchy  Hardware Protection  General.
Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers.
Chapter 5 Computing Components. 5-2 Chapter Goals List the components and their function in a von Neumann machine Describe the fetch-decode-execute cycle.
© 2004, D. J. Foreman 1 Computer Organization. © 2004, D. J. Foreman 2 Basic Architecture Review  Von Neumann ■ Distinct single-ALU & single-Control.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
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.4 Hardware Review. CPU  Fetch-decode-execute cycle 1. Fetch 2. Bump PC 3. Decode 4. Determine operand addr (if necessary) 5. Fetch operand from memory.
Operating Systems 1 K. Salah Module 1.2: Fundamental Concepts Interrupts System Calls.
Stored Programs In today’s lesson, we will look at: what we mean by a stored program computer how computers store and run programs what we mean by the.
Concurrency, Processes, and System calls Benefits and issues of concurrency The basic concept of process System calls.
Processor Structure and Function Chapter8:. CPU Structure  CPU must:  Fetch instructions –Read instruction from memory  Interpret instructions –Instruction.
Lecture 1: Review of Computer Organization
Lecture on Central Process Unit (CPU)
Processor Memory Processor-memory bus I/O Device Bus Adapter I/O Device I/O Device Bus Adapter I/O Device I/O Device Expansion bus I/O Bus.
CS4315A. Berrached:CMS:UHD1 Operating Systems and Computer Organization Chapter 4.
بسم الله الرحمن الرحيم MEMORY AND I/O.
CSC 360- Instructor: K. Wu Review of Computer Organization.
Slide 4-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 4.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
Introduction to Operating Systems Concepts
Interrupts and signals
Processor/Memory Chapter 3
Introduction to Computer Architecture
IB Computer Science Topic 2.1.1
Computer-System Architecture
Module 2: Computer-System Structures
Outline Computer Organization Devices Interrupts Computer architecture
Operating Systems Chapter 5: Input/Output Management
Introduction to Computer Architecture
Today’s agenda Hardware architecture and runtime system
Computer Organization
Module 2: Computer-System Structures
Module 2: Computer-System Structures
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment. Phone:
Module 2: Computer-System Structures
Presentation transcript:

© 2004, D. J. Foreman 1 Computer Organization

© 2004, D. J. Foreman 2 Basic Architecture Review  Von Neumann ■ Distinct single-ALU & single-Control ■ Fixed circuitry  Non-von Neumann ■ Various changes Multiple ALUs Merged ALU and Control Alternatives to ALU

© 2004, D. J. Foreman 3 Timing  Cycle – timing in a computer comes from a master clock controlled by a crystal oscillator  Clock ticks (billion cycles / sec)  Frequency = 1/period and Period = 1/frequency  Let’s use 10 MHz to make the arithmetic easier ■ 10 MHz = 10 x 10 6 Hz = 10 7 Hz ■ Period is 1 / 10 7 = seconds  Terms ■ Giga = 10 9 and nano = ■ Mega = 10 6 and micro = 10 -6

© 2004, D. J. Foreman 4 Storage Speed Hierarchy  CPU Registers – internal to CPU  Cache (CPU Internal) – very high speed  Cache (External) – high speed  Main Memory - slow  Electronic (SSD) – 0 latency  Magnetic Disks – high latency  Optical Disk – very high latency  Magnetic Tapes – seq'l, very high latency

Machine State Management  State vector (Program Status Word) ■ Interruptability ■ Memory protection ■ Privilege mode ■ Instruction counter ■ Misc. (arch dependent)  Reserved (arch. defined) storage areas © 2004, D. J. Foreman 5

6 Operation  Fetch – get instruction from RAM  Decode- h/w determines operation from bit pattern of first (or more) byte(s)  Obtain operand data ■ From Registers or RAM ■ Into ALU  Execute (perform the operation)  Store results back to RAM  Update Instruction Counter ■ (sometimes called Program Counter)

© 2004, D. J. Foreman 7 Device-Controller-Software Relationship Application API O/S Device driver Device controller Device S/W H/W

© 2004, D. J. Foreman 8 Device Controller Interface  Data width  Commands ■ Read ■ Write ■ Seek  Status codes ■ Busy ■ Error ■ Done ■ Ready

© 2004, D. J. Foreman 9 I/O Operations  Controller manages device  Devices are MUCH slower than CPU  CPU can process while device runs  Need to know when done ■ Polling (continual testing for "done") ■ Special h/w for notification – interrupt flag One bit in CPU Turned on by device controller Turned off by O/S No "race" conditions

Control Flow  Hardware (I/O or SVC) raises voltage on an interrupt line ■ Current PSW saved to reserved RAM area ■ "interrupt PSW" becomes "current PSW" ■ Machine state set, IC set  OS is now running at primary interrupt handler  All registers have user data, must save (if not done by hw) to reserved RAM  Load register ->PCB list  Find user who was running  Save registers into his PCB © 2004, D. J. Foreman 10

© 2004, D. J. Foreman 11 Interrupt Handling Sequence  Controller (atomic action) ■ turns on flag & sets code indicating device  H/W (atomic action) ■ Switches to privileged mode ■ Turns interrupts off ■ Turns full memory protect off ■ Sets IC to interrupt handler in O/S  O/S ■ Interrupt handler executes ■ Returns to application in user mode

© 2004, D. J. Foreman 12 Interrupt Handler  Saves user state (vs. machine state) ■ Registers ■ Stack pointer ■ IC  Switches to device-handler  Restores user's state  Returns to user with interrupts enabled  Might NOT be atomic Allows new interrupt before switching

© 2004, D. J. Foreman 13 Trap or Supervisor Call Instruction  Atomic operation ■ Switches to privileged mode ■ Sets IC to common interrupt handler in O/S ■ Contains code for specific request  Common handler ■ Uses code to select address in trap table ■ Trap table contains addresses of specific programs

© 2004, D. J. Foreman 14 Instruction Processing with Interrupts fetchexecute Interrupts allowed? No yes previous inst pending? No process interrupt yes

© 2004, D. J. Foreman 15 Direct Memory Addressing  Allows device controller to get/put RAM w/o going through the CPU  Increases throughput  Reduces interrupt handling

© 2004, D. J. Foreman 16 Device addressing  Two methods shown in text: ■ Conventional External to RAM Limited only by size of address ■ Memory-mapped devices Use reserved part of RAM Limited by reserved space  Third method – used in some mainframes ■ Channels – addresses 00-0f (1 byte) ■ Sub-channels – addresses 00-ff (2 nd byte) ■ Total of 4096 independent devices (0000-0fff)

© 2004, D. J. Foreman 17 Loader Processing  Find the executable file  Resolve relative addresses within program to actual locations  Connect DLL's to procedure call structure ■ Shared collection of programs & entry points

© 2004, D. J. Foreman 18 Pipelined Instructions FetchDecodeExecute Store Fetch Decode Execute Store Fetch Decode Execute Store Done

© 2004, D. J. Foreman 19 Software, Firmware, Hardware  Software ■ Programs you can install/remove/transport to another computer which are stored on disk, CD, etc and run from within RAM  Firmware ■ Programs usually installed only by chip maker and which run from within ROM ■ May be upgraded by user (depends on chip)  Hardware ■ The physical components of the system