2018-2019 20165203 Information Security System Design Basics Chapter 5 study summary teaching material content summary important concepts
- Storage System: a hierarchy of storage devices with different capacity costs and access time.
- Cache memory ------ buffer area for data and instructions in primary storage ------ disk ------ buffer area for connecting data on disks or tapes of other machines through the network
- Memory Hierarchy: CPU memory ---- high-speed cache ---- primary storage ---- disk (access rate decreases in turn)
Storage Technology
Random Access Memory (RAM)
Name |
Features |
Abbreviation |
Usage |
Capacity |
Static RAM |
Fast and expensive |
SRAM |
As high-speed cache memory, it can be on the CPU, under the CPU |
<= N MB |
Dynamic RAM |
Slow and cheap |
DRAM |
As the frame buffer of the primary storage and Graphics System |
Several hundred or several gigabytes |
SRAM: each bit is stored in a bistability storage unit.
If there is electricity, always keep its value, there is interference, interference is eliminated, the voltage will be restored to a stable value
DRAM: each bit of storage is charged for a capacitor.
Memory is very sensitive, voltage is disturbed, and will never be recovered
Traditional DRAM: Circuit Mode
- Memory Module: The DARM chip is encapsulated in the memory module.
- Enhanced DRAM:
-
- Fast page mode DRAM: allows continuous access to the same row to get services directly from the row buffer.
-
- Extended Data Output DRAM: Allows CAS signals to be more time-intensive.
-
- Synchronous DRAM: SDRAM can output its supercell content faster than those of asynchronous memory.
-
- Double Data Rate synchronization DRAM: It doubles DRAM by using two clock edges as control signals.
-
- Video RAM: Used in the frame buffer of the Graphic System.
- Non-volatile memory: stores their information even after power-off.
Access primary storage: Data Streams pass throughBusBack and forth between the processor and the dram primary memory.
-
- The bus can carry addresses, data, and control signals.
-
- The carried signal synchronizes the transaction and identifies the type of the transaction being executed.
Computer System Processing Instruction Diagram
Disk Storage
- Disk Structure:Disk.
-
- Disk Surface: magnetic record material, track, sector, Gap
-
- Disc center: spindle-rotate the disc at a fixed rotation rate
-
- Disk capacity: Maximum number of BITs that can be recorded on a disk
-
- Record density (bit/inch)
-
- Track density (track/inch)
-
- Surface density (bit/square inch) = record density * track density (related to capacity)
-
- Formula for Calculating disk capacity:
- Disk operation:
-
- Read/write header: the position where read/write is stored on the magnetic surface.
-
- Seek time: the time required to move the drive arm
-
-
- It depends on the position before the read/write head and the speed at which the drive arm moves on the disc.
-
- Rotation time: Once the read/write header locates the expected track, the drive waits for the first position of the target sector To Go To The read/write header.
-
- Formula for maximum rotation delay:
-
- Transfer Time: when the first position of the target sector is under the read/write header, the drive can start to read or write the content of the sector.
-
- Average transfer time formula:
- Logical Disk block: the disk controller reads data from a disk sector to the primary storage. The operating system sends a command to the disk controller to read a logical block number.
- Connect to I/O devices: Universal Serial Bus, graphics card, host bus adapter
- Access Disk:
Locality
- Locality: tends to reference data items that are adjacent to other recently referenced data items, or the data items that have recently been referenced.
- Category:Temporal localityAndSpatial locality
- Locality of Program Data Reference
-
- Time locality: The Example sumvec in the book, because sum can be reused
-
-
-
- Access every k elements is calledReference Mode with a step of K.
-
-
- The reference mode with Step 1 is calledSequential Reference Mode.
-
-
- The sequence reference mode has good performance.Spatial locality.
- Locality of the command
-
- For loop has good spatial locality
Memory Hierarchy
Storage hierarchy: see
- Cache in the Memory Hierarchy
-
- The central idea of the memory structure: For each K, a faster and smaller storage device located on the K layer serves as the cache of a larger and slower storage device located on the K + 1 layer. (Each layer in the hierarchy caches data objects from the lower layer)
-
- Memory is divided into consecutive Data Object blocks, called blocks. Each block has a unique address or name.
-
- Cache hit: When the program needs to find a Data Object D in the k + 1 layer, it first searches for D in a block currently stored in the K layer, if D is cached in the K layer, it is the cache hit.
-
- Cache miss: No Data Object D is cached in layer K. It must be in layer K.ReplaceOrEvictionASacrifice BlockThe replacement policy is used.
-
- Cache Management: A combination of hardware and software.
High-speed cache storage
Problems and Solutions in teaching material Learning
View the teaching material content,
I have summarized the jump commands that damage the space locality, so you can use them with caution when writing programs in the future.
Answer: C language: GOTO statement
Assembly Language: Jump commands are divided into three types:
1. Unconditional jump: JMP;
2. Redirection based on the values of Cx and ECx registers: jcxz (jump when CX is 0) and jecxz (jump when ECx is 0 );
3. Jump Based on the flag of the eflags register. This is too much.
The CMP command is equivalent to a subtraction operation and does not affect any registers. After execution, ZF = 1 if equal, otherwise ZF = 0
Reference: Jump command Summary
Code hosting
(Running result of statistics. Sh script)
Summary of last week's exam errors
- Error 1: The machine code for "addq % rax, % rcX" in the Y86-64 is ()
A.m. 6010
B. 6001
C.6000000000000000000
D. 00000000000000006001.
E. 00000000000000006010
F. 60100000000000000000
Answer: B
Resolution: According to the figure in the textbook, when the instruction code is 6, it does not contain 8 bytes of constant numbers. Therefore, select B.
- Error 2: The machine code for "rrmovq % rax, % rcX" in Y86-64 is ()
A.m. 2001
B. 2010
C. 20010000000000000000
D. 00000000000000002001.
E. 00000000000000002010
F. 20100000000000000000
Answer:
Resolution: According to the figure in the textbook, when the instruction code is part 2, it does not contain 8-byte constant numbers. Therefore, select
The errors of the above two questions are due to the absence of frequent numbers. Pay more attention to them in the future.
Others (perception, thinking, etc., optional)
This chapter is the focus of this lesson. I have learned the hierarchy of memory and their working modes, which gives me a better understanding of the computer's working process. Local learning is particularly helpful. We hope that we can optimize our programs in the future when writing code programs.
Learning progress bar
|
Number of lines of code (Add/accumulate) |
Blog volume (New/accumulated) |
Learning time (Add/accumulate) |
Important Growth |
Target |
5000 rows |
30 articles |
400 hours |
|
WEEK 1 |
200/200 |
2/2 |
20/20 |
|
Week 2 |
300/500 |
2/4 |
18/38 |
|
Week 3 |
500/1000 |
3/7 |
22/60 |
|
Week 4 |
300/1300 |
2/9 |
30/90 |
|
Record "planned learning time" and "actual learning time" to see if you can improve your planning ability at the end of the semester. This is very important and useful in work and study.
Formula for time Consumption Estimation
: Y = x + x/N, y = X-X/N, training times more, X, Y is close.
Reference: Why is the estimation of software engineering software so difficult? Software Engineering Estimation Method
(Take A Look at modern software engineering courseware.
Software Engineer capability self-evaluation form)
References
- In-depth understanding of computer systems v3
2018-2019 20165203 summary of the fifth week of Information Security System Design Basics