1 Lecture 2: Review of Computer Organization Operating System Spring 2007.

Slides:



Advertisements
Similar presentations
Computer Organization and Architecture
Advertisements

Computer System Overview
Computer Organization and Architecture
CSCI 4717/5717 Computer 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,
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
University College Cork IRELAND Hardware Concepts An understanding of computer hardware is a vital prerequisite for the study of operating systems.
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.
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
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.
A. Frank - P. Weisberg Operating Systems Functional View of Operating System.
Group 5 Alain J. Percial Paula A. Ortiz Francis X. Ruiz.
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 1 Computer System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
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
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
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.
1 Course Information Operating System Fall Instructor Information Office: 1N-214 Tel:(718) Webpage:
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.
Operating systems, lecture 4 Team Viewer Tom Mikael Larsen, Thursdays in D A look at assignment 1 Brief rehearsal from lecture 3 More about.
COMPUTER SYSTEM OVERVIEW
Fall 2000M.B. Ibáñez Lecture 25 I/O Systems. Fall 2000M.B. Ibáñez Categories of I/O Devices Human readable –used to communicate with the user –video display.
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)
The computer system’s I/O architecture is its interface to the outside world. This architecture provides a systematic means of controlling interaction.
Operating System 1 COMPUTER SYSTEM OVERVIEW Achmad Arwan, S.Kom.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
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.
Chapter 6: Computer Components Dr Mohamed Menacer Taibah University
Lecture 1: Review of Computer Organization
Overview von Neumann Architecture Computer component Computer function
Review of Computer System Organization. Computer Startup For a computer to start running when it is first powered up, it needs to execute an initial program.
IT3002 Computer Architecture
Chapter 3 : Top Level View of Computer Functions Basic CPU function, Interconnection, Instruction Format and Interrupt.
Structure and Role of a Processor
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
Computer System Overview
BIC 10503: COMPUTER ARCHITECTURE
Chapter 1 Computer System Overview
Computer System Overview
Presentation transcript:

1 Lecture 2: Review of Computer Organization Operating System Spring 2007

2 Four Elements of a Computer System Processor (CPU) Control the operation of the computer and its data processing functions. Main Memory Stores data and programs RAM - random access memory I/O Modules Auxiliary storage like disk drives, tape drives Printers, terminals, monitors System Bus Provides for transfer of data among processors, main memory, and I/O modules

3 Computer Organization CPU PC IR Execution Unit MAR MBR I/O AR I/O BR I/O module … DATA … Instruction … buffer MAIN MEMORY System Bus 0 1 n-1 n-2

4 CPU (Processors) Registers A processor includes a set of registers that provide a level of memory faster than main memory. User-visible Registers Control and Status Registers

5 User-visible Registers Many instructions operate on data sitting on working registers. Since registers are faster than main memory, it is better that data be moved to registers before operating on them. May be referenced by the machine language that the processor executes available to all programs - application programs and system programs. Types of registers: Data registers Address registers For indirect addressing For index register For segment pointer For stack pointer

6 Control and Status Registers Program Controller (PC) – contains the address of an instruction to be fetched Instruction Register (IR) – contains the instruction most recently fetched Memory Address Register (MAR) Memory Buffer Register (MBR) I/O Address Register (I/O AR) I/O Buffer Register (I/O BR) Processor Status Word (PSW) condition codes or flags interrupt enable/disable user/supervisor mode

7 Instruction Cycle Start Fetch next instruction Execute instruction Halt Fetch Cycle Execute Cycle OpcodeAddress of Operand Instruction Format Signmagnitude Integer Format exponentmagnitude Floating point Format Sign

8 Actions of CPU (Types of Instructions) Processor-Memory Data Transfer Processor-I/O Data Transfer Data Processing Arithmetic or logic operation on data Control Alter sequence of execution

9 Interrupts An interruption of the normal sequence of execution Improve processing efficiency Allows the processor to execute other instructions while an I/O operation is in progress

10 Interrupts - Classes of Interrupts Program arithmetic overflow or underflow division by zero attempt to execute an illegal machine instruction reference outside user’s memory space Timer I/O Hardware Failure

11 Interrupts –Interrupt Handler A program that determines nature of the interrupt and performs whatever actions are needed Control is transferred to this program Generally part of the operating system

12 Interrupt Timeline

13 Interrupts and the Instruction Cycle Start Fetch next instruction Execute instruction Fetch Cycle Execute Cycle Interrupts Disabled Check for interrupt and process interrupt Interrupts Enabled

14 Interrupt Cycle Processor checks for interrupts If no interrupts, fetch the next instruction for the current program If an interrupt is pending, suspend execution of the current program, and execute the interrupt handler

15 Program Flow of Control without and with Interrupts User Program WRITE (1) (2) (3) I/O Program I/O Command END (4) (5) No interrupts User Program WRITE (1) (2) (3) I/O Program I/O Command END (4) (5) Interrupt Handler Interrupts

16 Simple Interrupt Processing Device controller or other Hardware generates an interrupt Processor finished execution of current instruction Processor signals acknowledgement of interrupt Processor pushes PSW and PC onto control stack Processor loads new PC value based on interrupt Hardware Save remainder of process state information Process interrupt Restore process state information Restore old PSW and PC Software

17 Multiple Interrupts Two methods: Disable other interrupts while processing one interrupt Assign priorities to different interrupts. Interrupts at higher priority can interrupt lower ones

18 Memory Registers Cache Main memory Electronic disk Magnetic disk Optical disk Magnetic tapes Decreasing cost per bit Increasing capacity Increasing access time Decreasing frequency of access of the memory by the processor volatile nonvolatile

19 Performance of Various Levels of Storage Movement between levels of storage hierarchy can be explicit or implicit

20 Caching Important principle, performed at many levels in a computer (in hardware, operating system, software) Information in use copied from slower to faster storage temporarily Faster storage (cache) checked first to determine if information is there If it is, information used directly from the cache (fast) If not, data copied to cache and used there

21 Cache Invisible to operating system Increase the speed of memory Processor speed is faster than memory speed Contain a portion of main memory CPUCache Main memory Word Transfer Block Transfer

22 Cache Design Cache size Block size Mapping function Determine which cache location the block will occupy Replacement algorithm Determines which block to replace Least-Recently-Used(LRU) algorithm Write policy When the memory write operation takes place Can occur every time block is updated Can occur only when block is replaced

23 I/O Communication Techniques Programmed I/O Interrupt-Driven I/O Direct Memory Access (DMA)

24 I/O Communication Techniques Programmed I/O Interrupt-Driven I/O Direct Memory Access (DMA)

25 Programmed I/O I/O module performs the action, not the processor Sets appropriate bits in the I/O status register No interrupts occur Processor checks status until operation is complete Issue Read command to I/O module Read status of I/O module Check status Read word from I/O module Write word into Main memory Done? Not ready yes Next instruction no CPU->I/O I/O -> CPU Error condition I/O -> CPU CPU->memory

26 I/O Communication Techniques Programmed I/O Interrupt-Driven I/O Direct Memory Access (DMA)

27 Interrupt-Driven I/O Processor is interrupt when I/O module ready to exchange data Processor is free to do other work No needless waiting Consumes a lot of processor time because every word read or written passes through the processor Issue Read command to I/O module Read status of I/O module Check status Read word from I/O module Write word into Main memory Done? ready yes Next instruction no CPU->I/O I/O -> CPU Error condition I/O -> CPU CPU->memory Do something else Interrupt

28 I/O Communication Techniques Programmed I/O Interrupt-Driven I/O Direct Memory Access (DMA)

29 Direct Memory Access Transfer a block of data directly to or from memory An interrupt is sent when the task is complete The processor is only involved at the beginning and end of the transfer Issue Read command to I/O module Read status of DMA module Next instruction CPU->DMA DMA -> CPU Do something else Interrupt

30 End of lecture 2 Thank you!