Study Guide CECS 341Different types of languages:Assembly language: language used by compilersMachine language: language used by the computerHigh level languages: language used by programmersLevels of LanguagesHigh-level language1.Portable/convenientAssembly language1.Textual representation of instructionsHardware representation1.Encoded instructions/data2.All 1’s and 0’s (bits)Instruction Set Architecture1.Assembly/machine codeMicroarchitecture1.ISA implementationResponse time an throughtputResponse time1.How long it takes to do a taskThroughput1.Total work done per unit timeElapsed time1.Total response time, including all aspectsPerformancePerformance = 1/Execution Time“X is n time faster than Y”Example: time taken to run a program10s on A, 15s on BExecution TimeB / Execution TimeA= 15s / 10s = 1.5So A is 1.5 times faster than BCPU timeCPU time = CPU clock cycles * clock cycle time= CPU clock cycles/ Clock rateClock CyclesClock cycles = Instruction count * cycles per instructions
CPU time = Instruction count * CPI * Clock cycle time= Instruction count * CPI / Clock RateClock RateClock rate =1/ Clock cycle timePerformance should be high because that computer will be betterEg:1Consider three different processors P1, P2, and P3 executing the same instruction set. P1 has a 3GHz clock rate and a CPI of 1.5. P2 has a 2.5 GHz clock rate and a CPI of 1.2. P3 has a 3.5 GHzclock rate and has a CPI of 2.0.aWhich processor has the highest performance expressed in instructions per second?bWe are trying to reduce the execution time by 30% but this leads to an increase of 20% inthe CPI. What clock rate should we have to get this time reduction?