Académique Documents
Professionnel Documents
Culture Documents
MEMORY ELEMENT
Storage Hierarchies :
Computer data storage often called storage or memory, refers to computer components and recording media that retain digital data. Data storage is one of the core functions and fundamental components of computers.
PRIMARY STORAGE
Primary storage (or main memory or internal memory), often referred to simply as memory, is the only one directly accessible to the CPU. The CPU continuously reads instructions stored there and executes them as required. Any data actively operated on is also stored there in uniform manner.
RAM:
Processor registers are located inside the processor. Each register typically holds a word of data (often 32 or 64 bits). CPU instructions instruct the arithmetic and logic unit to perform various calculations or other operations on this data (or with the help of it). Registers are the fastest of all forms of computer data storage. Processor cache is an intermediate stage between ultra-fast registers and much slower main memory. It's introduced solely to increase performance of the computer. Most actively used information in the main memory is just duplicated in the cache memory, which is faster, but of much lesser capacity. Main memory is directly or indirectly connected to the central processing unit via a memory bus. It is actually two buses ): an address bus and a data bus. The CPU firstly sends a number through an address bus, a number called memory address, that indicates the desired location of data. Then it reads or writes the data itself using the data bus.
SECONDARY STORAGE
Secondary storage (also known as external memory or auxiliary storage), differs from primary storage in that it is not directly accessible by the CPU. The computer usually uses its input/output channels to access secondary storage and transfers the desired data using intermediate area in primary storage. Secondary storage does not lose the data when the device is powered downit is non-volatile. Example: Flash drive, CD and DVD drives, floppy disks, punch cards.
TERTIARY STORAGE
Tertiary storage or tertiary memory, provides a third level of storage. Typically it involves a robotic mechanism which will mount (insert) and dismount removable mass storage media into a storage device according to the system's demands; this data is often copied to secondary storage before use. Example: useful for extraordinarily large data stores, accessed without human operators(robotic arms). Typical examples include tape libraries and optical jukeboxes.
Off-line storage
Off-line storage is a computer data storage on a medium or a device that is not under the control of a processing unit. The medium is recorded, usually in a secondary or tertiary storage device, and then physically removed or disconnected. It must be inserted or connected by a human operator before a computer can access it again. Unlike tertiary storage, it cannot be accessed without human interaction. Example : Optical discs and flash memory devices
There are four major storage levels: 1.Internal Processor registers and cache 2.Main the system RAM and controller cards. 3.On-line mass storage Secondary storage. 4.Off-line bulk storage Tertiary and Offline storage.
Virtual memory combines active RAM and inactive memory in disk form into a large range of contiguous addresses.
Segmentation In a segmented system, the blocks of memory are variable in size. Each process may have one or more segments. The segments may be visible to the process, that is, it may be aware that there are code, data, stack, and heap segments (whereas pages are usually transparent). A segment table is used that specifies the base of the physical addresses associated with a segment and the valid range. The combination of this base and the offset specified by the address means that two words must be used by the MMU to identify the physical address. One advantage to the operating system is that once a segment has been allocated, there won't be any access faults from the process except those that actually try to access beyond the segment boundaries. Thus, once a process has started, it can run at memory rates until it returns control to the OS. Of course, this leads to the problem that if a segment is large, the time for a context switch can be excessive. An access outside of the segment is detected as exceeding the valid range, and is trapped. Segmented virtual addressing is otherwise similar to paging. One problem with pure segmentation is external fragmentation (holes in the address map following a series of allocations and deallocations) that can lead to low memory utilization. External fragmentation is also called checkerboarding, and its correction requires a phase of memory compaction that reduces processing efficiency.
Cache Memory
Cache memory is random access memory (RAM) that a computer microprocessor can access more quickly than it can access regular RAM. As the microprocessor processes data, it looks first in the cache memory and if it finds the data there (from a previous reading of data), it does not have to do the more time-consuming reading of data from larger memory. Direct Mapped : Each block from main memory has only one place it can appear in the cache Example: We have a Cache memory of 512KB (i.e. 219), divided into blocks of each 32 bytes (25). Thus there are 16K (i.e. 219/25 = 214) blocks also known as Cache slots or Cache lines in cache memory. It is clear from above numbers that there are more Main memory blocks than Cache slots.
Direct mapping assigned each memory block to a specific line in the cache. If a line is all ready taken up by a memory block when a new block needs to be loaded, the old block is trashed. The figure below shows how multiple blocks are mapped to the same line in the cache. This line is the only line that each of these blocks can be sent to. In the case of this figure, there are 8 bits in the block identification portion of the memory address.
Once the block is stored in the line of the cache, the tag is copied to the tag location of the line.
Decoder
A decoder is a device which does the reverse of an encoder, undoing the encoding so that the original information can be retrieved.
Determine the digital circuit in a tree-type decoding network with 16 output lines
The first stage is a 2-to-4-line decoder. A new variable is introduced in each successive stage; it or its inverse becomes one input to each of the two-input AND gates in this stage. The second input to each AND gate comes from the preceding stage. For example, one of the outputs of the second stage will be AB'C. This will result in two outputs from the next stage, AB'CD and AB'CD'. This design does avoid the fan-out problem in the early stages but not in the later stages. Nevertheless, the problem exists only for the variables introduced in those stages.
Requires the minimum number of diodes This decoder circuit is the fastest and most regular.
a) Data bus -Carry information b) Address bus- Determine where it should be sent c) Control bus - Determine its operation
Step of Read Bus Cycle: Processor initiates a read bus cycle by floating the address of the memory location on the address lines. Once the address lines are stable, the processor asserts the address strobe signal on the bus. The address strobe signals the validity of the address lines. Processor then sets the Read/Write* signal to high, i.e. read. Now the processor asserts the data strobe signal. This signals to the memory that the processor is ready to read data. The memory subsystem decodes the address and places the data on the data lines. The memory subsystem then asserts the data acknowledge signal. This signals to the processor that valid data can now be latched in. Processor latches in the data and negates the data strobe. This signals to the memory that the data has been latched by the processor. Processor also negates the address strobe signal. Memory subsystem now negates the data acknowledgement signal. This signals the end of the read bus cycle.
Read cycle
Write cycle
The pin connections common to all type of memory devices (including SRAM) are the address inputs, data I/O, some type of selection input and at least one control input used to select a read or write operation. The address inputs are used to connect or select a memory location within the memory device. The memory device that has 10 address lines will be having its address pins labeled from A0 (Least Significant) to A9. The number of memory address pins found on a memory device is determined by the number of memory locations found within it. The data I/O connections are the points at which the data are entered for storage or extracted for reading. Today the memory devices are equipped with bi-directional common data I/O lines. The SRAM has an input that selects or enables the memory device, called chip select (CS). If this pin is active (a logic 0 applied at this pin) the memory device performs a read or a write operation. The other two control inputs associated with SRAM are Write Enable (WE) and Output (also called read enable) Enable (OE). Sometimes the (WE) is labeled as (W) and the (OE) is labeled as (G). The write enable pin must be made active (applying logic 0) to perform a memory write operation and the (OE) must be active to perform a read operation from the memory. But they must never both be active at the same time.