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

正文內(nèi)容

深入理解計(jì)算機(jī)系統(tǒng)_復(fù)習(xí)_清華(專業(yè)版)

2025-07-06 08:26上一頁面

下一頁面
  

【正文】 double v。 structure length must be multiples of K Example (under Windows or x8664): ? K = 8, due to double element c i[0] i[1] v p+0 p+4 p+8 p+16 p+24 Multiple of 4 Multiple of 8 Multiple of 8 Multiple of 8 Specific Cases of Alignment (IA32) Size of Primitive Data Type: ? 1 byte (., char) ? no restrictions on address ? 2 bytes (., short) ? lowest 1 bit of address must be 02 ? 4 bytes (., int, float, char *, etc.) ? lowest 2 bits of address must be 002 ? 8 bytes (., double) ? Windows (and most other OS’s amp。 j++) result += a[i*n+j] * b[j*n+k]。 A+i*C*4 A+(R1)*C*4 A+(i*C+j)*4 Nested Array Element Access Code Array Elements ? pgh[index][dig] is int ? Address: pgh + 20*index + 4*dig IA32 Code ? Computes address pgh + 4*dig + 4*(index+4*index) ? movl performs memory reference int get_pgh_digit (int index, int dig) { return pgh[index][dig]。a[i] leaq 8(%rdi), %rsi amp。 } Init。 } return result。 movl (%eax),%edx temp = *p。 (x1) != 0 int x = foo()。計(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):指令的操作類型、格式、排序等 存儲系統(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ì)功能部件:處理器,主存儲器等 數(shù)據(jù)通路的寬度 各種操作對功能部件的共享程度 確定功能部件的并行度 設(shè)計(jì)緩沖和排隊(duì)策略 設(shè)計(jì)控制機(jī)構(gòu) 采用何種可靠性技術(shù) 概念 ——匯編語言 ? 用符號表示的機(jī)器語言,可包括宏構(gòu)造 概念 ——馮諾依曼計(jì)算機(jī) ? 特點(diǎn) : 存儲程序、運(yùn)算器為中心、集中控制 存儲器是字長固定的、順序線性編址的一維結(jié)構(gòu),每個(gè)地址是唯一定義的 由指令形式的低級機(jī)器語言驅(qū)動 指令順序執(zhí)行,一般按照指令在存儲器中存放的順序執(zhí)行,程序分支由轉(zhuǎn)移指令實(shí)現(xiàn) 運(yùn)算器為中心,輸入輸出設(shè)備與存儲器之間的數(shù)據(jù)傳送都途經(jīng)運(yùn)算器 集中控制,運(yùn)算器、存儲器、輸入輸出設(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。 int y = bar()。 Src,Dest Indexed Addressing Modes Most General Form D(Rb,Ri,S) Mem[Reg[Rb]+S*Reg[Ri]+ D] ? D: Constant “displacement” ? Rb: Base register: Any of 8 integer registers ? Ri: Index register: Any, except for %esp ?Unlikely you’d use %ebp, either ? S: Scale: 1, 2, 4, or 8 Special Cases (Rb,Ri) Mem[Reg[Rb]+Reg[Ri]] D(Rb,Ri) Mem[Reg[Rb]+Reg[Ri]+D] (Rb,Ri,S) Mem[Reg[Rb]+S*Reg[Ri]] Address Computation Instruction leal Src,Dest ?Src is address mode expression ?Set Dest to address denoted by expression Uses ?Computing addresses without a memory reference ? ., translation of p = amp。 } Gcc New Conditional Branch Example Implementing Loops IA32 ? All loops translated into form based on “dowhile” x8664 ? Also make use of “jump to middle” Why the Difference ? IA32 piler developed for machine where all operations costly ? x8664 piler developed for machine where unconditional branches incur (almost) no overhead “For”? “While”? “DoWhile” for (Init。 goto middle。a[i+1] call swap swap() incq scount(%rip) scount++。 } %ecx = dig %eax = index leal 0(,%ecx,4),%edx 4*dig leal (%eax,%eax,4),%eax 5*index movl pgh(%edx,%eax,4),%eax *(pgh + 4*dig + 20*index) Array Element Accesses ? Similar C references Nested Array ? Element at Mem[pgh+20*index+4*dig] ? Different address putation MultiLevel Array ? Element at Mem[Mem[univ+4*index]+4*dig] int get_pgh_digit (int index, int dig) { return pgh[index][dig]。 return result。 instruction sets): 187。 } *sp。 int i[2]。 Satisfying Al
點(diǎn)擊復(fù)制文檔內(nèi)容
研究報(bào)告相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1