mainstorage(Main memory)Main storage。yescomputer hardwareIt is an important part ofinstructionsAnd data, and can be controlled bya central processor(CPU) Directrandom access。moderncomputerIn order to improve performance and give consideration to reasonable costMultilevel storage system。That isstorage capacity Small,Access speedHighCache memoryMain memory with moderate storage capacity and access speed is essential.mainstorageThe device stores information by address, and the access speed is generally independent of the address.32-bit (bit) address can express 4GBMemory address。This is enough for most applications, but it is not enough for some applications with extremely large amount of computation and large databases, thus requiring a 64 bit structure.
Main memory generally adoptsSemiconductor memory, andAuxiliary memoryCompared with small capacity, fast reading and writing speed, high price, etc.The main memory in a computer is mainly composed of memory bodyControl line, address register, data register and address decoding circuit.
Since the 1970sstorageThe device has been gradually adoptedlarge-scale integrated circuitComposition.The most common and economical dynamicRandom access memoryChip (DRAM).In 1995, the integration degree was 64Mb (storage4 million Chinese characters) and 16Mb DRAM chips have become mainstream products in the market.DRAM chipAccess speedModerate, generally 50-70ns.There are some improved DRAMs, such asEDO DRAM(i.e. expansiondata outputDRAM), its performance can be improved by more than 10% compared with ordinary DRAM, such asSDRAM(i.e. synchronous DRAM), its performance can be improved by about 10% compared with EDO DRAM.In 1998, the successor product of SDRAM was SDRAM II (or DDR, i.e. doubleData rate)A variety of has been launched.In the pursuit of speed and reliability, the more expensiveSRAMChip(SRAM)Its access speed can reach 1~15ns.Whether the main memory is composed of DRAM or SRAM chipsstorageInformation will be "lost", socomputerThe designer should consider that when this happens, try to maintain power supply for several milliseconds to save important information in main memory, so that the computer canReturn to normalfunction.In view of the above situation, in some applicationsstorageImportant and relatively fixed procedures and data adopt "non-volatile"storageDevice chip (such as EPROM, flashMemory chipEtc.) composition;For completely fixed programs, the data area even adoptsread-only memory(ROM) chip composition;These parts of main memory are not afraid of temporaryPower supply interruption, can also prevent virus intrusion.
Store a machine wordStorage unit, commonly referred to as word storage unit, correspondingUnit addresscallWord address。The unit storing one byte is calledbyteStorage unit, the corresponding address is calledByte address。IfcomputerZhongkeAddressingThe smallest unit of is wordStorage unit, thecomputerA computer called a word address.If the computer canAddressingMinimum order of
Gold finger in memory of electrogilding process
Bit isbyte, the computer is called a byte addressed computer.A machine word can contain several bytes, so aStorage unitIt can also contain several byte addresses that can be individually addressed.For example,PDP-11seriescomputer, a 16 bitBinarywordStorage unitIt can store two bytes, which can be addressed by word address or byte address.When addressing with byte address, 16 bitStorage unitTwo byte address.
capacity
In astorageContained inStorage unitThe total is often referred to as the storage capacity of the memory.storage capacity It is expressed in words or bytes (B), such as 64K words, 512KB, 10MB。External storageIn order to represent larger storage capacityMB,GB,TBEtc.Where 1KB=2 ^ 10B, 1MB=2 ^ 20B, 1GB=2 ^ 30B, 1TB=2 ^ 40B.B meansbyte, one byte is defined as 8BinaryBit, socomputerOne wordWord lengthUsually a multiple of 8.storage capacity This concept reflectsstorage space Size of.
time
also calledstorageDevice access time or read/write time refers to the time from starting a memory operation to completing the operation.Specifically, from one read operationcommandWhen the operation is completed, read the data inData buffer registerThe time elapsed until isMemory access time。
cycle
It refers to two independent startsstorageThe minimum time interval required for a device operation (such as two consecutive read operations).Generally, the storage cycle is slightly longer than the storage time, whichTime unitIs ns
Product classification
Announce
edit
RAMIt is the main part of the memory. Its contents can be read or written at any time according to the address as required. It is stored in the state of some electric trigger. After power failure, the information cannot be saved. It is used to temporarily store data. It can also be divided into DRAM andSRAMTwo.RAM generally uses dynamic semiconductorMemory device(DRAM)。Because the CPU worksSpeed ratioThe read and write speed of RAM is fast, so the CPU needs to spend time waiting when reading and writing RAM, which will reduce the CPU's working speed.In order to improve the speed of CPU reading and writing programs and data, RAM and CPU are addedCache(Cache) part.The contents of the Cache are copies of the contents of some storage units in random access memory (RAM).
ROMyesread-only memory, the contents of which are delivered by the factoryMaskIt can only be read, but cannot be rewritten.The information has been solidified in the memory, which is generally used to store system program BIOS andMicroprogram control。
PROMIt is a programmable ROM and can only be written once (the same as ROM), but it can be used by the user after leaving the factoryElectronic equipmentWrite.
EEPROMIt is electrically erasable PROM. Similar to EPROM, it can be read or written. Before writing, it does not need to erase the previous contents, and it can directly modify the addressed bytes or blocks.
Flash memory(Flash Memory), whose characteristics are between EPROM and EEPROM.Flash memory can also be usedelectrical signalFast deletion operation, much faster than EEPROM.However, byte level deletion is not allowedIntegrationHigher than EEPROM.[1]
Connection control
Announce
edit
Capacity expansion
Model
becauseMemory chipOfcapacityLimited, mainstorageIt is usually composed of a certain number of chipsBit expansion: Bit expansion refers to expansion (increase) only in the number of bitsWord length)The number of words in the chip and the number of words in the memory.Bit expansionOfConnection modeYesMemory chipOfAddress line、Segment selectionIt is connected in parallel with the read/write line, and thedata lineListed separatelyWord expansion: Word expansion refers to the expansion of the number of words without changing the number of digits.Word expansionPut theAddress line、data line, reading and writingControl lineIn parallel, whileChip Select To distinguish the simultaneous expansion of each chip word and bit:capacityFor larger containers, it is often necessary toWord number directionandBit directionAt the same time, expand.
Chip selection
Structural map
CPUTo achieveStorage unitYou must first selectMemory chip, that is, film selection;Then click theAddress codeSelecting the corresponding storage unit for data access is called word selection.The on-chip word selection is N low bits sent by the CPUAddress lineCompleted, the address line is directly connected to allMemory chipThe address input terminal of the memory chipChip Select It is mostly generated after decoding the high bit address.
Line selection method:
Line selection is to use divisionOn-chip addressingOuter high orderAddress lineDirectly connected to eachMemory chipOfFilm selectionWhen the information of an address line is 0, select the corresponding memory chip.these ones hereFilm selectionAddress lineOnly one bit can be valid for each addressing, and multiple bits cannot be valid at the same time, so that only one chip can be selected at a time.The line selection method cannot make full use of the systematicstorageInstrument spaceaddress spaceIt is divided into mutually isolated areas, which brings some difficulties to programming.
wholedecodingMethod: remove the inner part of the tabletaddressingAll high bits exceptAddress lineAll as addressesdecoderThe output of the decoder is used as the input of each chipChip Select , connect them toMemory chipTo realize the selection of memory chips.wholedecodingThe advantage of the method is that the address range of each chip is unique, continuous, and easy to expand, without overlapping addressesstorageHowever, the full decoding method requires a higher decoding circuit.
partdecodingMethod: The so-called partial decoding method uses a part of the high bit address other than the on-chip addressing to decode and generateChip Select , partial decoding will produce address overlap.
Connection method
Main storageBetween and CPUHardwired: Main memory and CPUHard copulationThere are three groups of connections:Address bus(AB)、data bus(DB)AndControl bus(CB)。Think of main memory as a black box,Memory address register(MAR) andstorageData register(MDR)It is the interface between main memory and CPU.MAR can receive data fromProgram counter(PC)Instruction addressOr fromArithmetic unitOfOperandsTo determine which unit to access.The MDR is a buffer unit that writes data to or reads data from main memory.MAR and MDR belong to main memory in terms of function, but they are usually placed in the CPU.
Mimic diagram
Basic operation of CPU on main memory: When the CPU reads and writes to main memory, the CPU first gives the information on the address busAddress signal, and then issue the corresponding read/writecommandAnd exchange information on the data bus.The basic operations of reading and writing are as follows:
Read:Read operationIt refers to the address sent from the CPUStorage unitGet the information from the and send it to the CPU. The operation process is as follows:
Address -->MAR -- ABCPU sends address signal to address bus
Send read command
WaitForMFC WaitstorageDevice work completion signal
M (MAR) -->DB -->MDR reads information to CPU via data bus
Write: Write refers to storing the information to be written into the CPU specifiedstorageIn the cell, the operation process is:
Address -->MAR -->ABCPU sends address signal to address bus
Data -->MDR -->The DBCPU sends the data to be written to the data bus
Send write command
WaitForMFC waits for the memory work completion signal
Speed matching between CPU and main memory: synchronizationstorageDevice read and asynchronous memory read.
Asynchronous memory read: There is no unified clock between CPU and main memory, and the main memory work completion signal (MFC) informs the CPU that the main memory work has been completed.
Synchronous memory reading: The CPU and main memory use a unified clock to work synchronously. Because the main memory speed is slow, the CPU must slow down when cooperating with it. In this kind of memory, the main memory work completion signal is not required.
applied technology
Announce
edit
Fast read and write
Fast page working technology(Fast read/write technology of dynamic memory): When reading and writing data in the same line of dynamic memoryLine AddressThe lock remains unchanged after the first read and write. When reading and writing data in multiple columns of the row later, only the column address can be locked, which saves the time for locking the row address and speeds up the mainstorageThe read/write speed of the device.
EDO (ExtendedDataOut) technology: In terms of fast page work technologydata outputPartial data latching circuit, extending the validity of output dataHolding timeThus, if the address signal is changed, the correct read data can still be obtained, which can further shorten the address input time and speed up the read/write speed of the main memory.
Parallel read and write
It means thatstorageThe technology that can read multiple main memory words in one working cycle (or longer) of the processor.
Scheme 1: Integrated multi word structure, that is, add theData bits, make it simultaneouslystorageSeveral main memory words are read at the same time for each read operation.
Scheme 2: Multi body crossingAddressingTechnologystorageThe device is divided into several independent read-writeWord lengthIt is the main body of a main memory wordmemory bankRead and write;It can also make several memory bodies work together to provide a higher read/write speed than a single memory body.
There are two ways to read and write:
1 in the sameRead write cycleStart all main memory reads or writes at the same time.
Main memory
2 Let the main memory read or write sequentially, that is, each read out in turnStorage word, which can be transmitted in turn through the data bus, without having to set specialData buffer register;Secondly, we adoptCross addressingIn this way, several storage words with consecutive addresses are allocated to different storage bodies in turn. Because of the local characteristics of program operation, the probability of reading and writing adjacent main storage words with addresses in a short time is greater.
data transfer
so-calledGroupData transmission means that the address bus can continuously transmit multiple data on the data bus after transmitting the address once.It used to use twoClock cycle: First send the address, and then send the data, that is, to transfer N data, 2N bus clock cycles are required, and the group data transmission mode only uses N+1 bus clock cycles.
Implement Groupingdata transferMode, not only the CPU should support this operation mode, but also the main memory can provide a high enough data read/write speed, which is often through the multi-body structure of main memoryDynamic memoryEDO support and other measures.
Static and dynamic
Announce
edit
static state
teachingcomputerOfMemoryAccumulatorComposition and design
(1)Static memoryStorage principle and internal structure of the chip (P207)
(2) TeachingcomputerwithinstorageComposition and design of the device
Address bus: AB15 ~ AB0, unified byAddress registerAR drive. The address register AR only receives the information output by ALU.
Control bus: the signal of control bus is controlled bydecoder74LS139Give, the function is to indicateBus cycleType of:
(3)peripheral(Interface) Write cycle is marked with IOW signal
(4)peripheral(Interface) Read cycle marked with IOR signal
(5) MMREQ signal mark for working in memory
(6) IOREQ signal mark for peripherals in operation
(7) Write control memory cycle is marked with SWA signal
Data bus: divided into internal data busIBAndExternal data busDB consists of two parts.Main completioncomputervariousFeaturesBetweendata transfer。Design buscore technology Is to ensure that only one group can beData transmissionTo the bus, one or more components are allowed to receive the information on the bus at the same time.The circuit used is usually a tristate gate circuit.
System clockTimely sequence:Teaching machineCrystal oscillator1.8432MHz, 614.4KHz clock is used as the system after 3 frequency divisionMaster clock, make CPU, memoryIOSynchronous operation。Some internal CPUregisterAt the end of the clockRising edgeComplete receiving data, andGeneral registerYesLow levelReceived.During memory or I/O read/write operations, each bus cycle consists of two clocks. The first clock, called address time, is used to transmit addresses;The second clock, called data time, is used to read and write data
static statestorageWord bit expansion of the processor:
Inside the teaching computerstorageThe device is implemented by static memory chip2KVerbalROMZone and 2K wordRAMDistrict composition.MemoryWord length16 bits, addressing by word.ROM consists of 74LS2716Read only memory ROM(2048 per pieceStorage unit8 bits per unitBinaryBit) Two pieces completeWord lengthExtension of.Address allocation: 0~2047RAM from 74LS6116Random access memoryRAM (2048 per chipStorage unit8 bits per unitBinaryBit) Two pieces completeWord lengthExtension of.Address distribution: 2048~4095.
Static memory address allocation:
2048 for accessStorage unit, use an 11 bit address to send the lower 11 bit address of the address bus to the address of each memory chipPin;The high bit of the address busdecoding, the decoding signal is sent to the/CS pin of each memory chip, and thebyteRead and write.
dynamic
Dynamic memoryRegular refresh of: When no read and write operations are performed,DRAMEach cell of the memory is in the power off state. Due to the existence of leakage, the charge stored on the capacitor CS will slowly leak out. Therefore, it must be supplemented regularly, called refresh operation.
When writing "1",Bitline(data line)Is low level,VDD(Power Supply)Will charge the capacitor
When writing "0, bit line(data line)High level, if capacitancestorageIf the charge is applied, the capacitor will be discharged, indicating that "0" is stored.
When reading data: first change the bit line (data line) toHigh level, when the word line high level comes, T is on, if the capacitance isstorageIf there is a charge ("1"), the capacitance will be discharged, which will make the data line potential change from high to low;If the capacitor has no stored charge (is "0"), the data line potential will not change.testingdata lineThe change of up potential can distinguish whether the data read is 1 or 0.
be careful
① Reading operation makes the capacitor originalstorageThe charge is lost, and therefore the readout is destructive.In order to keep the original memory content, a write operation must be followed immediately after the read operation, calledPrechargeDelay.
② ToDynamic memoryOfStorage unitProvide the address, which is to send the address first and then the address.The reason is rightDynamic memoryIt must be refreshed regularly (such as 2ms). The refresh is not performed by pressingWord processing, but refresh one row at a time, that is, connect allStorage unitThe primary energy is supplemented by a capacitor of.
③ OnDynamic memoryThe readout signal on the bit line of is very small and must be connected for readoutamplifier, usually usedtriggerlinerealization.
④storageInternalLine AddressAnd columnsAddress latchAccept the address of the line and column in order.
⑤ RAS, CAS, WE, Din, Dout timing relationship
Main memory optimization
Announce
edit
There is no lack of improvement data in the marketstorageNew technologies of efficiency, however, most of these new technologies focus on backup and archiving rather than primary storage.However, when the enterprise starts tostorageWhen reducing data, for them, understandPrimary storage optimizationRequirednecessary conditionVery important.
mainstorage, often referred to as Level 1 storage, is characterized by storing active data that is often accessed and requires high performance and lowtime delayandHigh availabilityData of.mainstorageGenerally used to supportCritical tasksApplications, such as databasesElectronicsMail and transaction processing.Most key applications have random data access modes and different access requirements, but they all generate a large amount of data used by institutions to operate their businesses.Therefore, the organization makes many copies of the data, copies the data for distributed use, inventories the data, and then saves the backup and archive data for security.
Most data originates frommaster data。As data lives longer, they are usually migrated to Level 2 and Level 3storagepreservation.Therefore, if the organization can reduce the master datastorageSpace occupied, will be able to use these savings in the data life cyclecapacityAnd fees.In other words, fewer mastersstorageTaking up space means lessData replication, inventory, archiving, andbackups。
Try to reduce the mainstorageSpace occupiedStorage managementPersonnel can consider two ways to reduce data:Real time compressionAnd data de duplication.
Until recently, due to performance problems,data compressionHas not been in the LordstorageIt is widely used in application.However, Storwize and other manufacturers provide real-timerandom accessThe compression/decompression technology compresses the data space by 15:1Solution。Highercompression ratioAnd real-time performance make compression solutions primarystoragePossible options for data reduction.
The data de duplication technology widely used in backup applications is also being applied to the primarystorage。So far, data de duplication faces a major challenge, that is, data de duplication isOffline processing。This is because the redundantdata blockRequires a lot of time and storageprocessorDo a lot of work, so very active data may be affected.At present, the main manufacturers of data de duplication technology includeNetApp, Data Domain and OcarinaNetworks。
Main memory deployment
Announce
edit
Zero performance impact
With Backup or ArchivestorageDifferent, activedata setCan be saved with some form of data reduction technologystorage capacity More critical.Therefore, the selected data reduction technology must not affect performance.It must be effective and simple;It must be equivalent to "toggle aswitch, consume lessstorage”。
activestorageThe reduction solution only de duplicates the active storage when the data to be de duplicated reaches the inactive state.In other words, this means that only theStorage poolThe files in the near active storage level are de duplicated.
The de duplication technology is recommended to work only for light I/OloadGo back and avoidPerformance bottlenecks。Therefore, the key components of IT infrastructurestorageNot optimized.The database tops the list of key components.Because they are Level 1storageAnd extremely active components and are almost always excluded fromLight workIn addition to loads, de reprocessing never analyzes them.Therefore, they are in the mainstorageThe space occupied by is not optimized.
On the other hand, the real-time compression system compresses all data flowing through the compression system in real time.This leads to an unexpected benefit beyond saving storage capacity: improved storage performance.When allDataWhen compressed, the amount of data submitted by each I/O request effectively increases, the hard disk space increases, and each write and read operation becomes more efficient.
The actual result is the occupied hard diskcapacityDecrease, overallstorageSignificantly improved performance.
mainstorageThe second advantage of de duplication is that all data is reduced, which realizes thecapacitySave.althoughOracleThe real-time data compression of the environment may cause some performance problems, but the tests so far show that the performance has improved.
Another question is yesstorageThe performance impact of the controller itself.People demand today'sstorageIn addition to serving hard disks, the controller also needs to do many things, including managing different protocols, performing replication and managing snapshots.Adding another function to these functions may exceed the capacity of the controller -- even if it can handle the additional workload, it still adds oneStorage managementPersonnel must be aware of processes that may become potential I/O bottlenecks.Send the compression work to the outsidespecial equipmentIt eliminates a variable from the performance problem and does not givestorageThe controller has a slight impact.
High availability
Many concerns Level IIstorage's data reduction solution is not highly available.This is because the backup or archive data they must restore immediately is not like the first levelstorageThat's the key.But even at level twostorageThis concept is no longer popular and has high availabilityBe treated asOne choice is added to many secondary levelsstorage system Medium.
However, high availability is in the primarystorageIs not an optional option.The ability to read data from a data reduction format (de duplicated or compressed) must exist.In data reduction solutions where de duplication is integrated intoStorage arrayMedium),redundancyPerformance is an inevitable result of storage arrays that are almost always highly available.
staypartsIn the market de duplication system, a component of the solution sendsClientProvide duplicate removal data.This component is called reader.The reader must also be highly available and seamlessly highly available.Some solutions haveThe serverThe ability to load the reader on the.Such solutions are often used for near active or more appropriate archive data;They are not suitable for very active data sets.
Most online compression systems are inserted into the system and the network, and placed (logically)SwitchAndstoragebetween.Therefore, they are achieved due to the high availability that is almost always designed at the network infrastructure levelredundancySex.Inserting online dedicated equipment along these paths enables seamless failover without extra effort from IT management personnel;It takes advantage of the work already done on the network.
Space saving
Deploying one of these solutions must result in significantcapacitySave.If the occupation is reducedcapacityOfstorageThis results in lower than standard user performance, which is of no value.
The primary data is not as high as the backup data usually isredundancystoragepattern.This directly affects the overallcapacitySave.There are also two ways to achieve master data reduction: data de duplication and compression.
Data de duplication technology searches forredundancyData, and what level of data reduction can be achieved will depend on the environment.With highredundancyIn a horizontal environment, data de duplication can bring significantROI(Return on investment)In other environments, only 10% to 20% reduction can be achieved.
Compression is effective for all available data, and it can beredundancyWhile saving more storage capacity, data is also more randomData modeAlways bring higher savings.
In fact, the data schemaRedundancyThe higher the height, the greater the space savings from weight removal.The more random the data mode, the higher the space savings brought by compression.
Application independent
The real benefits may come from alldata typeData reduction (no matter what application or how active the data is).Although the actual reduction rate varies according to the level of de duplication data or the compression rate of data, all data must be qualified.
When it comes to archiving or backup, application specific data reduction has clear value, and there is time to customize the reduction process for such data sets.However, for active data sets, the particularity of the application will cause performance bottlenecks and will not bring significantcapacityBenefits of reduction.
Storage independent
Use the same data reduction across all platforms in a mixed vendor IT infrastructuretoolThe ability of will not only further increase the ROI benefits of data reduction, but also simplify deployment and management.every laststorageUsing a different data reduction method for the platform will require a lot of training and cause confusion at the management level.
complementary
After completing all the above optimizationsstorageWhen it is time to back up the primary storage, it is better to keep the data in an optimized format (compressed or de duplicated).If the data must be expanded and restored to the original format before backup, it will be a waste of resources.
To back up an extended dataset, you will need:
usestorageProcessor or external reader resources decompress data;