Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Organization

Similar presentations


Presentation on theme: "Computer Organization"— Presentation transcript:

1 Computer Organization
Chapter 5 Computer Organization

2 OBJECTIVES After reading this chapter, the reader should be able to:
Distinguish between the three components of a computer hardware. List the functionality of each component. Understand memory addressing and calculate the number of bytes for a specified purpose. Distinguish between different types of memories. Understand how each input/output device works. Continued on the next slide

3 OBJECTIVES (continued)
Understand the systems used to connect different components together. Understand the addressing system for input/output devices. Understand the program execution and machine cycles. Distinguish between programmed I/O, interrupt-driven I/O and direct memory access (DMA). Understand the two major architectures used to define the instruction sets of a computer: CISC and RISC.

4 Contents 5.1 Central processing Unit(CPU) 5.2 main memory
5.3 Input/Output 5.4 Subsystem Interconnection 5.5 Program Execution 5.6 Two different Architectures Key Terms Summary

5 von Neumann model How to connect different components?

6 Computer hardware (subsystems)
Figure 5-1 Computer hardware (subsystems)

7 5.1 CENTRAL PROCESSING UNIT (CPU)

8 Figure 5-2 CPU

9 The arithmetic logic unit(ALU) performs Arithmetic Operation;
Logic Operation.

10 Instruction register: I Program Counter: PC
Registers Registers are fast stand-alone storage locations that hold data temporarily. Data Register: R1 R2 R3 Instruction register: I Program Counter: PC

11 Controlling is achieved through wires that can be on or off.
Control Unit Controlling is achieved through wires that can be on or off.

12 5.2 MAIN MEMORY

13 Figure 5-3 Main memory Address space

14 Approximation ------------ 103 bytes 106 bytes 109 bytes 1012 bytes
Table 5.1 Memory units Unit kilobyte megabyte gigabyte terabyte petabyte exabyte Exact Number of bytes 210 bytes 220 bytes 230 bytes 240 bytes 250 bytes 260 bytes Approximation 103 bytes 106 bytes 109 bytes 1012 bytes 1015 bytes 1018 bytes What’s the difference between a word and a byte? word: Data are transferred to and from memory in groups of bits called words. Byte: 8 bits word.

15 Memory addresses are defined using unsigned binary integers.
Note: Memory addresses are defined using unsigned binary integers.

16 Example 1 A computer has 32 MB (megabytes) of memory. How many bits are needed to address any single byte in memory? 8B memory need 3bits to address. Solution The memory address space is 32 MB, or 225 (25 x 220). This means you need log2 225 or 25 bits, to address each byte.

17 Example 2 A computer has 128 MB of memory. Each word in this computer is 8 bytes. How many bits are needed to address any single word in memory? Solution The 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.

18 Memory Types Two types of memory : 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.

19 ROM:(Read-only memory)
Memory Types ROM:(Read-only memory) (1)The user is allowed to read but not write to ROM. (2)ROM is nonvolatile. PROM: EPROM: EEPROM:

20 Memory hierarchy Figure 5-4

21 Cache Figure 5-5

22 5.3 INPUT / OUTPUT

23 Nonstorage devices Input/Output devices can be divided into two broad categories:nonstorage and storage devices. Nonstorage devices allow the CPU/memory to communicate with the outside world but they can not store information.

24 We categorize them as either magnetic or optical.
Storage devices Storage 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.

25 Magnetic Storage Devices

26 Magnetic Storage Devices

27 Physical layout of a magnetic disk
Figure 5-6

28 Surface organization of a disk
Figure 5-7 Surface organization of a disk

29 Mechanical configuration of a tape
Figure 5-8 Mechanical configuration of a tape 磁带卷轴 收带卷轴

30 Surface organization of a tape
Figure 5-9

31 Optical Storage Devices
CD-ROM CD-R CD-RW DVD

32

33 3,688,400 bytes per second 4,915,200 bytes per second
Table 5.2 CD-ROM speeds Speed 1x 2x 4x 6x 8x 12x 16x 24x 32x 40x Data Rate 153, bytes per second 307, bytes per second 614, bytes per second 921, bytes per second 1,228, bytes per second 1,843, bytes per second 2,457,600 bytes per second 3,688, bytes per second 4,915,200 bytes per second 6,144,000 bytes per second Approximation 150 KB/s 300 KB/s 600 KB/s 900 KB/s 1.2 MB/s 1.8 MB/s 2.4 MB/s 3.6 MB/s 4.8 MB/s 6 MB/s

34 single-sided, single-layer single-sided, dual-layer
Table DVD capacities Feature single-sided, single-layer single-sided, dual-layer double-sided, single-layer double-sided, dual-layer Capacity 4.7 GB 8.5 GB 9.4 GB 17 GB

35 5.4 SUBSYSTEM INTERCONNECTION

36 Connecting CPU and memory using three buses
Figure 5-14

37 Connecting I/O devices to the buses
Figure 5-15

38 Controllers 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 connections to the device so that several bits can be transferred at a time.

39 SCSI controller

40 FireWire controller

41 USB controller

42 Isolated I/O addressing

43 Memory-mapped I/O addressing

44 5.5 PROGRAM EXECUTION

45 Machine cycle 4 Machine cycle Figure 5-21 Steps of a cycle

46 A Machine Cycle Example 1
Memory Contents of memory and register before execution

47 Contents of memory and registers after each cycle

48 Contents of memory and registers after each cycle

49 Contents of memory and registers after each cycle

50 Contents of memory and registers after each cycle

51 A Machine Cycle Example 2
MOV AL, 07H ADD AL, 04H MOV [20H], AL

52 Programmed I/O Figure 5-24

53 Interrupt-driven I/O Figure 5-25

54 DMA connection to the general bus

55 DMA input/output

56 5.6 TWO DIFFERENT ARCHITECTURES

57 Two different architecture ---CISC and RISC
The strategy behind CISC (complex instruction set computer) architecture is to have 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.

58 CPU可以执行的全部指令称为Instruction set(指令集).
Two different architecture 指令(instruction) 控制计算机执行特定的算术、逻辑或控制运算的命令。 一条指令可以分两部分:操作码(op code) 和地址码(operands). ADD REG2 REG1 CPU可以执行的全部指令称为Instruction set(指令集).

59 Two different architecture
操作码 操作 范例 INP 将给定值放到指定内存 INP 7 M1 MMR 将指定内存中的值取到寄存器 MMR M1 REG1 MAR 将累加器中值取到指定寄存器 MAR REG1 ADD 两个寄存器中值相加,结果放在累加器中 ADD REG1 REG2 JMP 跳转到指定内存中的指令 JMP P2 HLT 停止程序执行 一个简单的微机指令集(部分)

60 Key terms CISC(complex instruction set computer):复杂指令集计算机。
RISC(reduced instruction set computer):精简指令集计算机。

61 Key terms address bus(地址总线) address space(地址空间)
arithmetic logic unit(算术逻辑单元,ALU) bit pattern(位模式) cache memory(高速缓冲存储器) central processing unit(中央处理单元,CPU) Compact disc read-only memory(只读光盘存储器,CD-ROM)

62 Key terms compact disc recordable(可刻录光盘,CD-R)
compact disc rewritable(可重写光盘,CD-RW) complex instruction set computer(复杂指令集计算机,CISC) control bus(控制总线) Control unit(控制单元) data bus(数据总线) data register(数据寄存器)

63 Key terms digital versatile disc(数字多功能光盘,DVD)
direct memory access(可重写光盘,DMA) dynamic RAM(动态RAM,DRAM) execute(执行) fetch(取指令) firewire(火线) Input/output controller(输入/输出控制器) Input/output subsystem(输入/输出子系统)

64 Key terms instruction register(指令寄存器) interrupt driven I/O(中断控制输入输出)
isolated I/O(I/O独立寻址) machine cycle(机器周期) magnetic disk(磁盘) main memory(主存) Memory mapped I/O(存储器映射寻址)

65 Key terms Main memory(主存储器):存储单元的集合。 Address(地址):用来区别每一个存储单元的唯一的标识符。
Address space(地址空间):所有在存储器中可标识的独立地址单元的总数。 Bit pattern(位模式):由二进制数0和1组成的一个序列。

66 Key terms Random access memory(随机存取存储器,RAM):主存的主要组成部分。 volatile(易失性)
Static RAM(静态RAM) flip-flop gate(触发器门电路) Dynamic RAM(动态RAM) capacitor(电容)

67 Key terms Read-only memory(只读存储器,ROM)
programmable read-only memory (PROM):可编程只读存储器 Erasable programmable read-only memory (EPROM):可擦除可编程只读存储器 Electronically erasable programmable read-only memory (EEPROM):电可擦除可编程只读存储器

68 Key terms Memory hierarchy:存储器的层次结构 Cache memory :高速缓冲存储器
80-20 rule:指计算机通常会花费80%的时间来读取20%的数据

69 Key terms Input/output subsystem(输入输出子系统):使计算机与外部世界进行沟通的设备的集合。
nonstorage device(非存储设备) storage device(存储设备) keyboard(键盘) Monitor( 监视器) Printer(打印机)

70 Key terms Magnetic storage device(磁介质存储设备) Magnetic disk(磁盘)
Read/write header(读写磁头) Surface organization(表面结构):track(磁道)、sector(扇区) Data access(数据存取)

71 Key terms performance( 性能) Rotational speed(角速度):磁盘的旋转速度
Seek time(寻道时间):读写磁头寻找数据所在的磁道的时间。 Transfer time(传送时间):将数据从磁盘移到CPU/内存所需要的时间

72 Key terms Optical storage device(光介质存储设备):使用激光技术来存取数据。
CD-ROM(compact disc read-only memory,只读光盘) Master disc(主盘):使用高能红外激光在塑料涂层上刻写位模式来制造主盘。(pit:坑 land:纹间表面) Polycarbonate resin (聚碳酸酯数脂): Aluminum(铝):作为反射层材料。 Reading:CD-ROM依靠来自计算机光驱的低能激光束读信息。

73 Key terms CD-R(compact disc recordable,可刻录光盘)
Polycarbonate resin (聚碳酸酯数脂): Gold(金):反射层材料 Creation:刻录机产生的高能激光束在染料(dye)层上烧制深色的点,用来模拟坑,没有被激光照射的区域就是纹间表面(land)。

74 Key terms CD-RW(compact disc rewritable,可重写光盘)
(creation)An alloy of Silver、indium、antimony、 tellurium:银、锢、锑、碲的合金。 (read)low power laser:低能激光束 (erase)a medium-power laser:中等能量的激光束

75 Key terms DVD(digital versatile disc,数字多功能光盘) The pits are smaller:坑更小
The tracks are closer to each other:磁道间更紧密 The beam is red laser instead of infrared:用红激光代替红外激光

76 Key terms bus(总线):系统中各个部件信息交换的公共通道 Data bus(数据总线): address bus (地址总线)
Control bus(控制总线)

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

78 Key terms Isolated I/O (I/O独立寻址):用来读/写主存的指令与用来读/写输入输出设备的指令是完全不同的。
Memory-mapped I/O(I/O存储器映射寻址):CPU将输入/输出控制器中的每一个寄存器都看成是主存中的字。

79 Key terms Program execution(程序执行) Machine cycle(机器周期)
fetch(取指令):控制单元命令系统将下一条要执行的指令复制到CPU的指令寄存器中。被复制指令的地址保存在PC(程序计数器)中。复制完成后,PC自动加1指向内存中的下一指令。 decode(译码):由控制单元进行译码,产生系统可以执行的二进制代码。 execute(执行):控制单元发送工作命令到CPU的某个部件,进行具体的操作。

80 Key terms 使 I/O设备与CPU/内存同步(synchronization)的方式有三种:
Programmed I/O(程序控制输入输出):CPU等待I/O设备。 Interrupt-Driven I/O(中断控制输入输出):当I/O设备准备好时,它通知(中断)CPU。 Direct memory Access(直接存储器存取,DMA):需要使用DMA控制器。

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

82 算术逻辑单元 (ALU)、寄存器组(register)、控制单元
Summary 计算机有三个子系统: CPU、主存和I/O子系统 CPU包括 算术逻辑单元 (ALU)、寄存器组(register)、控制单元 算术逻辑单元的作用 负责算术(arithmetic)和逻辑(logic)运算

83 独立的存储设备,可暂时保留数据。寄存器可以保存数据、指令,也可以作为程序计数器(program counter)
Summary 寄存器的作用 独立的存储设备,可暂时保留数据。寄存器可以保存数据、指令,也可以作为程序计数器(program counter) 控制单元的作用 监控计算机中的操作

84 主存(main memory)是存储单元的集合
Summary 主存(main memory)是存储单元的集合 存储地址是用无符号二进制整数表示的 RAM充当计算机中的主存。SRAM使用触发器门来保存数据,DRAM使用电容。 ROM的内容来自厂家;用户只能读取它的内容,而不能写入。 计算机需要高速存储器作为寄存器,中速存储器作为高速缓冲寄存器,低速存储器作为主存。

85 磁盘是一种存储设备,每一张盘片都由磁道和扇区组成
Summary I/O子系统是使计算机和外部世界进行沟通的设备的集合;分为非存储设备和存储设备 键盘、监视器、打印机是非存储设备的例子 磁盘是一种存储设备,每一张盘片都由磁道和扇区组成 磁带是由磁道组成的存储设备。数据存取是顺序的。

86 CD-R是一种光存储设备,用户可将数据写入盘中且数据不能被擦除
Summary CD-ROM是一种光存储设备(optical device),数据由厂家事先装盘,而且不能被擦除 CD-R是一种光存储设备,用户可将数据写入盘中且数据不能被擦除 CD-RW是一种光存储设备,用户将数据写入盘中,且数据可以被擦除并重写多次 DVD是高容量的光存储设备

87 数据总线(data bus)、地址总线(address bus)和控制总线(control bus)连接中央处理器和主存储器
Summary 数据总线(data bus)、地址总线(address bus)和控制总线(control bus)连接中央处理器和主存储器 控制器(controller)负责处理中央处理器与存储器和低速I/O设备间的I/O操作。SCSI、火线、USB都是常用的控制器。

88 有两种方法可以处理输入输出设备的寻址:I/O独立寻址和I/O存储器映射寻址
Summary 有两种方法可以处理输入输出设备的寻址:I/O独立寻址和I/O存储器映射寻址 在程序中运行指令,CPU首先获取指令,接着译码,最后执行 有三种使CPU和输入输出设备同步的方法:程序控制输入输出、中断控制输入输出、DMA CPU体系结构的两种设计分别是CISC和RISC


Download ppt "Computer Organization"

Similar presentations


Ads by Google