




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Computer Organization AND DesignThe Hardware/Software InterfaceChapter 1Computer Abstractions and Technology2Contents of Chapter 1 1.1 Introduction 1.2 Below your program 1.3 Under the covers 1.4 Performance 1.5 Power wall 1.6 The Sea Change 1.7 Real Stuff: Manufacturing Chips Computers have led to
2、a third revolution for civilization The following applications used to be “computer science fiction” Automatic teller machines (ATM)Computers in automobilesLaptop computersWorld Wide WebHuman genome project1.1 IntroductionHistory of Computer Development1946 ENIAC (Electronic Numerical Integrator and
3、 Calculator)5The first electronic computersENIAC (Electronic Numerical Integrator and Calculator)30 tons, 80 feet long, 8.5 feet high, several feet wide18,000 vacuum tubes $ 500,0006第一台电子计算机的真正发明人是美国爱阿华大学物理学教授约翰文森特阿塔那索夫 1973年10月19日,美国法院经过开庭审讯135次后,当众宣布:“莫奇利和埃科特没有发明第一台计算机,只是利用了阿塔那索夫发明中的构思。”理由是阿塔那索夫早在
4、1941年,就把他对电子计算机的思想告诉过ENIAC的发明人莫契利。 (John V. Atanasoff ,1903-1995)Eckert and Mauchly did not themselves first invent the automatic electronic digital computer, but instead derived that subject matter from one Dr. John Vincent Atanasoff8冯诺依曼的EDVAC方案1945年6月,冯诺依曼提出了一个全新的存储程序通用计算机方案“EDVAC” (Electronic Di
5、screte Variable Automatic Computer意为“离散变量自动电子计算机”)9 计算机之父冯诺依曼John Von Neumann,19031957美籍匈牙利数学家 1926年, 获匈牙利布达佩斯大学数学博士 1931年, 成为普林斯顿大学终身教授 1933年, 进入普林斯顿高等研究院, 与爱因斯坦等人成为该院最初四位教授之一 冯诺依曼公式: A) 冯诺依曼可以证明任何事情 B) 冯诺依曼所证明的任何事情都是正确的。 From 美国普林斯顿研究所 精通7门语言; 在化学方面也有相当的造诣,曾获苏黎世高等技术学院化学系大学学位。鉴于冯诺依曼在发明电子计算机中所起到关键性作
6、用,他被西方人誉为“计算机之父”; 在经济学方面突破性成就,被誉为“博弈论之父”; 在物理领域,冯诺依曼在30年代撰写的量子力学的数学基础已经被证明对原子物理学发展有重要价值EDSAC (Electronic Delay Storage Automatic Calculator)Operational in 1949First full-scale, operational, stored-program computer in the world 第一台实用的存储程序式计算机 Commercial Developments Eckert-Mauchly Computer Corporatio
7、n Formed in 1947 $1 million for each of the 48 computersIBM computersFirst one, the IBM 701, shipped in 1952Investing $5 billion for System/360 in 196412Cray CDC 6600The first supercomputer, built in 1963Digital Equipment Corporation (DEC)Low-cost design, under $20,00014First commercial minicomputer
8、 PDP-8, 1965First microcomputer, 197715Personal computer Apple II, in 1977 Low cost, high volume, high reliabilityIBM Personal Computer Best-selling computer of any kindMicroprocessors of Intel and operating systems of Microsoft became popular17 Computer Generations First generation 1950-1959, vacuu
9、m tubes, commercial electronic computer Second generation 1960-1968, transistors, cheaper computers Third generation 1969-1977, integrated circuit, minicomputer Fourth generation 1978-1997, LSI and VLSI, PCs and workstations Fifth generation 1998-?, micromation and hugeness selfstudy courseGrowth of
10、 capacity per DRAM chip over timenew departure from computer hardwareMulticoreFrom 2006IBM/SUN/AMD/Intelnumber of core2, 4, 8, 16, 48Softwareadequate provision?Embedded systemembed PC into electronic productpervasive computing/Ubiquitous computingDevice innovationPS3, Xbox 360Communication3G/4G/WIMA
11、X超级计算机天河二号21 Tomorrows science fiction computer applications Cashless societyDigital cash from 2004 failed Automated intelligent highwaysITS from 2003 failed Genuinely ubiquitous computingEmbedded system from 1999 ?Mobile phone will kilo-core ? GPU: 1600 coresCloud computing? The influence of hardwa
12、re on software In the past Memory size was very small Programmers must minimize memory space to make programs fast Nowadays The hierarchical nature of memories The parallel nature of processors Programmers must understand computer organization more Computer majorHardware/SystemOrganization, architec
13、tureTheory/SoftwareAlgorithm, Language principleApplicationDatabase, Web, Embedded systems, graphics, Personal ComputerE.g. Desktop, laptopServerHigh performanceE.g. Mainframes, minicomputers, supercomputers, data centerApplicationWWW, search engine, weather broadcastEmbedded Computersa computer sys
14、tem with a dedicated function within a larger mechanical or electrical systemE.g. Cell phone, microprocessors in cars/ televisionClasses of Computer applicationsGrowth of Sales of Embedded Computers1.2 Below your programsSystems softwareaimed at programmersE.g. Operation Systems, Database, Compiler
15、Applications softwareaimed at usersE.g. Word, IE, QQ, WeChat Computer language Computers only understands electrical signals Binary numbers express machine instructions e.g. 1000110010100000 means to add two numbersEasiest signals: on and off Very tedious to writeAssembly language Symbolic notations
16、 e.g. add a, b, c #a=b+c The assembler translates them into machine instruction Programmers have to think like the machineComputer Language and Software SystemThe Instruction Set Architecture (ISA)instruction set architecturesoftwarehardwareThe interface description separating the software and hardw
17、areHigh-level programming language Notations more closer to the natural language The compiler translates them into assembly language statements Advantages over assembly language Programmers can think in a more natural language Improved programming productivity Programs can be independent of hardware
18、 Subroutine library - reusing programsWhich one faster? Asm、C、C+、JavaLower, fasterBelow the ProgramC compilerassembler High-level language program (in C) swap (int v, int k) . . . Assembly language program (for MIPS) swap: sll $2, $5, 2 add $2, $4, $2 lw $15, 0($2) lw $16, 4($2) sw $16, 0($2) sw $15
19、, 4($2) jr $31 Machine (object) code (for MIPS) 000000 00000 00101 0001000010000000 000000 00100 00010 0001000000100000 100011 00010 01111 0000000000000000 100011 00010 10000 0000000000000100 101011 00010 10000 0000000000000000 101011 00010 01111 0000000000000100 000000 11111 00000 0000000000001000
20、Mouse The mechanical version Moving the mouse rolls the large ball inside The ball makes contact with an x-wheel and a y-wheel Decide the distance and direction the mouse moves according to the rotation of wheels The photoelectric version Better orientation and better precision1.3 Under the covers道格
21、恩格尔巴特(1925-2013), 鼠标之父, 1997年图灵奖鼠标1968 Display CRT (raster cathode ray tube) display Scan an image one line at a time, 30 to 75 times / s Pixels and the bit map, 512340 to 15601280 The more bits per pixel, the more colors to be displayedLCD (liquid crystal display) Thin and low-power The LCD pixel i
22、s not the source of light Rod-shaped molecules in a liquid that form a twisting helix that bends light entering the displayProcessorMemory moduleProcessorMemory moduleExpansion cardsSound cardModem cardVideo cardNetwork interface cardPorts and ConnectorsProcessorMemory moduleExpansion cardsSound car
23、dProcessorMemory moduleExpansion cardsSound cardModem cardProcessorMemory moduleExpansion cardsSound cardModem cardVideo cardProcessorMemory moduleExpansion cardsSound cardModem cardVideo cardNetwork interface cardProcessorThe System UnitWhat are common components inside the system unit?What is the
24、motherboard?Close-up of PC motherboardWhat diff Slot 0Slot3Speed0123Primeslave37Inside a laptop computer3839CPUCPU散热风扇内存条电源主机箱40软驱硬盘显卡声卡光驱The five classic components of a computer AbstractionsLower-level details are hidden to higher levelsInstruction set architecture - the interface between hardware
25、 and lowest-level softwareMany implementations of varying cost and performance can run identical software A safe place for data - secondary memory Main memory is volatile Secondary memory is nonvolatileBelow the ProgramC compilerassembler High-level language program (in C) swap (int v, int k) . . .
26、Assembly language program (for MIPS) swap: sll $2, $5, 2 add $2, $4, $2 lw $15, 0($2) lw $16, 4($2) sw $16, 0($2) sw $15, 4($2) jr $31 Machine (object) code (for MIPS) 000000 00000 00101 0001000010000000 000000 00100 00010 0001000000100000 100011 00010 01111 0000000000000000 100011 00010 10000 00000
27、00000000100 101011 00010 10000 0000000000000000 101011 00010 01111 0000000000000100 000000 11111 00000 0000000000001000Input Device Inputs Object Code ProcessorControlDatapathMemory 000000 00000 00101 0001000010000000 000000 00100 00010 0001000000100000 100011 00010 01111 0000000000000000 100011 000
28、10 10000 0000000000000100 101011 00010 10000 0000000000000000 101011 00010 01111 0000000000000100 000000 11111 00000 0000000000001000DevicesInputOutputNetworkObject Code Stored in Memory ProcessorControlDatapathMemory000000 00000 00101 0001000010000000000000 00100 00010 0001000000100000100011 00010
29、01111 0000000000000000100011 00010 10000 0000000000000100101011 00010 10000 0000000000000000101011 00010 01111 0000000000000100000000 11111 00000 0000000000001000DevicesInputOutputNetwork Processor Fetches an Instruction ProcessorControlDatapathMemory000000 00000 00101 0001000010000000000000 00100 0
30、0010 0001000000100000100011 00010 01111 0000000000000000100011 00010 10000 0000000000000100101011 00010 10000 0000000000000000101011 00010 01111 0000000000000100000000 11111 00000 0000000000001000Processor fetches an instruction from memoryDevicesInputOutputNetwork Control Decodes the Instruction Pr
31、ocessorControlDatapathMemory000000 00100 00010 0001000000100000Control decodes the instruction to determine what to executeDevicesInputOutputNetworkDatapath Executes the Instruction ProcessorControlDatapathMemorycontents Reg #4 ADD contents Reg #2results put in Reg #2Datapath executes the instructio
32、n as directed by control000000 00100 00010 0001000000100000DevicesInputOutputNetworkPerformance metrics:Response time, wall-clock time, or elapsed timeThe time between the start and the completion of an eventExecution timeThe time CPU spends computing , not include time spent waiting Throughputthe t
33、otal amount of work done in a given time.491.4 Performance50“X is faster than Y”the execution time on Y is longer than that on X.“X is n times faster than Y”“the throughput of X is 1.3 times higher than Y”the number of tasks completed per unit time on machine X is 1.3 times the number completed on Y
34、.If computer A runs a program in 10 seconds and computer B runs the same program in 15 seconds, how much faster is A than B?51Example The performance ratio is 15/10=1.5 A is therefore 1.5 times faster than B52Measuring Performancewall-clock time, response time, or elapsed time,Including disk accesse
35、s, memory accesses, input/output activities, operating system overhead everything.CPU time= user CPU time+ system CPU time.User CPU time: the CPU time spent in a program itselfSystem CPU time: the CPU time spent in the operating system Clock cycle (also tick): the time for one clock period.250ps (Pi
36、coSeconds)Clock rate: the count of clocks in one second.4GHz (GigaHertz)倒数关系?53clockClock cycle time and clock rate are inverses.The inverse/reciprocal of clock cycle is clock rate.54ExampleOne program runs in 10 seconds on computer A, which has a 2 GHz clock. Computer B requires 1.2 times as many c
37、lock cycles as computer A for this program. To run this program in 6 seconds, what clock rate should the computer B supply? CPU clock cyclesA=102109=21010 Clock rateB=1.221010/6=4GHz To run the program in 6 seconds, B must have twice the clock rate of A.Clock cycles per instruction (CPI): average nu
38、mber of clock cycles per instruction for a programDifferent instructions may take different amounts of time depending on what they do.CPI provides one way of comparing two different implementations of the same instruction set architecture.Instruction set architecture(ISA)The number of instructions e
39、xecuted for a program will be the same, if the program run in two different implementations of the same instruction set architecture.55Instruction PerformanceCPU time=Instruction count CPIClock cycle timeCPU time=Instruction count CPI/Clock rate56CPU Performance Equation57ExampleSuppose we have two
40、implementations of the same instruction set architecture. Computer A has a clock cycle time for 250ps and a CPI of 2.0 for some program, and computer B has a clock cycle time of 500ps and a CPI of 1.2 for the same program. Which computer is faster for this program and by how much? I: the number of i
41、nstructions for the program CPU timeA=I2250(ps)=500I (ps) CPU timeB=I1.2500(ps)=600I (ps) Computer A is 1.2 times as fast as computer B for this program.58Choosing Programs to Evaluate Performancefive levels of programs :Real applicationsModified (or scripted) applicationsKernelsToy benchmarksSynthe
42、tic benchmarks59Desktop BenchmarksCPU-intensive benchmarksSPEC89SPEC92SPEC95SPEC2000 SPEC2006graphics-intensive benchmarksSPEC2000SPECviewperfis used for benchmarking systems supporting the OpenGL graphics librarySPECapcconsists of applications that make extensive use of graphics.60Server Benchmarks
43、SPECrate-processing rate of a multiprocessor(SPECSFS)-file server benchmark(SPECWeb)-Web server benchmarkTransaction-processing (TP) benchmarksTPC benchmarkTransaction Processing CouncilTPC-A, 1985TPC-C, 1992,TPC-H TPC-RTPC-W61Embedded BenchmarksEDN Embedded Microprocessor Benchmark Consortium (or E
44、EMBC, pronounced “embassy”).62CPU performance is dependent upon three characteristics: clock cycle (or rate) clock cycles per instruction and instruction count.It is difficult to change one parameter in complete isolation from others because the basic technologies involved in changing each characteristic are interdependent:6364Po
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年江苏省吴江市平望中学高二物理第二学期期末检测试题含解析
- 福建省示范名校2025年物理高二第二学期期末质量检测试题含解析
- 天津七中2025届高一物理第二学期期末检测试题含解析
- 2025年河北省衡水市物理高二下期末学业水平测试试题含解析
- 2025届陕西省西安电子科技大学附属中学物理高二下期末调研试题含解析
- 安徽凤阳县城西中学2025届高二物理第二学期期末经典试题含解析
- 安徽省合肥市一六八中2025年高二物理第二学期期末达标检测模拟试题含解析
- 2025年山西省孝义市物理高一第二学期期末统考模拟试题含解析
- 甘肃省兰州市兰大附中2025年物理高一第二学期期末监测模拟试题含解析
- 四川省泸县五中2025届高二物理第二学期期末调研模拟试题含解析
- DB45∕T 1098-2024 橡胶沥青路面施工技术规范
- 2025年沈阳水务集团招聘笔试冲刺题2025
- 《蚕丝》教学课件
- 浙江省丽水市普通高中2024-2025学年高二上学期期末教学质量监控日语试卷(PDF版含答案不含音频和听力原文)
- 2025至2030电子海图行业产业运行态势及投资规划深度研究报告
- 东莞东华分班数学试卷
- 江西省金控科技产业集团有限公司招聘笔试题库2025
- 2025年湖北省中考英语试题(附答案)
- 2025中国系统性红斑狼疮诊疗指南解读课件
- 成人重症患者颅内压增高防控护理专家共识
- 2025年网络安全与信息保护基础知识考试题及答案
评论
0/150
提交评论