PROBLEMS. which was discussed in Section 1.6.3.



Similar documents
Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Central Processing Unit (CPU)

PROBLEMS #20,R0,R1 #$3A,R2,R4

CPU Organization and Assembly Language

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

LSN 2 Computer Processors

Week 1 out-of-class notes, discussions and sample problems

Processor Architectures

A3 Computer Architecture

EE282 Computer Architecture and Organization Midterm Exam February 13, (Total Time = 120 minutes, Total Points = 100)

Computer Organization. and Instruction Execution. August 22

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-12: ARM

Lecture: Pipelining Extensions. Topics: control hazards, multi-cycle instructions, pipelining equations

Chapter 1 Computer System Overview

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

Overview. CISC Developments. RISC Designs. CISC Designs. VAX: Addressing Modes. Digital VAX

BASIC COMPUTER ORGANIZATION AND DESIGN

Pipeline Hazards. Structure hazard Data hazard. ComputerArchitecture_PipelineHazard1

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University

Chapter 5 Instructor's Manual

CPU Organisation and Operation

Unit A451: Computer systems and programming. Section 2: Computing Hardware 1/5: Central Processing Unit

Instruction Set Architecture. or How to talk to computers if you aren t in Star Trek

Chapter 4 Lecture 5 The Microarchitecture Level Integer JAVA Virtual Machine

(Refer Slide Time: 00:01:16 min)

Central Processing Unit

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

Basic Computer Organization

Logical Operations. Control Unit. Contents. Arithmetic Operations. Objectives. The Central Processing Unit: Arithmetic / Logic Unit.

TIMING DIAGRAM O 8085

CHAPTER 7: The CPU and Memory

OAMulator. Online One Address Machine emulator and OAMPL compiler.

Q. Consider a dynamic instruction execution (an execution trace, in other words) that consists of repeats of code in this pattern:

Learning Outcomes. Simple CPU Operation and Buses. Composition of a CPU. A simple CPU design

Computer Architecture TDTS10

A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc

MICROPROCESSOR AND MICROCOMPUTER BASICS

Computer Performance. Topic 3. Contents. Prerequisite knowledge Before studying this topic you should be able to:

Chapter 01: Introduction. Lesson 02 Evolution of Computers Part 2 First generation Computers

Microprocessor & Assembly Language

Introduction to Operating Systems. Perspective of the Computer. System Software. Indiana University Chen Yu

Instruction Set Architecture (ISA)


UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180B Lab 7: MISP Processor Design Spring 1995

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

Chapter 6. Inside the System Unit. What You Will Learn... Computers Are Your Future. What You Will Learn... Describing Hardware Performance

ELE 356 Computer Engineering II. Section 1 Foundations Class 6 Architecture

İSTANBUL AYDIN UNIVERSITY

IA-64 Application Developer s Architecture Guide

TYPES OF COMPUTERS AND THEIR PARTS MULTIPLE CHOICE QUESTIONS

Chapter 2 Logic Gates and Introduction to Computer Architecture

Instruction scheduling

Administrative Issues

CHAPTER 1 ENGINEERING PROBLEM SOLVING. Copyright 2013 Pearson Education, Inc.

picojava TM : A Hardware Implementation of the Java Virtual Machine

Microprocessor and Microcontroller Architecture

Pipelining Review and Its Limitations

CHAPTER 4 MARIE: An Introduction to a Simple Computer

612 CHAPTER 11 PROCESSOR FAMILIES (Corrisponde al cap Famiglie di processori) PROBLEMS

CSCI 4717 Computer Architecture. Function. Data Storage. Data Processing. Data movement to a peripheral. Data Movement

Using Graphics and Animation to Visualize Instruction Pipelining and its Hazards

The Central Processing Unit:

Computer organization

CHAPTER 6: Computer System Organisation 1. The Computer System's Primary Functions

WAR: Write After Read

Computer System: User s View. Computer System Components: High Level View. Input. Output. Computer. Computer System: Motherboard Level

a storage location directly on the CPU, used for temporary storage of small amounts of data during processing.

MACHINE INSTRUCTIONS AND PROGRAMS

Systems I: Computer Organization and Architecture

VLIW Processors. VLIW Processors

Quiz for Chapter 1 Computer Abstractions and Technology 3.10

EECS 583 Class 11 Instruction Scheduling Software Pipelining Intro

COMPUTER ORGANIZATION AND ARCHITECTURE. Slides Courtesy of Carl Hamacher, Computer Organization, Fifth edition,mcgrawhill

CSC 2405: Computer Systems II

CPU Performance Equation

Operating Systems. and Windows

Instruction Set Architecture. Datapath & Control. Instruction. LC-3 Overview: Memory and Registers. CIT 595 Spring 2010

Execution Cycle. Pipelining. IF and ID Stages. Simple MIPS Instruction Formats

NAND Flash Status Register Response in Cache Programming Operations

How It All Works. Other M68000 Updates. Basic Control Signals. Basic Control Signals

INSTRUCTION LEVEL PARALLELISM PART VII: REORDER BUFFER

CISC, RISC, and DSP Microprocessors

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. COURSE CURRICULUM COURSE TITLE: COMPUTER ORGANIZATION AND ARCHITECTURE (Code: )

Python Programming: An Introduction to Computer Science

FLIX: Fast Relief for Performance-Hungry Embedded Applications

Computer Architectures

Unit 4: Performance & Benchmarking. Performance Metrics. This Unit. CIS 501: Computer Architecture. Performance: Latency vs.

UT69R000 MicroController Software Tools Product Brief

COMPUTER ORGANIZATION ARCHITECTURES FOR EMBEDDED COMPUTING

Operating Systems. Virtual Memory

CPS104 Computer Organization and Programming Lecture 18: Input-Output. Robert Wagner

Chapter 2 Topics. 2.1 Classification of Computers & Instructions 2.2 Classes of Instruction Sets 2.3 Informal Description of Simple RISC Computer, SRC

Chapter 3: Operating-System Structures. Common System Components

EEM 486: Computer Architecture. Lecture 4. Performance

An Overview of Stack Architecture and the PSC 1000 Microprocessor

EE361: Digital Computer Organization Course Syllabus

Chapter 3: Operating-System Structures. System Components Operating System Services System Calls System Programs System Structure Virtual Machines

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

Transcription:

22 CHAPTER 1 BASIC STRUCTURE OF COMPUTERS (Corrisponde al cap. 1 - Introduzione al calcolatore) PROBLEMS 1.1 List the steps needed to execute the machine instruction LOCA,R0 in terms of transfers between the components shown in Figure 1.2 and some simple control commands. Assume that the instruction itself is stored in the memory at location INSTR and that this address is initially in register PC. The first two steps might be expressed as Transfer the contents of register PC to register MAR. Issue a Read command to the memory, and then wait until it has transferred the requested word into register MDR. Remember to include the steps needed to update the contents of PC from INSTR to INSTR+1 so that the next instruction can be fetched. 1.2 Repeat Problem 1.1 for the machine instruction R1,R2,R3 which was discussed in Section 1.6.3. 1.3 (a) Give a short sequence of machine instructions for the task: the contents of memory location A to those of location B, and place the answer in location C. Instructions LOC,R i and Store R i,loc are the only instructions available to transfer data between the memory and generalpurpose register R i. instructions were described in Sections 1.3 and 1.6.3. Do not destroy the contents of either location A or B. (b) Suppose that Move and instructions are available with the format Move/ Location1,Location2 These instructions move or add a copy of the operand at the first location to the second location, overwriting the original operand at the second location. Locationi can be in either the memory or the processor register set. Is it possible to use fewer instructions to accomplish the task in Part a? If yes, give the sequence. 1.4 (a) Section 1.5 discusses how the input and output steps of a collection of programs such as the one shown in Figure 1.4 could be overlapped to reduce the total time needed to execute them. Let each of the six OS routine execution intervals be 1 unit of time, with each disk operation requiring 3 units, printing requiring 3 units, and each program execution interval requiring 2 units of time. Compute the ratio of

best overlapped time to nonoverlapped time for a long sequence of programs. Ignore start-up and ending transients. (b) Section 1.5 indicated that program computation can be overlapped with either input or output operations or both. Ignoring the relatively short time needed for OS routines, what is the ratio of best overlapped time to nonoverlapped time for completing the execution of a collection of programs, where each program has about equal balance among input, compute, and output activities? 1.5 (a) Program execution time, T,asdefined in Section 1.6.2, is to be examined for a certain high-level language program. The program can be run on a RISC or a CISC computer. Both computers use pipelined instruction execution, but pipelining in the RISC machine is more effective than in the CISC machine. Specifically, the effective value of S in the T expression for the RISC machine is 1.2, but it is only 1.5 for the CISC machine. Both machines have the same clock rate, R. What is the largest allowable value for N, the number of instructions executed on the CISC machine, expressed as a percentage of the N value for the RISC machine, if time for execution on the CISC machine is to be no longer than that on the RISC machine? (b) Repeat Part a if the clock rate, R, for the RISC machine is 15 percent higher than that for the CISC machine. 1.6 (a) A processor cache, as shown in Figure 1.5, is discussed in Section 1.6. Suppose that execution time for a program is directly proportional to instruction access time and that access to an instruction in the cache is 20 times faster than access to an instruction in the main memory. Assume that a requested instruction is found in the cache with probability 0.96, and also assume that if an instruction is not found in the cache, it must first be fetched from the main memory to the cache and then fetched from the cache to be executed. Compute the ratio of program execution time without the cache to program execution time with the cache. This ratio is usually defined as the speedup factor resulting from the presence of the cache. (b) If the size of the cache is doubled, assume that the probability of not finding a requested instruction there is cut in half. Repeat Part a for a doubled cache size.

SOLUTIONS - Chapter 1 Basic Structure of Computers 1.1. Transfer the contents of register PC to register MAR Issue a Read command to memory, and then wait until it has transferred the requested word into register MDR Transfer the instruction from MDR into IR and decode it Transfer the address LOCA from IR to MAR Issue a Read command and wait until MDR is loaded Transfer contents of MDR to the ALU Transfer contents of R0 to the ALU Perform addition of the two operands in the ALU and transfer result into R0 Transfer contents of PC to ALU 1 to operand in ALU and transfer incremented address to PC 1.2. First three steps are the same as in Problem 1.1 1.3. (a) Transfer contents of R1 and R2 to the ALU Perform addition of two operands in the ALU and transfer answer into R3 Last two steps are the same as in Problem 1.1 (b) Yes; Store A,R0 B,R1 R0,R1 R1,C Move B,C A,C 1.4. (a) Non-overlapped time for Program i is 19 time units composed as: Program i 1 3 1 2 1 3 1 2 1 3 1 input compute output 1

Overlapped time is composed as: Program i 1 1 3 output 1 15 time units Program i 1 3 1 9 1 3 1 input compute output Program i+1 1 3 1 input Time between successive program completions in the overlapped case is 15 time units, while in the non-overlapped case it is 19 time units. Therefore, the ratio is 15/19. (b) In the discussion in Section 1.5, the overlap was only between input and output of two successive tasks. If it is possible to do output from job i 1, compute for job i, and input to job i+1 at the same time, involving all three units of printer, processor, and disk continuously, then potentially the ratio could be reduced toward 1/3. The OS routines needed to coordinate multiple unit activity cannot be fully overlapped with other activity because they use the processor. Therefore, the ratio cannot actually be reduced to 1/3. 1.5. (a) Let T R = (N R S R ) / R R and T C = (N C S C ) / R C be execution times on the RISC and CISC processors, respectively. Equating execution times and clock rates, we have Then 1.2 N R = 1.5 N C N C / N R = 1.2 / 1.5 = 0.8 Therefore, the largest allowable value for N C is 80% of N R. 2

(b) In this case 1.2 N R / 1.15 = 1.5 N C / 1.00 Then N C / N R = 1.2 / (1.15 1.5) = 0.696 Therefore, the largest allowable value for N C is 69.6% of N R. 1.6. (a) Let cache access time be 1 and main memory access time be 20. Every instruction that is executed must be fetched from the cache, and an additional fetch from the main memory must be performed for 4% of these cache accesses. Therefore, (b) Speedup factor = Speedup factor = 1.0 20 (1.0 1) + (0.04 20) = 11.1 1.0 20 (1.0 1) + (0.02 20) = 16.7 3