Download presentation
1
Measuring Performance
Early method – MIPS (millions of instructions per second) - measured by dividing the number of instructions executed in running a program by the time required to run the program. Less useful due to :- Different systems often require different number of instructions to implement a given program. MIPS does not provide number of instructions require to perform a given task.
2
IPC is the reciprocal of CPI .
CPI/IPC Another method of measuring performance Cycles per instruction (CPI). Calculated by dividing the number of clock cycles required to execute the program by the number of instructions executed in running the program. For systems that can execute more than one instruction per clock cycle, the number of instructions executed per clock cycle (IPC) is often used. IPC is the reciprocal of CPI . The lower CPI the better the system performance.
3
Example A given program consists of a 100- instruction loop that is executed 42 times. If it takes 16,000 cycles to execute the program on a given system, what are the system’s CPI and IPC for the program?
4
Solution Total number of instructions executed = 100 x 42 = 4,200
It takes 16,000 cycle to execute the program. So CPI = 16,000 / 4200 = 3.81 IPC = 1/CPI or 4,200/16,000. =0.26
5
speedup=(Execution time before)/(Execution time after)
IPC and CPI –also rarely used because both are lack of system’s clock rate information. SPEED UP - Used to describe how the performance of an architecture changes as different improvements are made to the architecture. speedup=(Execution time before)/(Execution time after) Example : if a program takes 25 seconds to run on one version of an architecture and 15 seconds to run on a new version, the overall speedup is 25 seconds / 15 seconds = 1.67.
6
Amdahl’s Law Amdahl’s Law: Make the common case (frequently used task) faster. Overall Speed up of a System = 1/ [( fraction unused) +( fraction used) / ( speed up) ] where fraction unused is the fraction of time for which the task is not in use, fraction used is the fraction of time for which the task is in use and speed up is the performance improvement for the task.
7
Example Suppose that a given architecture does not have hardware support for multiplication, so multiplication have to be done through repeated addition. If it takes 200 cycles to perform a multiplication in software, and 4 cycles in hardware, what is the overall speedup from hardware support for multiplication a) if a program spends 10 % of its time doing multiplications? b) if a program that spends 40 % of Its time doing multiplications.
8
Solution = 1/ [( 0.9) +( 0.1) / (50) ] = 1.11
In both cases, speedup when multiplication hardware is used = 200/4 = 50 (ratio of time to do a multiplication without the hardware to time with the hardware) a) Overall Speed up of a System = 1/ [( fraction unused) +( fraction used) / ( speed up) ] = 1/ [( 0.9) +( 0.1) / (50) ] = 1.11 Overall Speed up of a System = = 1/ [( 0.6) +( 0.4) / (50) ] = 1.64
9
TUTORIAL #2 5.3 Differentiate between DRAM and SRAM and give the
application example for each. 5.5 Explain why one type of RAM is considered to be analog and the other digital. 5.6 List the applications of ROM 5.7 Differentiate among EPROM, EEPROM and Flash Memory. 6.2 Briefly explain how are data written onto a magnetic disk 6.3 Briefly explain how are data read from a magnetic disk 6.4 Explain the difference between CAV system and a multiple zoned recording system. 6.3 Consider a single-platter disk with the following parameters: Rotation speed = 7200 rpm; number of tracks on one side of platter=30,000; number of sectors per track=600; seek time=one ms for every hundred tacks traversed . Let the disk receive a request to access a random sector on a random track and assume the head starts at track 0. Determine the average seek time, average rotational latency, transfer time for a sector, the total average time to satisfy a request. 7.3 List the major functions of I/O Module. 7.4 List and briefly define three techniques for performing I/O 7.5 What is the difference between memory-mapped I/O and isolated I/O 7.6 Suppose a device interrupt occurs, how does the processor determine which device issued the interrupt? 7.7 When a DMA module takes control of a bus, and while it retains control of the bus, what does the processor do?
10
TUTORIAL #2 2.11 A common measure of performance for a processor is the rate at which instructions are executed , expressed in MIPS. Express the MIPS rate in terms of the clock rate and CPI. 2.12 SEE P/g 46 2.13 SEE P/g 46 8.1 Define an Operating System 8.2 List and briefly define the key services provided by the operating system 8.3 List and briefly define the major type of OS scheduling 8.4 Differentiate between a process and a program 8.5 What is the purpose of swapping 8.10 What is the purpose of a translation look aside buffer? 13.1 what are some typical characteristics of RISC organization? 13.2 Briefly explain the two basic approaches used to minimize register- memory operations on RISC machines. 14.1 What is the essential characteristic of the superscalar approach processor design? 14.2 Differentiate between the superscalar and superpipelined approaches. 17.1 What is the difference between a hardwired implementation and a microprogrammed implementation of a control unit? 17.6 what is the basic tasks performed by a microprogrammed control unit? 17.10 List some common applications of microprogramming.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.