计算机导论ch05

上传人:壹****1 文档编号:569381936 上传时间:2024-07-29 格式:PPT 页数:88 大小:2.76MB
返回 下载 相关 举报
计算机导论ch05_第1页
第1页 / 共88页
计算机导论ch05_第2页
第2页 / 共88页
计算机导论ch05_第3页
第3页 / 共88页
计算机导论ch05_第4页
第4页 / 共88页
计算机导论ch05_第5页
第5页 / 共88页
点击查看更多>>
资源描述

《计算机导论ch05》由会员分享,可在线阅读,更多相关《计算机导论ch05(88页珍藏版)》请在金锄头文库上搜索。

1、Chapter 5ComputerOrganizationDistinguish between the Distinguish between the three componentsthree components of a computer of a computer hardware.hardware.List the functionality of each component.List the functionality of each component.Understand Understand memory addressingmemory addressing and c

2、alculate the number and calculate the number of bytes for a specified purpose. of bytes for a specified purpose.After reading this chapter, the reader should be able to:OBJECTIVESDistinguish between different types of memories.Distinguish between different types of memories.Understand how each input

3、/output device works.Understand how each input/output device works. Continued on the next slideContinued on the next slideUnderstand the systems used to Understand the systems used to connectconnect different different components ponents together.Understand the Understand the addressingaddressing sy

4、stem for input/output system for input/outputdevices.devices.Understand the Understand the program executionprogram execution and machine cycles. and machine cycles.OBJECTIVES (continued)Distinguish between Distinguish between programmed I/Oprogrammed I/O, , interrupt-driveninterrupt-drivenI/OI/O an

5、d direct memory access ( and direct memory access (DMADMA). ).Understand the two major architectures used to define Understand the two major architectures used to define the instruction sets of a computer: the instruction sets of a computer: CISCCISC and and RISCRISC. . 5.1 Central processing Unit(C

6、PU)5.3 Input/Output 5.2 main memoryContents5.5 Program Execution5.6 Two different Architectures5.4 Subsystem InterconnectionKey TermsSummaryvon Neumann modelHow to connect different components? How to connect different components? Figure 5-1Computer hardware (subsystems)C CENTRALENTRALP PROCESSINGRO

7、CESSINGU UNITNIT(CPU)(CPU)5.1Figure 5-2CPUThe arithmetic logic unit(ALU) performs n Arithmetic Operation; n Logic Operation.ALURegisters are fast stand-alone storage locations that hold data temporarily.RegisterswData Register: R1 R2 R3wInstruction register: IwProgram Counter: PCControlling is achie

8、ved through wires that can be on or off. Control UnitMAIN MEMORYMAIN MEMORY5.2Figure 5-3Main memoryAddress spaceTable 5.1 Memory unitsTable 5.1 Memory unitsUnit-kilobytemegabytegigabyteterabytepetabyteexabyteExact Number of bytesExact Number of bytes-210 bytes220 bytes230 bytes240 bytes250 bytes260

9、bytesApproximation-103 bytes106 bytes109 bytes1012 bytes1015 bytes1018 bytesword: Data are transferred to and from memory in groups of bits called words. Byte: 8 bits word.Whats the difference between a word and a byte?Memory addresses are defined usingunsigned binary integers. Note:Example 1A compu

10、ter has 32 MB (megabytes) of memory. How many bits are needed to address any single byte in memory?SolutionThe memory address space is 32 MB, or 225 (25 x 220). This means you needlog2 225 or 25 bits, to address each byte.8B memory need 3bits to address.Example 2A computer has 128 MB of memory. Each

11、 word in this computer is 8 bytes. How many bits are needed to address any single word in memory?SolutionThe memory address space is 128 MB( 227). However, each word is 8 (23) bytes, which means that you have 224 words. This means you need log2 224 or 24 bits, to address each word.Two types of memor

12、y : RAM and ROM.RAM(random access memory):(1)RAM can be read from and written to by the user.(2)RAM is volatile.SRAM(static RAM):flip-flop gates, no need for refreshing.DRAM(dynamic RAM):capacitor.need to be refreshed periodically.Memory TypesROM:(Read-only memory)(1)The user is allowed to read but

13、not write to ROM.(2)ROM is nonvolatile.PROM:EPROM:EEPROM:Memory TypesFigure 5-4Memory hierarchyFigure 5-5CacheINPUT / OUTPUTINPUT / OUTPUT5.3Input/Output devices can be divided into two broad categories:nonstorage and storage devices.Nonstorage devices allow the CPU/memory to communicate with the ou

14、tside world but they can not store information.Nonstorage devicesStorage devices, although classified as I/O devices, can store large amounts of information to be retrieved at a later time.We categorize them as either magnetic or optical.Storage devicesMagnetic Storage DevicesMagnetic Storage Device

15、sFigure 5-6Physical layout of a magnetic diskFigure 5-7Surface organization of a diskFigure 5-8Mechanical configuration of a tape磁带卷轴收带卷轴Figure 5-9Surface organization of a tapeCD-ROMCD-RCD-RWDVD Optical Storage DevicesTable 5.2 CD-ROM speedsTable 5.2 CD-ROM speedsSpeedSpeed-1x2x4x6x8x12x16x24x32x40

16、xData RateData Rate-153,600 bytes per second307,200 bytes per second614,400 bytes per second921,600 bytes per second1,228,800 bytes per second1,843,200 bytes per second 2,457,600 bytes per second3,688,400 bytes per second 4,915,200 bytes per second6,144,000 bytes per secondApproximationApproximation

17、-150 KB/s300 KB/s600 KB/s900 KB/s1.2 MB/s1.8 MB/s2.4 MB/s3.6 MB/s4.8 MB/s6 MB/sTable 5.3 DVD capacitiesTable 5.3 DVD capacitiesFeatureFeature-single-sided, single-layersingle-sided, dual-layerdouble-sided, single-layerdouble-sided, dual-layerCapacityCapacity-4.7 GB8.5 GB9.4 GB17 GBSUBSYSTEMSUBSYSTEM

18、INTERCONNECTIONINTERCONNECTION5.4Figure 5-14Connecting CPU and memory using three busesFigure 5-15Connecting I/O devices to the busesControllers or interface:can be a serial or parallel device.A serial controller has only one wire connection to the device.A parallel controller has several connection

19、s to the device so that several bits can be transferred at a time.ControllersSCSI controllerFireWire controllerUSB controllerIsolated I/O addressingMemory-mapped I/O addressingPROGRAMPROGRAMEXECUTIONEXECUTION5.5Figure 5-21Steps of a cycleMachine cycle4 Machine cycleContents of memory and register be

20、fore executionMemoryA Machine Cycle Example 1Contents of memory and registers after each cycleMemoryContents of memory and registers after each cycleMemoryContents of memory and registers after each cycleMemoryContents of memory and registers after each cycleMemoryMOV AL, 07HMOV AL, 07HADD AL, 04HAD

21、D AL, 04HMOV 20H, ALMOV 20H, ALA Machine Cycle Example 2Figure 5-24Programmed I/OFigure 5-25Interrupt-driven I/ODMA connection to the general busDMA input/outputTWO DIFFERENTTWO DIFFERENTARCHITECTURESARCHITECTURES5.6The strategy behind CISC (complex instruction set computer) architecture is to have

22、a large set of instructions, including the complex ones.The strategy behind RISC (reduced instruction set computer) architecture is to have a small set of instructions that do minimum number of simple operations.Two different architecture -CISC and RISC指指令令(instruction) 控制计算机执行特定的算术、逻辑或控制运算的命令。一条指令可

23、以分两部分:操作码(op code) 和地址码(operands).0110 000010 000001ADD REG2 REG1CPU可以执行的全部指令称为Instruction set(指令集).Two different architecture操作码操作范例INP将给定值放到指定内存INP 7 M1MMR将指定内存中的值取到寄存器MMR M1 REG1MAR将累加器中值取到指定寄存器MAR REG1ADD两个寄存器中值相加,结果放在累加器中ADD REG1 REG2JMP跳转到指定内存中的指令JMP P2HLT停止程序执行HLT一个简单的微机指令集(部分)Two different a

24、rchitectureKey termsCISC(complex instruction set computer):复杂指令集计算机。:复杂指令集计算机。RISC(reduced instruction set computer):精简指令集计算机。:精简指令集计算机。Key termsaddress bus(地址总线)address space(地址空间)arithmetic logic unit(算术逻辑单元,ALU)bit pattern(位模式)cache memory(高速缓冲存储器)central processing unit(中央处理单元,CPU)Compact disc r

25、ead-only memory(只读光盘存储器,CD-ROM)Key termscompact disc recordable(可刻录光盘,CD-R)compact disc rewritable(可重写光盘,CD-RW)complex instruction set computer(复杂指令集计算机,CISC)control bus(控制总线)Control unit(控制单元)data bus(数据总线)data register(数据寄存器)Key termsdigital versatile disc(数字多功能光盘,DVD)direct memory access(可重写光盘,DM

26、A)dynamic RAM(动态RAM,DRAM)execute(执行)fetch(取指令)firewire(火线)Input/output controller(输入/输出控制器)Input/output subsystem(输入/输出子系统)Key termsinstruction register(指令寄存器)interrupt driven I/O(中断控制输入输出)isolated I/O(I/O独立寻址)machine cycle(机器周期)magnetic disk(磁盘)main memory(主存)Memory mapped I/O(存储器映射寻址)Key termsMain

27、 memory(主存储器):存储单元的集合。Address(地址):用来区别每一个存储单元的唯一的标识符。Address space(地址空间):所有在存储器中可标识的独立地址单元的总数。Bit pattern(位模式):由二进制数0和1组成的一个序列。Key termsRandom access memory(随机存取存储器,RAM):主存的主要组成部分。volatile(易失性)Static RAM(静态静态RAM)flip-flop gate(触发器门电路)Dynamic RAM(动态RAM)capacitor(电容)Key termsRead-only memory(只读存储器,ROM

28、)programmable read-only memory (PROM):可编程只读存储器Erasable programmable read-only memory (EPROM):可擦除可编程只读存储器Electronically erasable programmable read-only memory (EEPROM):电可擦除可编程只读存储器Key termsMemory hierarchy:存储器的层次结构Cache memory :高速缓冲存储器80-20 rule:指计算机通常会花费指计算机通常会花费80%的的时间来读取时间来读取20%的数据的数据Key termsInpu

29、t/output subsystem(输入输出子系统):使计算机与外部世界进行沟通的设备的集合。nonstorage device(非存储设备)storage device(存储设备)keyboard(键盘)Monitor( 监视器)Printer(打印机)Key termsMagnetic storage device(磁介质存储设备)Magnetic disk(磁盘)Read/write header(读写磁头)Surface organization(表面结构):track(磁道)、sector(扇区)Data access(数据存取)Key termsperformance( 性能)R

30、otational speed(角速度):磁盘的旋转速度Seek time(寻道时间):读写磁头寻找数据所在的磁道的时间。Transfer time(传送时间):将数据从磁盘移到CPU/内存所需要的时间Key termsOptical storage device(光介质存储设备):使用激光技术来存取数据。CD-ROM(compact disc read-only memory,只读光盘)Master disc(主盘):使用高能红外激光在塑料涂层上刻写位模式来制造主盘。(pit:坑 land:纹间表面)Polycarbonate resin (聚碳酸酯数脂):Aluminum(铝):作为反射层

31、材料。Reading:CD-ROM依靠来自计算机光驱的低能激光束读信息。Key termsCD-R(compact disc recordable,可刻录光盘)Polycarbonate resin (聚碳酸酯数脂):Gold(金):反射层材料Creation:刻录机产生的高能激光束在染料(dye)层上烧制深色的点,用来模拟坑,没有被激光照射的区域就是纹间表面(land)。Key termsCD-RW(compact disc rewritable,可重写光盘)(creation)An alloy of Silver、indium、antimony、 tellurium:银、锢、锑、碲的合金。

32、(read)low power laser:低能激光束(erase)a medium-power laser:中等能量的激光束Key termsDVD(digital versatile disc,数字多功能光盘)The pits are smaller:坑更小The tracks are closer to each other:磁道间更紧密The beam is red laser instead of infrared:用红激光代替红外激光Key termsbus(总线总线):系统中各个部件信息交换的公共通道Data bus(数据总线):address bus (地址总线)Control

33、 bus(控制总线) Key termsI/O controller/interface(I/O控制器或接口控制器或接口):将I/O设备连接到总线上。Serial controller:串行控制器,串行控制器,只有一根线连接只有一根线连接到设备上。到设备上。Parallel controller:并行控制器,并行控制器,有数根线连接有数根线连接到设备上。到设备上。SCSI(small computer system interface):小型小型计算机系统接口,计算机系统接口,是一个是一个8、16或或32的并行接口。的并行接口。FireWire(火线火线):IEEE标准标准1394规定的串行接

34、口。规定的串行接口。USB(Universal serial bus controller):通用串行总线通用串行总线控制器。控制器。Key termsIsolated I/O (I/O独立寻址独立寻址):用来读/写主存的指令与用来读/写输入输出设备的指令是完全不同的。Memory-mapped I/O(I/O存储器映射寻址):CPU将输入/输出控制器中的每一个寄存器都看成是主存中的字。Key termsProgram execution(程序执行程序执行)Machine cycle(机器周期机器周期) fetch(取指令):(取指令):控制单元命令系统将下一条要执行的指令复制到CPU的指令寄

35、存器中。被复制指令的地址保存在PC(程序计数器)中。复制完成后,PC自动加1指向内存中的下一指令。decode(译码译码):由控制单元进行译码,产生系统可以执行的二进制代码。execute(执行执行):控制单元发送工作命令到控制单元发送工作命令到CPU的的某个部件,进行具体的操作。某个部件,进行具体的操作。Key terms使使 I/O设备与设备与CPU/内存同步内存同步(synchronization)的方式有三种:的方式有三种:Programmed I/O(程序控制输入输出程序控制输入输出):CPU等待等待I/O设备。设备。 Interrupt-Driven I/O(中断控制输入输出):当

36、I/O设备准备好时,它通知(中断)CPU。Direct memory Access(直接存储器存取直接存储器存取,DMA):需要使用DMA控制器。Key termsI/O controller/interface(I/O控制器或接口控制器或接口):将I/O设备连接到总线上。Serial controller:串行控制器,串行控制器,只有一根线连接只有一根线连接到设备上。到设备上。Parallel controller:并行控制器,并行控制器,有数根线连接有数根线连接到设备上。到设备上。SCSI(small computer system interface):小型小型计算机系统接口,计算机系统

37、接口,是一个是一个8、16或或32的并行接口。的并行接口。FireWire(火线火线):IEEE标准标准1394规定的串行接口。规定的串行接口。USB(Universal serial bus controller):通用串行总线通用串行总线控制器。控制器。计算机有三个子系统:SummaryCPU、主存和I/O子系统CPU包括算术逻辑单元 (ALU)、寄存器组(register)、控制单元算术逻辑单元的作用负责算术(arithmetic)和逻辑(logic)运算寄存器的作用Summary独立的存储设备,可暂时保留数据。寄存器可以保存数据、指令,也可以作为程序计数器(program counte

38、r)控制单元的作用监控计算机中的操作RAM充当计算机中的主存。SRAM使用触发器门来保存数据,DRAM使用电容。SummaryROM的内容来自厂家;用户只能读取它的内容,而不能写入。计算机需要高速存储器作为寄存器,中速存储器作为高速缓冲寄存器,低速存储器作为主存。存储地址是用无符号二进制整数表示的主存(main memory)是存储单元的集合I/O子系统是使计算机和外部世界进行沟通的设备的集合;分为非存储设备和存储设备Summary键盘、监视器、打印机是非存储设备的例子磁盘是一种存储设备,每一张盘片都由磁道和扇区组成磁带是由磁道组成的存储设备。数据存取是顺序的。CD-ROM是一种光存储设备(o

39、ptical device),数据由厂家事先装盘,而且不能被擦除SummaryCD-R是一种光存储设备,用户可将数据写入盘中且数据不能被擦除CD-RW是一种光存储设备,用户将数据写入盘中,且数据可以被擦除并重写多次DVD是高容量的光存储设备数据总线(data bus)、地址总线(address bus)和控制总线(control bus)连接中央处理器和主存储器Summary控制器(controller)负责处理中央处理器与存储器和低速I/O设备间的I/O操作。SCSI、火线、USB都是常用的控制器。在程序中运行指令,CPU首先获取指令,接着译码,最后执行Summary有三种使CPU和输入输出设备同步的方法:程序控制输入输出、中断控制输入输出、DMACPU体系结构的两种设计分别是CISC和RISC有两种方法可以处理输入输出设备的寻址:I/O独立寻址和I/O存储器映射寻址

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 建筑/环境 > 施工组织

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号