Transcript
8/17/2017
MEMORY
• CPU can directly communicate with main memory (RAM, ROM, ICs)which uses semiconductors • RAM- volatile – contents are erased when power goes off • Secondary memory is used for bulk storage and has larger capacity • It stores system software, assemblers, compilers, useful packages, large data files • It is a permanent storage hence magnetic memory is used • Example: hard disks
• Memory stores programs, data, results • Three kinds of memory: Semiconductor, Magnetic, Optical • Semiconductor memory is used as Main memory, it stores programs and data currently needed by computer • Magnetic memory is used as secondary memory, information not currently required is stored in secondary memory • Information needed currently by CPU is loaded from secondary to main memory • Size of main memory is small than secondary memory
• Backup memory is used to store the copy of important programs such as OS, compilers etc • In case data from secondary memory is lost it can be reloaded from backup memory • Examples: floppy disks, optical disks, magnetic tapes
1
8/17/2017
Physical and Virtual Memory
Cache Memory
• Physical memory: actual main memory, directly addressed by CPU • Physical address is used to locate the memory location • Virtual memory: allows a program to use main memory more than what a computer really has • Only the programs that need to be currently executed are bought from the secondary to main memory • Thus the parts of the program are swapped between secondary and main memory as per requirement
• Thus using swapping a program that requires large memory than that of main memory can be executed • Thus Virtual memory space is larger than physical memory • Ex: 80386: physical memory: 4 GB, Virtual memory: 64 TB • Logical/virtual addresses are used in a program • Memory management Unit – converts logical to physical address • MMU is between CPU and main memory
• CPU generates logical address while program execution • MMU receives logical address from CPU and checks whether logical address is present in the physical memory • If present, MMU returns the physical address • If not present CPU is interrupted and it executes a service routine to bring the required information from secondary to physical memory
2
8/17/2017
Semiconductor Memory • Types: Random Access Memory and Read only Memory • RAM: - Read and write memory, random access - Volatile : information is retained as long as power is on - Types: Static and dynamic RAM
Dynamic RAM (DRAM) • DRAM loses its stored information in a very short time (a few ms) even though the power supply is on • Binary state is stored in the capacitor of the transistor of the MOS memory circuit • Presence of charge on capacitor – 1 • Absence of charge on capacitor – 0 • Charge on capacitor leaks in a few ms • DRAM needs to be refreshed every 2 ms • Cheap, high packing density, moderate speed, consumes less power
RAM • Types: static and dynamic Static RAM (SRAM) • Retains information as long as power supply is on • Consumes more power, are costlier, high speed • No refreshing circuit needed • Used in cache memory due to high speed • Uses CMOS devices • Holds information in a flip-flop (transistor) – 2 cross-coupled inverters • 6 transistors per memory cell
• Used when large capacity of memory is needed • Used for main memory • Less number of transistors required per memory cell as information is stored in capacitors • 1 transistor is needed per memory cell
3
8/17/2017
EDO (Extended Data Output) RAM • Any memory access/refresh stores 256 bytes of data into latches • Latches hold next 256 bytes of information • For sequentially executed programs – data available without wait states • EDO memory can send data even while receiving instructions about what data to access next SDRAM (Synchronous DRAM) and SGRAM (Synchronous Graphics RAM) • RAM chips use same clock rate as CPU • Memory chips remain ready to transfer data when CPU expects them to be ready • Two internal banks of transistors for storing data
Dual ported DRAM or VRAM (Video RAM) • Allows to access 2 memory locations simultaneously • 2 ports for reading data • Optimized for video adapters • WRAM (Windows RAM) is a special version of VRAM – optimized for PCs running windows SIMM and DIMM • Single Inline and Double Inline Memory Modules • Small PCB which contains several DRAM memory chips • PCBs are plugged into system board of PC
DDR SDRAM (by samsung) • DDR – double data rate • SDRAM transfers data only on the rising edge of clock • DDR SDRAM – transfers data on both edges of clock, thus data transfer rate is doubled • Versions of DDR – DDR2, DDR3 RDRAM (Rambus DRAM) • Fastest semiconductor memory available • 1.6 GB RDRAM ICs have been developed by Rambus • Several RDRAMs are connected through a special bus interfaces
• SIMM PCB – several memory chips with contacts placed on only one edge of PCB • DIMM PCB – memory chips and contacts are placed on both edges of PCB
4
8/17/2017
ROM • Read only Memory • Non-volatile memory – the information stored it is not lost even if power goes off • Used for permanent storage, random access property • ROMs are cheaper than RAM • Contents of ROM are permanently stored at manufacture time • 2 categories: masked-programmed and userprogrammable ROM
• Mask-programmed ROM: contents are written at time of IC manufacture • PROM, EPROM, E2PROM are user-programmable ROM • ROM store assembler, debugging package, function tables such as sine, cosine, log, square root, exponential and code conversion tables
PROM
EPROM
• Programmable ROM, contents decided by user • PROM programmer – programming of PROMs to store programs • Can be programmed only once • Ex: 74S287
• Erasable PROM – cheap, reliable • Stored data can be erased by exposing it to a high intensity short wave ultraviolet light for about 20 minutes (wavelength = 2537) • Erasing not easy – EPROM IC has to be removed from the computer for exposure to UV rays • EPROMs used to store programs which are permanent but needs updating (R & D programs) • Use Metal Oxide Semiconductor technology • Store 1 or 0 as charge or no charge on the insulated floating gate of the transistor
5
8/17/2017
• The UV light causes the stored charge to leak off, thus erasing the data • 30 v or higher voltage required to reprogram EPROM • Read operation voltage (operating voltage): 5v • Ex: Intel’s 87C257, 256k CHMOS EPROM
Flash Memory • Electrically erasable, programmable permanent type • One transistor memory cell – high packing density, low power consumption, lower cost and high reliability • Entire content can be erased in one operation • Not byte by byte alterable • Some new chips provide block erasure • Quick pulse programming – entire unit/block is erased and reprogrammed at a time • Flash memory – fast reprogramming capability
EEPROM • EEPROM is an electrically erasable PROM, also known as EAPROM (Electrically alterable) • Chip can be erased and reprogrammed easily on a byte by byte basis – single byte or entire chip can be erased in one operation • Requires only a few ms, while EPROM requires 10 – 20 mins • EEPROMs can be reprogrammed 10k times • No need of removing EEPROM for erasing • EEPROM takes longer time for writing and erasing as compared to RAM but access time for reading is comparable • Ex: Intel 2816A – 16k (2K X 8) EEPROM • 21 v – writing or erasing • 5v - reading
• Suitable for storing firmware (code) – entire code can be updated • EEPROM are used to store parameters – byte by byte updating • Used in battery driven digital devices such as handheld computers, cell phones, digital cameras, MP3 players (low power consumption property of flash memory) • 1 GB flash memory chip available • Flash memory modules – 4GB – consists number of flash memory chips – available as flash cards and drives
6
8/17/2017
Nonvolatile RAM • • • •
Developed by IBM Magneto-resistive nonvolatile RAM Uses magnetization to store information Capacity of MRAM (first version) – 16 Mbit
• Used to store large amount of data permanently and can be partially transferred to the primary storage as and when required • Examples: magnetic tapes and disks • Two methods of accessing information: sequential and random access • Information from a sequential device () can only be retrieved in the same sequence in which it stored • Sequential processing used in : preparation of monthly payslips, electricity bills etc • Magnetic tapes and punched paper media are typical sequential access storage devices
Secondary Storage Devices • Operating speed of primary memory should have fast access time, hence semiconductors are used • But these high speed storage devices are expensive hence the main memory is limited • Hence to store large volumes of data additional memory called as secondary memory is used • Secondary storage is slower than main memory • Also known as backup storage
Punched paper tapes • Sequential access secondary storage • Data coded on paper tape in the form of punched hole combinations • Tape is normally 1 inch wide, length upto several hundred feet • Information is recorded as holes punched in rows across the width of the tape, with one row representing one character • The maximum number of holes per row is referred to as number of channels on the tape • Coding system used for recording information depends on number of channels, 8-channel tape is mostly used
7
8/17/2017
• The number of characters that can be stored is low • Can be easily torn and mutilated
• Tape is divided into vertical columns called frames and horizontal rows called channels or tracks • A character is recorded per frame • Older tapes had 7 tracks and used 6-bit BCD code format for data recording • For example, A is represented on this tape by code 110001. The first six tracks are used for recording 6 bits of BCD code, and the seventh track is used to record the parity bit • Parity bit is used to detect errors (odd parity, even parity) • Modern magnetic tapes have 9 tracks and use 8bit EBCDIC code format for data recording
Magnetic Tape • Sequentially accessed • Tape is plastic ribbon usually ½ inch wide coated on one side with an iron oxide material which can be magnetized • Tape ribbon can be stored in reels of 50 to 2400 feet • Data can be erased • Data is recorded on the tape in form of tiny invisible magnetized and non magnetized spots representing 1s and 0s on the iron oxide side of the tape
• Magnetic tape drive is used to read data to the CPU and write data to the tape • The read/write head assembly is a single unit having one read/write head for each tape track • Advantages of Magnetic Tape: - Unlimited storage - High data density- 10.5 inch reel of magnetic tape can hold 800, 1600, 6250 characters per inch - Low cost - Rapid transfer rate – 1 million bytes per second - Ease of handling - Portability
8
8/17/2017
• Limitations - No direct access, it is a sequential access device – data can be accessed serially - Indirect interpretation of data- data stored in form of tiny invisible magnetized/nonmagnetized spots - Environmental problems – dust and uncontrolled humidity/temperature can cause tape reading errors
Magnetic Disk • Thin, circular metal plate/platter coated on both sides with magnetic material • Disk pack consists of number of disks mounted about half an inch apart from each other on a central shaft which rotates at speed of 2400 or more revolutions per minute (rpm) • All the disks of a disk pack move simultaneously and at equal speed • Direct access secondary storage
Magnetic tape cassettes and cartridges • Magnetic tapes are suitable for large and medium size computers • Magnetic tapes is also available in form of cassettes and cartridges for use in small computers • Tape Cassettes and cartridges have low data transfer rate less than 10,000 bytes per second
• Storage of Information: In a disk pack, data is stored on both the surfaces of each disk plate except the upper surface of the top plate and the lower surface of the bottom plate • Each disk consists of concentric circles – tracks • A set of corresponding tracks in all the surfaces is called a cylinder • Each track is further subdivided into sectors • Information is recorded on tracks of disk in form of tiny magnetic spots • Presence of magnetic spot – 1 bit, absence – 0 bit • 8-bit EBCDIC code used to store data
9
8/17/2017
• In some systems outer track may contain more bits than inner tracks • But, in some other systems the outer tracks are less densely packed with characters than the inner tracks, thus each track contains same number of characters • Data stored on the disk can be read many times but writing of new data erases old data at that location • Storage capacity depends on the amount of disk surface, tracks per inch of surface and bits per inch of track
• Total number of bytes that can be stored in a disk pack is: • No of cylinders X tracks per cylinder X sectors per track X bytes per sector
• Magnetic memory is permanent type memory, not volatile • Used as secondary and backup memory • Data 1 or 0 is stored on the magnetic coating applying electric pulses of suitable polarity to the magnetizing coil of a read/write head. • Binary digit 1 or 0 depends on the direction of magnetization of a small area of the magnetic film which comes under read/write head. • Two techniques of data recording: longitudinal and vertical recording
• Longitudinal recording: magnetic regions are oriented parallel to disk surface along the track • Vertical recording: The magnetized regions are vertical to the disk surface • During read operation a voltage is induced in the coil of the read/write head due to changes in the magnetic field in the vicinity of the read/write head
10
8/17/2017
Disk Controller • Magnetic disk drives requires controllers • Controller converts software instructions -> electrical signals to operate the disks - Functions: • To interface a disk drive system to CPU • Disk drive selection • Track and sector selection • Issue commands to disk drive system to perform read/write operation • Data separation • Serial – parallel, parallel – serial conversion, error detection
• To improve reliability, same information is also stored in additional disks
RAID System
• In Redundant arrays of Inexpensive Disks (RAID) system multiple disks operate in parallel and store the same information • It improves storage reliability • Eliminates risk of data loss when one of the single disk fails • A large file is stored in several disk units by breaking the file into a smaller units and storing each unit on different disks • This is called as data stripping • When file is read all disks deliver data in parallel, thus total file transfer time is reduced
Air cushion between Head and Hard Disk • The high speed of hard disks creates a thin air cushion of 10 microinch between the rotating disk and the head • The head has no physical contact with the disk surface • Hard disks must be kept in dust free environment • Any dust particles present in sealed container may cause the head to crash into the disks – known as head crash • In head crash the coating of the magnetic material on the disk surface is damaged where the head strikes, thus the data of that portion of disk surface is lost
11
8/17/2017
Floppy Disks • Made of plastic material coated with magnetic material (iron oxide or barium ferrite) • Thin piece of flexible plastic • Also called as diskette • Removable disk, inexpensive storage device also used as backup memory • Sizes: 5.25 inch and 3.5 inch diameter • Rotates at 360 rpm • Average access time : 150 – 250 ms
• Storing capacity of a 3.5 inch floppy – 1.44 MB • 80 tracks/surface, 135 tracks per inch, 18 sectors per track, 360 rpm, 512 bytes per sector • Both sides of disk store information • Data transfer rate: 40 KB/s
• Read/write head window is covered with a sliding metal cover / shield • There is a hole at the center for drive spindle • Write protect notch to protect the stored information • Sliding plastic button: can slide to any of two positions • One position: allows reading, writing and erasing • The other position allows only reading • Protective cover of a 3.5 inch floppy – hard plastic
Optical Disks • Used for backup memory, direct access device • Information is written to and read from optical disk using laser beam • High storing capacity – 650 MB to 17 GB • DVDs of 15, 25, 30 and 50 GB • Long life • Error checking code is used • But access time is more than magnetic disks
12
8/17/2017
• Types: CD (Compact Disk) or CD-ROM, CD-R (CD Recordable), CD-RW (CD Read/Write), DVD (Digital Versatile Disk) – ROM, DVD-R, DVD-RW • CD Technology - Bottom layer is polycarbonate plastic, acts as a clear glass base - The surface of the polycarbonate substrate is coated with a reflecting material – aluminium - The aluminium surface is coated with a protective acrylic layer - The topmost layer has a label
• Single spiral track for recording data • Spiral tracks can store more data than concentric circular tracks • Laser beam is used to write data in form of 1s and 0s • To write 1, laser beam is turned ON and burns a pit into the reflecting layer • Laser beam is focused from polycarbonate surface . Laser source and photodetector is positioned below the polycarbonate plastic • The emitted laser beam travels through the polycarbonate plastic, reflected back from the aluminium layer and comes back towards the photodetector
• To write 0, laser beam is off, hence pit is not burned (land) • The spiral track is divided into sectors of same size. The sectors near the outer edge of disk are of same length as that of inner sectors • The pits and lands are read by laser at constant linear velocity (constant rate), hence optical disk is rotated at a variable rotational speed • Disk rotates more slowly near the outer edge than near the center
CD-ROM and Audio CD • CD-ROM – stores computer data • Audio CD – used for audio/video CD-ROM – stores additional bits for error detection and correction • Capacity – 650 MB, diameter 5.25 inch, speed 360 rpm • Write data- high intensity laser is used, read data – low intensity • Information on read only CD is recorded at manufacture time
13
8/17/2017
CD-R (CD - Recordable) • Used when one or few copies of data is required • Write-once read many times (WORM) type CD • Spiral track • Photosensitive organic dye on the track • Write 1s – laser beam is focused to create pits into organic dye on track • Write 0s – laser beam is off thus land is formed • CD-R used to store documents and files, permanently stored • Storing capacity : 700 MB
• Using laser beam, structure of alloy material can be changed from one state to other – phase change technology • In normal state – alloy has crystalline nature • When alloy is heated above 500 degrees C using high power laser beam and cooled down, the alloy converts to amorphous • Amorphous state reflects light poorly (pit) represents bit 1 • Crystalline state represents bit 0 • To erase data – alloy is heated about 200 degrees C and the temperature is maintained for an extended period (annealing)
CD-RW (CD - Rewritable) • Read/write optical disk • User can erase the recorded data and rewrite new data • Capacity : 700 MB • Recording layer contains an alloy of silver, indium, antimony and tellurium • Alloy has two states: crystalline and noncrystalline/amorphous state • Crystalline – allows light to pass through it • Amorphous – absorbs light
• Annealing – converts amorphous to crystalline state • CD-RW drive uses laser of 3 different power - High power – record pits (1s) - Middle power – erase data - Low power – read data • CD-RW reads CD-ROM, read/writes CD-R • CD-RW drives provide EIDE, SCSI and USB interface
14
8/17/2017
DVD (Digital Versatile Disk) • Much more storage capacity than CD • Use laser beam of shorter wavelength • Pits in DVD are smaller, tracks are placed closer together • Single layer single sided DVD – 4.7 GB • Double layer single sided DVD – 8.5 GB • Double layer double sided DVD – 17 GB • Access time is low • Data transfer rate is much higher than CD because of high density of pits
Three types of DVD • DVD-ROM Bottom layer – polycarbonate plastic, forms base of the disk,next layer – reflecting layer (aluminium), protective acrilic layer,topmost layer – label capacity of SLSS disk – 4.7 GB, DLSS disk – 8.5 GB, DLDS disk – 17 GB DVDs of 15, 25, 30 and 50 GB is available
• In a dual layer DVD, first layer – translucent material (semireflector) reflecting aluminium material • A fully reflecting material is provided at the top of the second layer • By focusing the laser beam on the desired layer the light is reflected back by the layers to detect lands and pits corresponding to the data stored in these layers • The layer on which laser is not focused reflect less amount of light
• DVD-R or DVD-Writable pits are formed in dye layer, data can be written once and read multiple times capacity – 4.7 GB • DVD-RW or DVD-RAM or DVD-Rewritable recording layer is an alloy (silver, indium, antimony, tellurium), uses phase change technology for data recording capacity – 4.7 GB and 9.4 GB uses laser beam of different powers for writing (high), erasing (middle) and reading (low) EIDI, SCSI and USB interfaces can be used
15
8/17/2017
Zip disk • Removable storage device to store 100 – 250 MB of data • Made of plastic material coated with magnetic oxide particles • Zip drive is automatically assigned a logical drive letter and files can be transferred to and from the zip drive • Zip drive is built in to the PC or can be connected using parallel or SCSI cable • Different versions can store 100, 250 and 750 MB data
• Read/write heads are about one-tenth the size of a floppy drives head and closer to the size of read/write head in a HDD • Smaller heads allows to write data using 2,118 tracks per inch, compared to 135 tracks/inch in floppy • Uses zone recording, same recording density is used throughout the disk • More sectors per track as the head moves towards the outer edge of the disk
• Similar to floppy drive, same size and thicker • Zip disk can hold 100 – 200 MB data • Magnetic coated mylar disk (cookie) is protected by a hard plastic shell, with a metal plate that slides open to give read/write heads access to disk. • Higher spin rate – 3,000 rpm (floppy drive: 360 rpm) • Two read write heads on each side of the cookie. • Zip drives head lightly touches the cookie/disk, thus higher spin rate and less wear and tear on the disk
Magnetic Disks
• Commonly used direct-access secondary storage device. • Physically, a magnetic disk is a thin, circular plate/platter made of metal or plastic that is usually coated on both sides with a magnetizable recording material such as iron-oxide • Data are recorded on the disk in the form of tiny invisible magnetized and non-magnetized spots (representing 1s and 0s) on the coated surfaces of the disk • The disk is stored in a specially designed protective envelope or cartridge, or several of them are stacked together in a sealed, contamination-free container
16
8/17/2017
• Disk address represents the physical location of the record on the disk • It is comprised of the sector number, track number, and surface number (when doublesided disks are used) • This scheme is called the CHS addressing or Cylinder-Head-Sector addressing. The same is also referred to as disk geometry
17
8/17/2017
Concept of Cylinder • Storage capacity of a disk system = Number of recording surfaces X Number of tracks per surface X Number of sectors per track X Number of bytes per sector
Magnetic disks – Access time • Disk access time is the interval between the instant a computer makes a request for transfer of data from a disk system to the primary storage and the instant this operation is completed • Disk access time depends on the following three • parameters: – Seek Time: It is the time required to position the read/write head over the desired track, as soon as a read/write command is received by the disk unit – Latency: It is the time required to spin the desired sector under the read/write head, once the read/write head is positioned on the desired track
18
8/17/2017
• – Transfer Rate: It is the rate at which data are read/written to the disk, once the read/write head is positioned over the desired sector • As the transfer rate is negligible as compared to seek time and latency, Average access time = Average seek time + Average latency
Magnetic Disk Drive • Unit used for reading/writing of data on/from a magnetic disk • Contains all the mechanical, electrical and electronic components for holding one or more disks and for reading or writing of information on to it • Although disk drives vary greatly in their shape, size and disk formatting pattern, they can be broadly classified into two types: • – Those with interchangeable magnetic disks, which allow the loading and unloading of magnetic disks as and when they are needed for reading/writing of data on to them – Those with fixed magnetic disks, which come along with a set of permanently fixed disks. The disks are not removable from their disk drives
Magnetic Disk Controller • Disk drive is connected to and controlled by a disk controller, which interprets the commands for operating the disk drive • Typically supports only read and write commands, which need disk address (surface number, cylinder/track number, and sector number) as parameters • Connected to and controls more than one disk drive, in which case the disk drive number is also needed as a parameters of read and write commands
19
8/17/2017
Hard Disks • Round, flat piece of rigid metal (frequently aluminium) disks coated with magnetic oxide, Come in many sizes, ranging from 1 to 14-inch diameter. • Depending on how they are packaged, hard disks are of three types: • Zip/Bernoulli disks, Disk packs, Winchester disks • Primary on-line secondary storage device for most computer systems today
- Disk Packs • Uses multiple (two or more) hard disk platters mounted on a single central shaft • Disk drives have a separate read/write head for each usable disk surface (the upper surface of the top-most disk and the lower surface of the bottom most disk is not used) • Disks are of removable/interchangeable type in the sense that they have to be mounted on the disk drive before they can be used, and can be removed and kept off-line when not in use
- Winchester Disks • Uses multiple (two or more) hard disk platters mounted on a single central shaft • Hard disk platters and the disk drive are sealed together in a contamination-free container and cannot be separated from each other • For the same number of disks, Winchester disks have larger storage capacity than disk packs because: • All the surfaces of all disks are used for data recording • They employ much greater precision of data recording, resulting in greater data recording density
20