280 likes | 423 Views
COMP375 Computer Architecture and Organization. Senior Review. Goals for COMP375. Apply knowledge of computing and mathematics to solve problems of design and performance analysis Understand how the architecture affects program performance
E N D
COMP375Computer Architectureand Organization Senior Review
Goals for COMP375 • Apply knowledge of computing and mathematics to solve problems of design and performance analysis • Understand how the architecture affects program performance • Explain the design decisions of RISC and advanced architectures • Make informed decisions in the selection of computers • Understand the basics of computer hardware and how software interacts with computer hardware
Intel Performance Architectural Improvements
So What? • When you buy a computer, processor clock speed is not the sole determining factor of processing capability. • Recently processor clock speeds have decreased while potential performance has continued to increase.
Basic Computer Components CPU I/O Device Cache I/O Controller Bus Memory
Instruction Cycle • Fetch the instruction from the memory address in the Program Counter register • Increment the Program Counter • Decode the type of instruction • Fetch the operands • Execute the instruction • Store the results
Memory Hierarchy Caching Virtual Memory
Locality of Reference • Temporal Locality • A memory location that is referenced is likely to be accessed again in the near future. • Spatial Locality • Memory locations near the last access are likely to be accessed in the near future.
So What? • User programs do not directly control processor cache or virtual memory, but they have a big impact on their efficiency. • Programs that access memory with similar addresses will run faster than programs that have unpredictable varying accesses.
Steps in Accessing Memory • Compute effective address • Split effective address into page number and offset • Use page number as an index into the page table. (Check if too big.) • If Resident bit is clear, generate a page fault. • if Resident bit is set, get page address from the page table.
Steps in Accessing Memory • Concatenate page address with offset to create the physical address. • For direct L1 cache, get the middle bits of the physical address to determine which line to check. • Check the tag value of the specified line to see if it matches the upper bits of the physical address. • If there is a match, return the specified value from the cache.
Steps in Accessing Memory • If the tag field does not match, check the second level cache. • For n-way set associative L2 cache, get the middle bits of the physical address to determine which set to search. • Search the tag values of all n lines in the specified set to see if any match the upper bits of the physical address. • If there is a match, return the specified value from the cache.
Steps in Accessing Memory • If none of the n tag fields for the set match the upper bits of the physical then determine which of the lines in the specified set of the L2 cache is the oldest. This line will hold the new data. • If this line is dirty, write this block to RAM. • Get the physical address data from RAM. • Copy the block of data from RAM into the L1 and L2 caches. Send the CPU the data requested.
So What? • All programs think they start at address zero, but they don’t. • The OS can fit lots of big programs in tiny memory, although performance may suffer. • An “Execute Disable” bit in the page table prevents many stack overflow exploits.
Disk Performance Parameters Disk read or write involves three factors • Seek time • time it takes to position the head at the desired track • Rotational delay or rotational latency • time its takes for the beginning of the sector to reach the head • Transfer time • time required for the data to move under the head
Performance Example How long does it take to read two consecutive 512 byte blocks from the disk?
So What? • The seek time is long compared a simple block transfer time. • It is more efficient to read and write large blocks. One track or cylinder at a time is best. • CDs are slow for small files even if you have a 1,000,000X CD drive
RISC Processor Features • Pipelined • Simple instructions • Few instructions • No microcode • Few addressing modes • Load/Store architecture • Sliding register stack • Delayed branches • Fast
Hazards • A hazard is a situation that reduces the processors ability to pipeline instructions. • Resource – When different instructions want to use the same CPU resource. • Data – When the data used in an instruction is modified by the previous instruction. • Control – When a jump is taken or anything changes the sequential flow.
COMP375 Senior Exam • The senior exam questions are very similar to COMP375 exam questions. • You will probably want to bring a calculator to the exam.