Computer Organization and Structure Review finishing (c)

Outline

Performance Memory

capacity: Number of binary bits can be stored in memory or bytes
speed: Mainly used access time, bandwidth or memory cycle described
price: Available total price or price per person is described

Classification memory

Here Insert Picture Description

The structure of the memory

Here Insert Picture Description
Cache: high-speed small-capacity memory to store the most active programs and data.
Main memory: a semiconductor memory storing a large number of programs and data during operation of the computer.
Secondary storage: Store the current temporarily involved in running programs and data, content needs to be called after the main memory can be accessed by CPU. Features: slow, large capacity.
"Cache - main memory" level: Memory speed problem solving
"Main memory - auxiliary storage" level: Capacity to solve the problem of memory

The semiconductor read / write memory (RAM)

The basic memory cell: a memory basic storage unit for storing a binary information.
The semiconductor chip RAM (static)

Chips

Here Insert Picture Description
Single decode mode: N address input lines, generating 2ⁿ word line selection address corresponding to 2ⁿ. Total n lines.
Bis decoding method: N address input lines (n / 2 two input lines X, n / 2 input lines of Y), generating 2 n-/ 2 word line selection, 2 n-/ 2 bit line selection, corresponding to 2 n- addresses. Total 2 n-/ 2 +. 1 lines.

Storage capacity expansion

Bit extension

A certain number of words, increasing the memory word length. Data lines each chip separately derived, have the same address.
Here Insert Picture Description
8K × 8b constituting the memory chip of the 8K × 1b :( 8K / 8K) × (8b / 1b) = 8 ( sheet)

Extended word

字长一定,增加存储器字数。数据线相同,用片选信号选择不同的芯片。
Here Insert Picture Description
用256K×8芯片构成2M×8的存储器:( 2M/256K)×(8 / 8 )= 8 (片)

字位扩展

既增加字数又增加字长,先并联后串联。
用256K×8芯片构成字长为32, 2M×32的存储器:( 2M/256K)×( 32/8 )= 8×4 = 32 (片)

例题

例一、设有一个具有24位地址和8位字长的存储器,问:
(1)该存储器能存储多少个字节的信息?
存储单元数为224=16M,故能存储16777216个字节的信息。
(2)如果存储器由4M ×1位SRAM芯片组成,需要多少片?
(16/4) ×( 8/1)=32片。
(3)需要多少位地址作芯片选择?
16/4 =4=22,需2位地址作芯片选择。

例二、用8K✖8位的EPROM芯片组成32K✖16位的只读存储器,试问:
(1)数据寄存器多少位?16位
(2)地址寄存器多少位?32K=215 15位
(3)共需多少个EPROM芯片? (32K/8K)*(16/8)=8
(4)画出该只读存储器的逻辑框图。
Here Insert Picture Description

刷新方式

集中式刷新、分散式刷新、异步刷新、透明刷新

半导体只读存储器(ROM)

掩模只读存储器(Masked ROM)、可编程ROM(PROM)、可编程和可擦除的ROM(EPROM)、电擦除电改写只读存储器(EEPROM)

高速缓存(Cache)

映射方式

直接映像法

直接映象函数: i=j mod 2c
其中, i是Cache页号,j是主存页号。
Here Insert Picture Description
Here Insert Picture Description
(1)主存每一页的大小为8MB/4096=2KB。Cache的页数为:64KB/2KB=32(页)
(2)因为Cache的一页大小为2KB,所以Cache的页内地址为11位。
(3)Cache共32页,所以需要页面地址5位。
(4)因为主存共有8MB,所以主存地址共有23位。格式为:
标记(7位)、页号(5位)、页内地址(11位)
当CPU送出的地址为6807FFH时,转化为二进制:1101000 00000 11111111111
以中间5位页号查表,得到标记位1101000,与地址中的标记进行比较,相同,所以命中页面0。
2D07FFH,转化为二进制:0101101 00000 1111111111 不相同,失靶
7F1057H,转化为二进制:1111111 00010 00001010111 相同,命中页面2
000000H,转化为二进制:0000000 00000 00000000000 不相同,失靶

全相联映像法

组相联映像法

替换算法

“先进先出”算法:FIFO、“近期使用算法”算法:LRU

写策略

写回法写直达法

虚拟存储器

     为了解决主存空间不够用的问题,将一部分(或全部)辅存和主存结合,把两者的地址空间统一编址,形成比实际主存空间大得多的逻辑地址空间。

页式虚拟存储器

     The virtual space is divided into pages (logical page), main memory space is divided into the same size page (physical page). Virtual memory address is divided into two fields: a logical page number, the page address. Existence address into two fields: a physical page number, the page address. The two are equal in the page address.
     Virtual memory address to main memory by the address conversion is stored in the main memory page table achieved. Page table comprising: a virtual page number, the virtual page number to a real page number corresponding to the charged position and the like. Load bit is 1, indicating that the logical page into memory from the external memory; charged bit 0 means that the corresponding logical page is not loaded into memory.
Here Insert Picture Description
Embodiment, a total of eight auxiliary storage page, page 1024 words, 4096 words of main memory actually performs page table method using the address of the image, the mapping table shown in the table as follows:
Here Insert Picture Description
(1) List of all the virtual page fault will occur page number.
(2) List All virtual page number of page hits.
(3) Calculate the address of the real address of main memory: 0,3728,1023,1024,2055,7800,4096,6800.
Here Insert Picture Description
Here Insert Picture Description

Virtual memory segment

Virtual memory page segments

Published 11 original articles · won praise 13 · views 2866

Guess you like

Origin blog.csdn.net/lhx0525/article/details/103880319