




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A cheat sheet for the CS 61C course in Fall 2011. It covers topics such as incrementing memory addresses, calling conventions, memory access time, parallelism, CPU design, and hazards. It also includes examples and definitions for various concepts related to the course.
Typology: Study notes
1 / 8
This page cannot be seen from the preview
Don't miss anything!





CS 61C Fall 2011 Kenny Do Final cheat sheet
Stack frame includes return instruction address, parameters, space for local variables
Save and restore $s0-9 and $sp Save $ra if callee does nested function call Save $a0-3 and $t0-9 in caller if necessary
L1 Miss Penalty = L2 Hit Time + L2 Miss Rate * L2 Miss Penalty
Big endian stores the most signicant byte rst
{Single, Multiple} Instruction {Single, Multiple} Data Stream
mm{load, store, loadu, storeu, load1, add, mul}_pd
Single address space shared by all cores Coordination/communication through shared variables in memory ∗ Shared data coordinated via synchronization primitives (locks)
Modied = up-to-date data, changed (dirty), no other cache has a copy, OK to write, memory out-of-date Owner = up-to-date data, other caches may have a copy (they must be in Shared state) ∗ Only cache that supplies data on read instead of going to memory Exclusive = up-to-date data, no other cache has a copy, OK to write, memory up-to-date ∗ Avoids writing to memory if block replaced ∗ Supplies data on read instead of going to memory Shared = up-to-date data, other caches may have a copy Invalid = not in cache
All threads can access globally shared memory, but each thread also has private data
Complementarity ∗ x · x = 0 ∗ x + x = 1 Laws of 0's and 1's ∗ x · 0 = 0 ∗ x + 1 = 1 Identities ∗ x · 1 = x ∗ x + 0 = x Idempotent law ∗ x · x = x ∗ x + x = x Commutativity, associativity, and distrubution also apply Uniting theorem ∗ (x + y) x = x Uniting theorem 2 ∗ (x + y) x = xy DeMorgan's Law ∗ x · y = x + y ∗ x + y = x · y
cn is carry out, cn− 1 is carry in
Truth table for mux with 4-bits of signals controls 16 inputs, so it has 220 rows in truth table
Ex: {op, rs, rt, Imm 16 } ← M EM [P C]
nPCsel = 0 (next PC is PC + 4), 1 (branch), X (jump) Jump = 1 (is a jump), 0 ExtOp = zero, sign ALUsrc = 0 (regB), 1 (immed) ALUctr = ADD, SUB, OR MemWr = 1 (write memory), 0 MemToReg = 0 (ALU output goes to reg), 1 (Mem output goes) RegDst = 0 (rt), 1 (rd) RegWr = 1 (write register), 0
Cols are valid?, access rights, physical page address Row index == virtual address' page number Physical address is PPN, oset
VPN is split into TLB tag and index Cols are TLB tag, PPN, dirty? (== need to write to disk when replaced), ref (to calculate LRU replacement) Row index == index from VPN
Polling: processor reads from control register in loop until it is ready, then writes/reads data register, which resets ready bit of control register
PC of oending instr is saved in Exception Program Counter, cause is saved in Cause register, and jumps to exception handler code at 0x8000 0180 ∗ After exception, pipeline ushed, handler executed, then instr executed from scratch or program terminated ∗ Precise exceptions (actually used) · Earliest exception-causing instr is handled rst ∗ Imprecise exceptions · Pipeline stopped, software handler works out cause and what to do
Asynchronous, but does not prevent any instruction from completion
f (n) =
No contention for shared resources (ideal!) No per-thread overhead (ideal!) No pipelining