SG6 : FIT1001 Computer Systems S1 2006 1 Important Notice for Lecturers This file is provided as an example only Lecturers are expected to modify / enhance.

Slides:



Advertisements
Similar presentations
CPU Structure and Function
Advertisements

Computer Architecture
Chapter 8: Central Processing Unit
Computer Organization and Architecture
Khaled A. Al-Utaibi  Computers are Every Where  What is Computer Engineering?  Design Levels  Computer Engineering Fields  What.
Computer System Overview
Computer Organization and Architecture
Computer Organization and Architecture
CSCI 4717/5717 Computer Architecture
FIU Chapter 7: Input/Output Jerome Crooks Panyawat Chiamprasert
1 Lecture 2: Review of Computer Organization Operating System Spring 2007.
Chapter 12 Three System Examples The Architecture of Computer Hardware and Systems Software: An Information Technology Approach 3rd Edition, Irv Englander.
1 Computer System Overview OS-1 Course AA
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
CHAPTER 9: Input / Output
Computer Organization and Assembly language
Group 5 Alain J. Percial Paula A. Ortiz Francis X. Ruiz.
CH12 CPU Structure and Function
Interrupts Signal that causes the CPU to alter its normal flow on instruction execution ◦ frees CPU from waiting for events ◦ provides control for external.
Chapter 10 The Stack Stack: An Abstract Data Type An important abstraction that you will encounter in many applications. We will describe two uses:
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 9: Input / Output
MICROPROCESSOR INPUT/OUTPUT
1 4.2 MARIE This is the MARIE architecture shown graphically.
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
Operating Systems and Networks AE4B33OSS Introduction.
Computer Architecture Lecture 2 System Buses. Program Concept Hardwired systems are inflexible General purpose hardware can do different tasks, given.
Lecture 14 Today’s topics MARIE Architecture Registers Buses
MARIE: An Introduction to a Simple Computer. 2 MARIE Our model computer, the Machine Architecture that is Really Intuitive and Easy, MARIE, was designed.
Interrupt driven I/O. MIPS RISC Exception Mechanism The processor operates in The processor operates in user mode user mode kernel mode kernel mode Access.
Computer Architecture 2 nd year (computer and Information Sc.)
Operating Systems 1 K. Salah Module 1.2: Fundamental Concepts Interrupts 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
Interrupt driven I/O Computer Organization and Assembly Language: Module 12.
PART 4: (1/2) Central Processing Unit (CPU) Basics CHAPTER 12: P ROCESSOR S TRUCTURE AND F UNCTION.
بسم الله الرحمن الرحيم MEMORY AND I/O.
Processor Organization
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.
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.
Chapter 12 Processor Structure and Function. Central Processing Unit CPU architecture, Register organization, Instruction formats and addressing modes(Intel.
Dr.Faisal Alzyoud 5/9/2018 Datapath and Control.
CHAPTER 9: Input / Output
Basic Processor Structure/design
CHAPTER 9: Input / Output
William Stallings Computer Organization and Architecture 8th Edition
Introduction to microprocessor (Continued) Unit 1 Lecture 2
Overview Introduction General Register Organization Stack Organization
Chapter 10 The Stack.
Computer System Overview
Processor Fundamentals
MARIE: An Introduction to a Simple Computer
BIC 10503: COMPUTER ARCHITECTURE
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Computer Architecture
Interrupt handling Explain how interrupts are used to obtain processor time and how processing of interrupted jobs may later be resumed, (typical.
MARIE: An Introduction to a Simple Computer
Computer System Overview
CPU Structure and Function
Chapter 11 Processor Structure and function
Presentation transcript:

SG6 : FIT1001 Computer Systems S Important Notice for Lecturers This file is provided as an example only Lecturers are expected to modify / enhance slides to suit their teaching style Lecturers are expected to cover the topics presented in these slides Lecturers can export slides to another format if it suits their teaching style (but must cover the topics indicated in the slides) This file should not be used AS PROVIDED – you should modify it to suit your own needs! This slide should be deleted from this presentation Provided by the FIT1001 SIG

FIT1001- Computer Systems

FIT1001- Computer Systems Lecture 6 Computer Program Execution Concepts

SG6 : FIT1001 Computer Systems S Review – Last Week (remove for lect 2 or 3) This slide can be removed if you have 3 1 hour lectures from lecture 2 and 3 in the same week…..or just lecture 2 if you have a 2/1 split.

SG6 : FIT1001 Computer Systems S Learning Objectives Understand the concepts of program execution and control the flow of a program Understand the basic concepts of the stack Understand the basic concepts of both hardware and software interrupts Describe how interrupts alter the normal flow of program execution in a computer system Define interrupt vectors and develop interrupt handlers Compare the characteristics of RISC machines versus CISC machines

SG6 : FIT1001 Computer Systems S Content Name Program Execution Concepts Program Control Instructions Stacks Interrupts Case Studies of Real Architectures

FIT1001- Computer Systems LECTURE 6 Program Execution Concepts

SG6 : FIT1001 Computer Systems S Tutorial (remove if 1 st or 2 nd lecture) Should only be present in last lecture for the given week……unless you want otherwise!

SG6 : FIT1001 Computer Systems S Instruction Processing The fetch-decode-execute cycle is the series of steps that a computer carries out when it runs a program. We first have to fetch an instruction from memory, and place it into the IR. Once in the IR, it is decoded to determine what needs to be done next. If a memory value (operand) is involved in the operation, it is retrieved and placed into the MBR. With everything in place, the instruction is executed. The next slide shows a flowchart of this process.

SG6 : FIT1001 Computer Systems S Instruction Processing

FIT1001- Computer Systems LECTURE 6 Program Control Instructions

SG6 : FIT1001 Computer Systems S Transfer of Control Unconditional branch –e.g. branch to instruction at location xxxx Conditional Branch –e.g. branch to instruction at location xxxx if result of last operation was zero Skip –e.g. increment and skip next instruction if result is zero ISZ Register1  increment & skip if zero Branch xxxx  skip this if result was zero ADD A Procedure (subroutine) call

SG6 : FIT1001 Computer Systems S Branch Instruction

SG6 : FIT1001 Computer Systems S Nested Procedure Calls start address of Proc1 start address of Proc2 how does machine know where to go back to? STACK!

FIT1001- Computer Systems LECTURE 6 Stack

SG6 : FIT1001 Computer Systems S Hardware Stack contiguous block of memory locations  to store values have a pointer to value on “top” of stack –pointer is typically a register in processor, e.g. SP PUSH –puts new value on top of stack >modifies memory and SP POP –removes value from top of stack >modifies SP only LIFO storage Last In is the First Out

SG6 : FIT1001 Computer Systems S Stack Example X SP X Y X Y top of stack LIFO: Y is Last In and First Out ??? initially empty PUSHX PUSH Y POP

SG6 : FIT1001 Computer Systems S Use of Stack to Save Return Addresses RETURN pop return address off top of stack and put into PC ! CALL push address of next instruction onto top of stack and then set PC = address of Proc address of instruction AFTER “call” to Proc1

FIT1001- Computer Systems LECTURE 6 Interrupts

SG6 : FIT1001 Computer Systems S Interrupts Signal that causes the CPU to alter its normal flow on instruction execution –frees CPU from waiting for events –provides control for external input Examples –Completion of an I/O process –unexpected input –abnormal situation (catastrophes - power failure) –detection of a hardware failure –illegal instructions / error handling –multitasking, multiprocessing

SG6 : FIT1001 Computer Systems S The CPU - The Interrupt Cycle  Fetch / Execute cycle  Interrupt cycle HALT START Fetch Next Instruction Execute Instruction Check/Process Interrupt Interrupts Disabled

SG6 : FIT1001 Computer Systems S Instruction Cycle to Process Interrupts

SG6 : FIT1001 Computer Systems S Interrupt Types In general interrupts can be grouped into three categories –Processor Interrupts >Internal Hardware Interrupts >Error, stack overflow or protection violations –Hardware Interrupts >External Hardware Interrupts –Software Interrupts >Special instructions

SG6 : FIT1001 Computer Systems S Interrupt Terminology Interrupt lines (hardware) Interrupt request Interrupt handlers –Program that services the interrupt –Also known as an interrupt routine Process Control Block (PCB) –Located in a part of memory known as the stack area –All registers of a program are saved here before control is transferred to the interrupt handler

SG6 : FIT1001 Computer Systems S Servicing the interrupt –suspends program in progress –saves pertinent information including last instruction executed and data values in registers in the PCB (process control block) –branches to interrupt handler Interrupt Terminology

SG6 : FIT1001 Computer Systems S Simple Interrupt Processing

SG6 : FIT1001 Computer Systems S Servicing an Interrupt

SG6 : FIT1001 Computer Systems S Use of Interrupts Notify that an external event has occurred –real-time or time-sensitive Signal completion –printer ready or buffer full Allocate CPU time –time sharing Indicate abnormal event (CPU originates for notification and recovery) –illegal operation, hardware error Software interrupts

SG6 : FIT1001 Computer Systems S Multiple Interrupts Identifying devices –Polling (checking for input in rotation) –Vectored interrupts (include address of interrupting device) Interrupt priorities –Loss of data vs. task completion Maskable (disabled) interrupts

SG6 : FIT1001 Computer Systems S Vectored Interrupts

SG6 : FIT1001 Computer Systems S Polled Interrupts

SG6 : FIT1001 Computer Systems S Multiple Interrupts Example

FIT1001- Computer Systems LECTURE 6 Real World Architectures

SG6 : FIT1001 Computer Systems S Real World Architectures MARIE shares many features with modern architectures but it is not an accurate depiction of them. In the following slides, we briefly examine two machine architectures. We will look at an Intel architecture, which is a CISC machine and MIPS, which is a RISC machine. –CISC is an acronym for complex instruction set computer. –RISC stands for reduced instruction set computer.

SG6 : FIT1001 Computer Systems S Real World Architectures The classic Intel architecture, the 8086, was born in It is a CISC architecture. It was adopted by IBM for its famed PC, which was released in The 8086 operated on 16-bit data words and supported 20-bit memory addresses. Later, to lower costs, the 8-bit 8088 was introduced. Like the 8086, it used 20-bit memory addresses. What was the largest memory that the 8086 could address?

SG6 : FIT1001 Computer Systems S Real World Architectures The 8086 had four 16-bit general-purpose registers that could be accessed by the half-word. It also had a flags register, an instruction register, and a stack accessed through the values in two other registers, the base pointer and the stack pointer. The 8086 had no built in floating-point processing. In 1980, Intel released the 8087 numeric coprocessor, but few users elected to install them because of their cost.

SG6 : FIT1001 Computer Systems S Real World Architectures In 1985, Intel introduced the 32-bit It also had no built-in floating-point unit. The 80486, introduced in 1989, was an that had built-in floating-point processing and cache memory. The and offered downward compatibility with the 8086 and Software written for the smaller word systems was directed to use the lower 16 bits of the 32-bit registers.

SG6 : FIT1001 Computer Systems S Real World Architectures Currently, Intel’s most advanced 32-bit microprocessor is the Pentium 4. It can run as fast as 3.06 GHz. This clock rate is over 350 times faster than that of the Speed enhancing features include multilevel cache and instruction pipelining. Intel, along with many others, is marrying many of the ideas of RISC architectures with microprocessors that are largely CISC.

SG6 : FIT1001 Computer Systems S Real World Architectures The MIPS family of CPUs has been one of the most successful in its class. In 1986 the first MIPS CPU was announced. It had a 32-bit word size and could address 4GB of memory. Over the years, MIPS processors have been used in general purpose computers as well as in games. The MIPS architecture now offers 32- and 64-bit versions.

SG6 : FIT1001 Computer Systems S Real World Architectures MIPS was one of the first RISC microprocessors. The original MIPS architecture had only 55 different instructions, as compared with the 8086 which had over 100. MIPS was designed with performance in mind: It is a load/store architecture, meaning that only the load and store instructions can access memory. The large number of registers in the MIPS architecture keeps bus traffic to a minimum. How does this design affect performance?

SG6 : FIT1001 Computer Systems S Real World Architectures The Intel architecture is an example of a CISC architecture MIPS is an example of a RISC architecture

SG6 : FIT1001 Computer Systems S Next… (remove for next week) Indicates what is coming up in the next lecture in that week! This slide can be removed if the last lecture in the week and replaced with the next slide.

SG6 : FIT1001 Computer Systems S Next Week….(remove if 1st or 2 nd lecture) Only need for last lecture in week…