Lecture 1 Introduction and Basics

  • "C" as a model of computation.
  • Programmer's view of a computer system works.

  • HardWare designer's view of a computer system works.

  • Digital logic as a model of computation.

  • How does an assembly program end up executing as digital logic?


  • What happens in-between?
  • How is a computer designed using logic gates and wires to satisfy specific goals?

  • Architect/microarchitect's view:

How to design a computer that meets system design goals.

  • Choices critically affect both the SW programmer and the HW designer.

How do we ensure problems are solved by electrons?

  • program -> Algorithm -> Program/Language -> Runtime System(VM, OS, MM) -> ISA(Instruction Set Architecture) -> Microarchitecture -> Circuits -> Electrons
  • ! ISA which is that interface between the hardware and software.

The Power of Abstraction

  • Levels of transformation create abstractions

    • Abstraction: A higher level only needs to know about the interface to the lower level, not how the lower level is implemented.

    • E.g, High-level language programmer does not really need to know waht the ISA is and how a computer executes instructions.

  • Abstraction improves productivity.

    • No need to worry about decisions made in underlying levvels.
    • E.g., programming in Java vs. C vs. assembly vs. binary vs. by specifying control signals of each transistor every cycle.

Crossing the Abstraction Layers

  • As long as everything goes well, not knowing what happens in the underlying level (or above) is not a problem.

  • What if

    • The program you wrote is running slow?
    • The program you wrote does not run correctyl?
    • The program you wrote consumes too much energy?
  • What if

    • The hardware you designed is too hard to program?
    • The hardware you designed is too slow because it does not provide the right primitives to the software?
  • One goal of this course is to understand how a processor works underneath the software layer and how decisions made in hardware affect the software/programmer

DRAM Controllers

  • A row-conflict memory access takes significantly longer than a row-hit access

  • Current controllers take advantage of the row buffer.

  • Commonly used scheduling policy

    1. Row-hit first: Service row-hit memory accesses first
    2. Oldest-first: Then service older accesses first.
  • This scheduling policy aims to maximize DRAM throughput.

The problem

  • Multiple threads share the DRAM controller

  • DRAM controllers designed to maxmize DRAM throughput

  • DRAM scheduling policies are thread-unfair

    • Row-hit first: unfairly prioritizes threads with high row buffer locality
      • Threads that keep on accessing the same row.
    • Oldest-first: unfairly prioritizes memory-intensive threads
  • DRAM controller vulnerable to denial of service attacks

    • Can write programs to exploit unfairness.

A Memory Performance Hog

STREAM

// initialize large aarrays A, B
for (j = 0; j < N; j++) {
    index = j * linesizze; // streaming
    A[index] = B[index];
    ...
}
  • Sequential memory access
  • Very high row buffer locality(96% hit rate)
  • Memory intensive

RANDOM

// initialize large arrays A, B
for (j = 0, j < N; j++) {
    index = rand(); // random
    A[index] = B[index];
    ...
}
  • Random memory access
  • Very low row buffer locality (3% hit rate)
  • Similarly memory intensive

Goals

  • Teach/enable/empower you to:
    • Understand how a procesor works
    • Implement a simple processor (with not so simple parts)
    • Understand how decisions made in hardware affect the software/programmer as well as hardware designer
    • Think critically (in solving problems)
    • Think broadly across the levels of transformation
    • understand how to analyze and make tradeoffs in design.
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末哼鬓,一起剝皮案震驚了整個濱河市馋劈,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌版保,老刑警劉巖果覆,帶你破解...
    沈念sama閱讀 207,113評論 6 481
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件木西,死亡現(xiàn)場離奇詭異,居然都是意外死亡随静,警方通過查閱死者的電腦和手機八千,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 88,644評論 2 381
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來燎猛,“玉大人恋捆,你說我怎么就攤上這事≈乇粒” “怎么了沸停?”我有些...
    開封第一講書人閱讀 153,340評論 0 344
  • 文/不壞的土叔 我叫張陵,是天一觀的道長昭卓。 經(jīng)常有香客問我愤钾,道長,這世上最難降的妖魔是什么候醒? 我笑而不...
    開封第一講書人閱讀 55,449評論 1 279
  • 正文 為了忘掉前任能颁,我火速辦了婚禮,結(jié)果婚禮上倒淫,老公的妹妹穿的比我還像新娘伙菊。我一直安慰自己,他們只是感情好敌土,可當(dāng)我...
    茶點故事閱讀 64,445評論 5 374
  • 文/花漫 我一把揭開白布镜硕。 她就那樣靜靜地躺著,像睡著了一般返干。 火紅的嫁衣襯著肌膚如雪兴枯。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 49,166評論 1 284
  • 那天矩欠,我揣著相機與錄音财剖,去河邊找鬼悠夯。 笑死,一個胖子當(dāng)著我的面吹牛峰伙,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播该默,決...
    沈念sama閱讀 38,442評論 3 401
  • 文/蒼蘭香墨 我猛地睜開眼瞳氓,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了栓袖?” 一聲冷哼從身側(cè)響起匣摘,我...
    開封第一講書人閱讀 37,105評論 0 261
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎裹刮,沒想到半個月后音榜,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 43,601評論 1 300
  • 正文 獨居荒郊野嶺守林人離奇死亡捧弃,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 36,066評論 2 325
  • 正文 我和宋清朗相戀三年赠叼,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片违霞。...
    茶點故事閱讀 38,161評論 1 334
  • 序言:一個原本活蹦亂跳的男人離奇死亡嘴办,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出买鸽,到底是詐尸還是另有隱情涧郊,我是刑警寧澤,帶...
    沈念sama閱讀 33,792評論 4 323
  • 正文 年R本政府宣布眼五,位于F島的核電站妆艘,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏看幼。R本人自食惡果不足惜批旺,卻給世界環(huán)境...
    茶點故事閱讀 39,351評論 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望诵姜。 院中可真熱鬧朱沃,春花似錦、人聲如沸茅诱。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,352評論 0 19
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽瑟俭。三九已至翎卓,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間摆寄,已是汗流浹背失暴。 一陣腳步聲響...
    開封第一講書人閱讀 31,584評論 1 261
  • 我被黑心中介騙來泰國打工坯门, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人逗扒。 一個月前我還...
    沈念sama閱讀 45,618評論 2 355
  • 正文 我出身青樓古戴,卻偏偏與公主長得像,于是被迫代替她去往敵國和親矩肩。 傳聞我的和親對象是個殘疾皇子现恼,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 42,916評論 2 344

推薦閱讀更多精彩內(nèi)容

  • **2014真題Directions:Read the following text. Choose the be...
    又是夜半驚坐起閱讀 9,399評論 0 23
  • 有一種微妙,叫做人與人的關(guān)系黍檩。我與大丑叉袍,始于網(wǎng)絡(luò),差點末與線下刽酱。刪過幾次喳逛,加上又好友。到現(xiàn)在棵里,默默溫溫如老友润文,我煩...
    柯柯納閱讀 376評論 0 0
  • 首先,我也是一名女性殿怜。之所以想寫一下生命中各個時期遇到的女孩兒們转唉,是因為我發(fā)現(xiàn)女孩兒比男孩兒有趣多了。印象...
    樹蔭下的休憩閱讀 438評論 0 0
  • #華為隱喻100則#第十一則 鹽堿地是鹽類集積的一個種類稳捆,是指土壤里面所含的鹽分影響到作物的正常生長赠法,嚴(yán)重的鹽堿土...
    Y先生說閱讀 1,027評論 0 0
  • 閑來無事,看了七月份的一部電影——《大護法》乔夯。談不上好看砖织,卻也不難看。 電影中印象最深刻的是那個紅衣大護法末荐,他不老...
    百里長安321閱讀 203評論 0 1