The memory that the computer stores data mainly divides into RAM (random access memory), ROM, disk. RAM is also divided into SRAM and dram two kinds, SRAM as a cache, DRAM used as main memory.
1.SRAM
SRAM, also known as static RAM, is stored using a bistable circuit. Even if there is interference to the steady-state circuit also does not affect, so because of the bistable, as long as there is power, the data in the SRAM will not change. The bistable nature of the SRAM, similar to the double pendulum, the two sides of the stable, the middle is not stable, perhaps sometimes the circuit will be in an unstable state, but will soon return to the left or right steady state, has maintained this status.
2.DRAM
DRAM, also known as dynamic RAM, charges the capacitor to store bits. Interference factors such as light can have an effect on the data on the DRAM.
The DRAM consists of a multi-row, multi-column, two-dimensional hyper-cell and cache consisting of 8 bits (1 bytes) per unit.
The DRAM and the controller are connected via the data pin and the addr pin, accepting signals from the controller to store or read the data based on the signal.
The interaction between the controller and DRAM:
①. Controller sends the line number of the unit via the addr pin to DRAM
②.dram receives the line number sent by the controller and puts the specified row data in the hyper-cell two-D table into the DRAM cache
③. Controller sends the column number of the unit to DRAM via PIN addr
④.dram receives the controller's column number, reads the specified column data from the cache, and transmits the data to the controller
3.ROM
Both SRAM and DRAM are lost, both are read-only, and ROM is readable and writable.
For example: The CPU processes an instruction that stores the value of a in a register, then the CPU first signals the controller via the bus interface, then the controller then sends instructions to the DRAM to operate according to the signal.
4. Disk
Disk: Stores big data and structures.
Disks consist of multiple magnetic plates, each of which is divided into upper and lower surfaces, also known as faces. Each face has a number of concentric circles, each circle is called a track, the track is composed of sectors, the gap between the sector and the sector does not have data, used to represent the sector format bit.
5. Disk storage
The smallest storage unit on a disk is a sector, which can be read and written by a drive arm, a drive pointer on each magnetic surface, a track is found based on the jitter of the drive arm, and the sector on the track is read and written,
Three performance metrics for disk reads and writes:
Seek time: The drive arm finds the time to read the track of the sector
Rotation time: The time at which the specified track is found for the specified sector
Transfer time: This sector data time is transferred starting from the specified sector
The previous old storage technology is the same number of sectors on each track, although simple but small storage capacity, is now a storage technology with a larger storage capacity to replace, the magnetic surface is divided into multiple subsets, the number of tracks in this sub-set of the same amount of sectors.
Each sector on the disk has a unique logical number identifier, and the CPU writes a logical number to read and write the specified sector in the specified track on the corresponding magnetic chip.
The I/O devices on the host are connected to the CPU through the I/O bus.
Universal Serial Bus Controller: control keyboard, mouse and other devices through the serial bus and CPU connection.
Graphical Display controller: Controls the display of graphics.
Host Bus Adapter: Controls the connection of the disk to the CPU.
The CPU reserves an address space to the disk, and the CPU has to operate the disk, issuing three instructions:
①. Type of operation, read or write
②. Working with block areas on disk
③. Address of main memory
After the CPU issued instructions, the disk according to the instructions to read or write in-memory data to disk, if it is read data, read the data is written to the CPU specified main memory address, after reading and writing, issued an interrupt instruction to the CPU.
6. Solid-State drives
SSDs are much faster than disk storage, mainly composed of flash memory and translation layer, flash memory consists of many blocks, each block consists of multiple leaves, the leaf is the smallest storage unit of solid State drive. Read solid-state drives are much faster than solid-state drives, since writing solid-state drives will erase the divisor , and if there is data on the leaves to write, back up the data
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
RAM, ROM, and disk