freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

深入理解計(jì)算機(jī)系統(tǒng)_復(fù)習(xí)_清華(已修改)

2025-05-27 08:26 本頁面
 

【正文】 計(jì)算機(jī)組成原理 Zhang, Youhui (張悠慧 ) 2021 秋季 課程回顧 Topics ? 計(jì)算機(jī)系統(tǒng)結(jié)構(gòu)等相關(guān)概念與范疇 ? 數(shù)的表示 ? 匯編語言與 C語言 ? 代碼優(yōu)化 計(jì)算機(jī)系統(tǒng)結(jié)構(gòu)等相關(guān)概念與范疇 概念 ——計(jì)算機(jī)系統(tǒng)結(jié)構(gòu) ? 編寫出能夠在機(jī)器上正確運(yùn)行的系統(tǒng)程序所 必須了解到的計(jì)算機(jī)系統(tǒng)的屬性 ? 研究計(jì)算機(jī)系統(tǒng)軟件與硬件的功能分配,確 定計(jì)算機(jī)系統(tǒng)軟件與硬件的分界面 ? 研究計(jì)算機(jī)系統(tǒng)的外部特性,即程序員所看 到的計(jì)算機(jī)系統(tǒng)屬性 ? 程序員看到的計(jì)算機(jī)系統(tǒng)屬性 數(shù)據(jù)表示:硬件直接認(rèn)別和處理的數(shù)據(jù)類型 尋址技術(shù):編址方式、尋址方式和定位方式 寄存器定義:寄存器定義、數(shù)量和使用規(guī)則 指令系統(tǒng):指令的操作類型、格式、排序等 存儲(chǔ)系統(tǒng):要求速度高、容量大、價(jià)格便宜 中斷系統(tǒng):中斷類型、中斷級別和響應(yīng)方式 輸入輸出系統(tǒng):數(shù)據(jù)交換方式、交換過程控制 機(jī)器工作狀態(tài):定義和切換方式,如內(nèi)核態(tài)、執(zhí)行態(tài)、管理態(tài)和用戶態(tài)等 概念 ——計(jì)算機(jī)組成 ? 計(jì)算機(jī)系統(tǒng)的邏輯實(shí)現(xiàn) 設(shè)計(jì)功能部件:處理器,主存儲(chǔ)器等 數(shù)據(jù)通路的寬度 各種操作對功能部件的共享程度 確定功能部件的并行度 設(shè)計(jì)緩沖和排隊(duì)策略 設(shè)計(jì)控制機(jī)構(gòu) 采用何種可靠性技術(shù) 概念 ——匯編語言 ? 用符號表示的機(jī)器語言,可包括宏構(gòu)造 概念 ——馮諾依曼計(jì)算機(jī) ? 特點(diǎn) : 存儲(chǔ)程序、運(yùn)算器為中心、集中控制 存儲(chǔ)器是字長固定的、順序線性編址的一維結(jié)構(gòu),每個(gè)地址是唯一定義的 由指令形式的低級機(jī)器語言驅(qū)動(dòng) 指令順序執(zhí)行,一般按照指令在存儲(chǔ)器中存放的順序執(zhí)行,程序分支由轉(zhuǎn)移指令實(shí)現(xiàn) 運(yùn)算器為中心,輸入輸出設(shè)備與存儲(chǔ)器之間的數(shù)據(jù)傳送都途經(jīng)運(yùn)算器 集中控制,運(yùn)算器、存儲(chǔ)器、輸入輸出設(shè)備的操作以及它們之間的聯(lián)系都由控制器控制 ? 現(xiàn)代處理器運(yùn)算速度計(jì)算公式: P= Fz X IPC X TPC 其中 : Fz為處理機(jī)的工作主頻 IPC (Instruction Per Cycle) 指令級并行度 TPC (Threading Per Cycle) 線程級并行度 例如:主頻 3GHz, 4核 Pentium4處理器的最高運(yùn)算速度為: P= 3GHz X 4IPC X 4TPC = 48GIPS 即:每秒鐘 480億次 概念 ——處理器運(yùn)算速度 ? 提高處理器性能的主要途徑 (1) 提高主頻 Fz: 增加流水線級數(shù),依靠計(jì)算機(jī)系統(tǒng)結(jié)構(gòu) 縮短門電路延遲時(shí)間,依靠電子技術(shù) (2) 提高指令級并行度 IPC 依靠并行算法和計(jì)算機(jī)系統(tǒng)結(jié)構(gòu) (3) 提高線程級并行度 TPC 依靠并行算法、程序設(shè)計(jì)和計(jì)算機(jī)系統(tǒng)結(jié)構(gòu) ? 近期出現(xiàn)的新問題: 線延遲大于門延遲 漏電流很大 功耗驚人 ? 近期提高計(jì)算機(jī)性能的途徑 只能依靠并行算法、程序設(shè)計(jì)和計(jì)算機(jī)系統(tǒng)結(jié)構(gòu),不能指望電子技術(shù) ? 不僅對計(jì)算機(jī)系統(tǒng)結(jié)構(gòu),而且對并行算法、 軟件技術(shù)和計(jì)算機(jī)應(yīng)用技術(shù)都將產(chǎn)生深遠(yuǎn)的 影響 概念 ——指令執(zhí)行速度 ? 平均速度 概念 ——Amdahl定律 數(shù)的表示 Bits, Bytes, and Integers Sizes of C Objects (in Bytes) ? C Data Type Typical 32bit Intel IA32 x8664 ? char 1 1 1 ? short 2 2 2 ? int 4 4 4 ? long 4 4 8 ? long long 8 8 8 ? float 4 4 4 ? double 8 8 8 ? long double 8 10/12 10/16 ? char * 4 4 8 187。 Or any other pointer BitLevel Operations in C ?Operations amp。, |, ~, ^ Available in C Logic Operations in C ?amp。amp。, ||, ! View 0 as ―False‖ Anything nonzero as ―True‖ Always return 0 or 1 Early termination Shift Operations ?Logical vs. Arithmetic ?Shift amount 0 or ? word size Signed vs. Unsigned in C Constants ? By default are considered to be signed integers ? Unsigned if have ―U‖ as suffix 0U, 4294967259U Casting ? Explicit casting between signed amp。 unsigned same as U2T and T2U int tx, ty。 unsigned ux, uy。 tx = (int) ux。 uy = (unsigned) ty。 ? Implicit casting also occurs via assignments and procedure calls tx = ux。 uy = ty。 Unsigned is dangerous! Integer C Puzzles Revisited ? x 0 ??? ((x*2) 0) ? ux = 0 ? x amp。 7 == 7 ??? (x30) 0 ? ux 1 ? x y ??? x y ? x * x = 0 ? x 0 amp。amp。 y 0 ??? x + y 0 ? x = 0 ?? x = 0 ? x = 0 ?? x = 0 ? (x|x)31 == 1 ? ux 3 == ux/8 ? x 3 == x/8 ? x amp。 (x1) != 0 int x = foo()。 int y = bar()。 unsigned ux = x。 unsigned uy = y。 Initialization Floating Point Representation ? Bits to right of ―binary point‖ represent fractional powers of 2 ? Represents rational number: bi bi–1 b2 b1 b0 b–1 b–2 b–3 b–j ? ? ? ? ? ? . 1 2 4 2i–1 2i ? ? ? ? ? ? 1/2 1/4 1/8 2–j bk ?2kk??ji?Numerical Form ? –1s M 2E ?Sign bit s determines whether number is negative or positive ?Significand M normally a fractional value in range [,). ?Exponent E weights value by power of two Encoding ? MSB is sign bit ? exp field encodes E ? frac field encodes M Sizes ? Single precision: 8 exp bits, 23 frac bits ? Double precision: 11 exp bits, 52 frac bits ? Extended precision: 15 exp bits, 63 frac bits Floating Point Representation s exp frac “Normalized” Numeric Values Condition ? exp ? 000…0 and exp ? 111…1 Exponent coded as biased value E = Exp – Bias ?Exp : unsigned value denoted by exp ?Bias : Bias value 187。Single precision: 127 (Exp: 1…254, E: 126…127) 187。Double precision: 1023 (Exp: 1…2046, E: 1022…1023) 187。in general: Bias = 2e1 1, where e is number of exponent bits Significand coded with implied leading 1 M = …x2 ? xxx…x: bits of frac ?Minimum when 000…0 (M = ) ?Maximum when 111…1 (M = – ?) ?Get extra leading bit for ―free‖ Denormalized Values Condition ? exp = 000…0 Value ? Exponent value E = –Bias + 1 ? Significand value M = …x2 ? xxx…x: bits of frac Cases ? exp = 000…0, frac = 000…0 ? Note that have distinct values +0 and –0 ? exp = 000…0, frac ? 000…0 Condition ? exp = 111…1 Cases ? exp = 111…1, frac = 000…0 ? Represents valu
點(diǎn)擊復(fù)制文檔內(nèi)容
研究報(bào)告相關(guān)推薦
文庫吧 www.dybbs8.com
公安備案圖鄂ICP備17016276號-1