Introduction n Rapidly changing field n vacuum tube
Introduction n Rapidly changing field: n vacuum tube -> transistor -> IC -> VLSI n doubling every 1. 5 years: n n n memory capacity processor speed (due to advances in technology and hardware organization) cute example: if Boeing had kept up with IBM we could fly from Bangkok to HCM City in 10 minutes for 5 baht (2000 dong) !!
The Five Classic Components of a Computer n n n Input (mouse, keyboard, …) Output (display, printer, …) Memory Input main (DRAM), cache (SRAM) n secondary (disk, CD, DVD, …) Processor Datapath Processor (CPU) Control n n n Control Datapath Output Memory 10010110000 00101010001 111101100110 1001010010110000
Abstraction Delving into the depths reveals more information, but… n An abstraction omits “unneeded” detail, helps us cope with complexity n n From the figure on the right, how does abstraction help the programmer and how does she avoid too much detail?
Forces on Computer Architecture Technology Programming Languages Applications Computer Architecture Operating Systems History
Evolution of computers and computer architecture
Continued. . .
Continued…
Continued…
Performance n n Performance is the key to understanding underlying motivation for the hardware and its organization Measure, report, and summarize performance to enable users to n n n make intelligent choices see through the marketing hype! Why is some hardware better than others for different programs? What factors of system performance are hardware related? (e. g. , do we need a new machine, or a new operating system? ) How does the machine's instruction set affect performance?
Computer Performance: TIME, TIME!!! n Response Time (elapsed time, latency): n how long does it take for my job to run? n how long does it take to execute (start to finish) my job? n n Individual user concerns… how long must I wait for the database query? Throughput: n how many jobs can the machine run at once? n what is the average execution rate? Systems manager concerns… how much work is getting done? Response time is basically a measure of how fast a drive is in servicing a request. Another measurement of drive performance is the throughput or its capacity to handle work. n
Execution Time n Elapsed Time n n n counts everything (disk and memory accesses, waiting for I/O, running other programs, etc. ) from start to finish a useful number, but often not good for comparison purposes elapsed time = CPU time + wait time (I/O, other programs, etc. ) CPU time doesn't count waiting for I/O or time spent running other programs n can be divided into user CPU time and system CPU time (OS calls) CPU time = user CPU time + system CPU time elapsed time = user CPU time + system CPU time + wait time n n Our focus: user CPU time (CPU execution time or, simply, execution time) n time spent executing the lines of code that are in our program
Definition of Performance n For some program running on machine X: Performance. X = 1 / Execution time. X n X is n times faster than Y means: Performance. X / Performance. Y = n
Clock Cycles n n Instead of reporting execution time in seconds, we often use cycles. In modern computers hardware events progress cycle by cycle: in other words, each event, e. g. , multiplication, addition, etc. , is a sequence of cycles Clock ticks indicate start and end of cycles: n n tick cycle time = time between ticks = seconds per cycle clock rate (frequency) = cycles per second (1 Hz. = 1 cycle/sec, 1 MHz. = 106 cycles/sec)
Measuring Performance n
Example Problem n n n Our favorite program runs in 10 seconds on computer A, which has a 2 GHz. clock. We are trying to help a computer designer build a new machine B, that will run this program in 6 seconds. The designer can use new (or perhaps more expensive) technology to substantially increase the clock rate, but has informed us that this increase will affect the rest of the CPU design, causing machine B to require 1. 2 times as many clock cycles as machine A for the same program. What clock rate should we tell the designer to target?
Solution. . n
Cont… n
- Slides: 17