Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer System Structures Storage

Similar presentations


Presentation on theme: "Computer System Structures Storage"— Presentation transcript:

1 Computer System Structures Storage
Storage Structure Storage Hierarchy Different storage examples Cache Magnetic Disks

2 Storage Hierarchy Volatile (variable, non stable) The main differences among the various storage systems lie in speed, cost, size, and volatility. Non Volatile (permanent, stable)

3 Performance of various levels of storage

4 General Purpose Registers
Registers that are built into the CPU have the fastest access for CPU instructions. Main memory and the registers built into the processor itself are the only storage that the CPU can access directly.

5 Main Memory (RAM - random-access memory)
Computer programs must be in RAM to be executed. Ideally, we want the programs and data to reside in main memory permanently. This arrangement is not possible for the following two reasons: Main memory is usually too small to store all needed programs and data permanently. Main memory is a volatile storage device that loses its contents when power is turned off or otherwise lost. Main memory is the only large storage area that the processor can access directly and fast.

6 Electronic disk. Secondary Storage
An electronic disk can be designed to be either volatile or nonvolatile. One of the forms of electronic disk is flash memory Another form is a combination of DRAM and magnetic disk. Normally you use DRAM as a disk. When the power is interrupted then the information is transferred to the magnetic disk. Secondary Storage allows to hold large quantities of data permanently. The most common secondary-storage device is a magnetic disk, which provides storage of both programs and data. Magnetic tape was used as an early secondary-storage medium. it is relatively permanent and can hold large quantities of data its access time is slow than memory or magnetic disk access, random access to magnetic tape is about a thousand times slower than random access to magnetic disk Tapes are used mainly for backup purposes or as a medium for transferring information from one system to another

7 Cache Memory Registers that are built into the CPU are generally accessible within one cycle of the CPU clock (very fast). The main memory access is done via a transaction on the memory bus and is much slower, in which case the processor normally needs to stall, since it does not have the data required to complete the instruction that it is executing. This situation is intolerable because of the frequency of memory accesses. The remedy is to add fast memory between the CPU and main memory. A memory buffer used to accommodate a speed differential, called a cache.

8 Hard Disk Caching Main memory can be viewed as a fast cache for secondary storage, since data in secondary storage must be copied into main memory for use, and data must be in main memory before being moved to secondary storage for safekeeping. Disk controllers usually have a built-in cache. Data transfer at the disk drive happens between the cache and the disk surface, and data transfer to the host, at fast electronic speeds, occurs between the cache and the host controller. The difference between a buffer and a cache is that a buffer may hold the only existing copy of a data item a cache holds a copy on faster storage of an item that resides elsewhere. Caching and buffering are distinct functions, but sometimes a region of memory can be used for both purposes.

9 Caching The movement of information between levels of a storage hierarchy may be either explicit or implicit, depending on the hardware design and the controlling operating-system software. For instance, data transfer from cache to CPU and registers is usually a hardware function, with no operating-system intervention. On the other hand, transfer of data from disk to memory is usually controlled by the operating system.

10 Processor Caches Level1 cache – Inside each core (not shared)
Level2 cache – inside chip – shared by processor cores Level3 cache – outside chip – shared by processor chips.

11 Magnetic Disks Disk access time (transfer rate) is an average of the time between initiating a request and obtaining the first data character. It includes the command processing, the average seek or random-access time (moving the read/write head to the required track) and the average latency (rotation of disk to the required sector). This specification must be given as an average, because seek times and latency can vary depending on the current position of the head and platter. Hard Disk important parameters accessible by API Cylinder Track Head Sector They fully define where is your data on the HDD.


Download ppt "Computer System Structures Storage"

Similar presentations


Ads by Google