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

正文內(nèi)容

深入理解計(jì)算機(jī)系統(tǒng)_復(fù)習(xí)_清華-全文預(yù)覽

  

【正文】 al 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。計(jì)算機(jī)組成原理 Zhang, Youhui (張悠慧 ) 2021 秋季 課程回顧 Topics ? 計(jì)算機(jī)系統(tǒng)結(jié)構(gòu)等相關(guān)概念與范疇 ? 數(shù)的表示 ? 匯編語(yǔ)言與 C語(yǔ)言 ? 代碼優(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):中斷類型、中斷級(jí)別和響應(yīng)方式 輸入輸出系統(tǒng):數(shù)據(jù)交換方式、交換過(guò)程控制 機(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ù)通路的寬度 各種操作對(duì)功能部件的共享程度 確定功能部件的并行度 設(shè)計(jì)緩沖和排隊(duì)策略 設(shè)計(jì)控制機(jī)構(gòu) 采用何種可靠性技術(shù) 概念 ——匯編語(yǔ)言 ? 用符號(hào)表示的機(jī)器語(yǔ)言,可包括宏構(gòu)造 概念 ——馮諾依曼計(jì)算機(jī) ? 特點(diǎn) : 存儲(chǔ)程序、運(yùn)算器為中心、集中控制 存儲(chǔ)器是字長(zhǎng)固定的、順序線性編址的一維結(jié)構(gòu),每個(gè)地址是唯一定義的 由指令形式的低級(jí)機(jī)器語(yǔ)言驅(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) 指令級(jí)并行度 TPC (Threading Per Cycle) 線程級(jí)并行度 例如:主頻 3GHz, 4核 Pentium4處理器的最高運(yùn)算速度為: P= 3GHz X 4IPC X 4TPC = 48GIPS 即:每秒鐘 480億次 概念 ——處理器運(yùn)算速度 ? 提高處理器性能的主要途徑 (1) 提高主頻 Fz: 增加流水線級(jí)數(shù),依靠計(jì)算機(jī)系統(tǒng)結(jié)構(gòu) 縮短門電路延遲時(shí)間,依靠電子技術(shù) (2) 提高指令級(jí)并行度 IPC 依靠并行算法和計(jì)算機(jī)系統(tǒng)結(jié)構(gòu) (3) 提高線程級(jí)并行度 TPC 依靠并行算法、程序設(shè)計(jì)和計(jì)算機(jī)系統(tǒng)結(jié)構(gòu) ? 近期出現(xiàn)的新問(wèn)題: 線延遲大于門延遲 漏電流很大 功耗驚人 ? 近期提高計(jì)算機(jī)性能的途徑 只能依靠并行算法、程序設(shè)計(jì)和計(jì)算機(jī)系統(tǒng)結(jié)構(gòu),不能指望電子技術(shù) ? 不僅對(duì)計(jì)算機(jī)系統(tǒng)結(jié)構(gòu),而且對(duì)并行算法、 軟件技術(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。amp。 tx = (int) ux。 Unsigned is dangerous! Integer C Puzzles Revisited ? x 0 ??? ((x*2) 0) ? ux = 0 ? x amp。 (x1) != 0 int x = foo()。 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。 Generally sets to Tmin or Tmax ? int to double ? Exact conversion, as long as int has ≤ 53 bit word size ? int to float ? Will round according to rounding mode Floating Point Puzzles ? For each of the following C expressions, either: ?Argue that it is true for all argument values ?Explain why not true ? x == (int)(float) x ? x == (int)(double) x ? f == (float)(double) f ? d == (float) d ? f == (f)。 Assume neither d nor f is NaN 匯編與 C語(yǔ)言 movl Operand Combinations Cannot do memorymemory transfer with a single instruction movl Imm Reg Mem Reg Mem Reg Mem Reg Source Dest C Analog movl $0x4,%eax temp = 0x4。 movl (%eax),%edx temp = *p。 int t1 = *yp。~ZF Gr eate r (Signed)setge ~(SF^OF) Gr eate r or Equal (Signed )setl (SF^OF) Le ss (Signed )setle (SF^OF)|ZF Le ss or Equal (Signe d)seta ~CFamp。 } return result。 } return result。 while (Test ) { Body Update 。 if (Test) goto loop。 } while (Test) done: “For”? “While” (JumptoMiddle) for (Init。 } Init。 done: While Version For Version Goto Version Switch Statements Implementation Options ? Series of conditionals ? Organize in tree structure ? Logarithmic performance ? Jump Table ? Lookup branch target ? Constant time ? Possible when cases are small integer constants ? GCC ? Picks one
點(diǎn)擊復(fù)制文檔內(nèi)容
研究報(bào)告相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1