DS_FIT_II

 STORAGE CELL

Storage in computers is made using storage cells. A variety of technologies are used to fabricate storage cells.

A common characteristic of all storage cells is that they can be in one of two stable states. The two stable states are called the ‘1’ state and ‘0’ state.  By a stable state we mean that the cell remains in that state unless it is intentionally disturbed.  

 The other properties of a storage cell are:

1. Continuous supply of power is necessary for a cell to continue to remain in a stable state.

2. A bit once written is permanently stored and cannot be altered by a user.

3. The time needed to write/read a bit in a cell.

In Fig.  shown a storage cell with four lines .

=>The input line is to feed the data to be written.

=>The data stored in the cell appears on the output line.

=>When data is to be written in a cell, a control signal is placed on the write line and the corresponding data on the input line.

=>When data in a cell is to be a read, a control signal is placed on the read line and the data stored in the cell will appear on the output line.

=>In all computers today data is written in a cell using electricity to supply energy.

=>Hence an appropriate voltage is applied to the input line corresponding to the data to be written. Thus, if a 1 is to be written in a cell, a voltage representing a 1 is fed to the input line. A write signal is applied on the write line and the cell goes to a state representing 1.

If a 0 is to be written in a cell, another voltage representing 0 is fed to the input line. When a write signal is applied to the write line, the cell goes to the stable state representing 0.

 An "ideal" storage cell should have the following properties:

1. It should have at least two stable states.

2. While a cell is in a stable state, it should consume as little energy as possible (ideally zero).

3. It should be possible to switch between 0 and 1 states any number of times without losing the data.

4. It should occupy very little space.

5. The time taken to write/read must be as small as possible.

6. The data stored in a cell must not be lost with the passage of time.

7. The cost of each cell must be very small.

There is no device that satisfies all the properties specified above.

Usually, the lower the  read/write time, the higher is the cost of a cell. Also, the faster a cell, the more is the energy it consumes.

 

PHYSICAL DEVICES USED AS STORAGE CELLS

A number of different physical devices have been used to build storage systems of computers.

Capacitor Storage Cell

In this  a capacitance used as a storage cell. A capacitance can be in two states: a state in which it is fully charged state the ' 1 ' state  and another in which it is fully discharged state  the ' 0 ' state.

If a 1 is to be written in the cell  in the Fig. , a voltage V is applied to the input line and a write signal is applied to the Write line. The write signal closes switch S1 and the voltage V applied to the input charges the capacitance, thereby storing 1 in it. The state of capacitor is read by applying a signal to the Read line. This signal closes switch S2 and the status of C is read, either charged, in which case the voltage at the output is V, or discharged, in which case the voltage at the output is 0.

 Advantages

·     =>It is inexpensive.

·     =>The area required to fabricate a cell is very small, around 0.02 um². Thus 5 billion cells occupy only 1 cm².

Disadvantages

·      =>It is volatile; that is, the data stored in the cell is lost unless it is refreshed.

·  =>The readout from this cell is also destructive. In other words, when a charge in the capacitor is read, it discharges and the cell goes to 0 state.

 Example:

 Dynamic Random Access Memory (DRAM).

 Flip-Flop Storage Cell

A flip-flop is a storage device that uses four semiconductor switches to store either a 0 or a 1. In Fig.  a storage cell which uses a flip-flop to store a 0 or a 1.

 

If a 1 is applied to input and a write signal is applied to the Write line, S1 closes and a 1 is written in the flip-flop. The flip-flop will remain in this state storing a 1 unless it is disturbed.

If a 0 is fed to input and a write signal is applied to the Write line, a 0 is written in the flip-flop. If the data stored in the flip-flop is to be read, a read signal is applied to the Read line which closes S2, and the data stored in the flip-flop appears on the output line.

 The major advantages of a flip-flop compared to a capacitor are:

·=>It takes less time to store a bit in it compared to a capacitor storage cell.

·=>The data stored is not lost with passage of time.

·=>The readout from a flip-flop is non-destructive; when data is read from a flip-flop, it is not erased.

The major disadvantages of a flip-flop compared to a capacitor are:

·  => Flip-flops are more expensive.

·  =>Flip-flops occupy more space as they use four semiconductor switches.

· =>Both capacitors and flip-flops need a continuous supply of power to maintain their state. When power fails the stored data is lost. They are thus volatile.

 Example: Static Random Access Memory (SRAM).

 Magnetic Storage Cell

The physical device used as a magnetic storage cell is a magnetic recording surface. The method used to store data (1 or 0) on a magnetic surface is shown in Fig.

If a 1 is to be written on the magnetic surface, a current is sent through a coil wound on a magnetic write head. This current creates a magnetic field (as shown in the figure) in the gap in the write head. A plastic or metal surface is coated with a ferromagnetic material. This surface is kept very close to the write head. The field in the gap of the head magnetizes the surface in the same direction as the field as shown in the figure. A right to left magnetization (ß) is taken as a 1. If a 0 is to be written, the current in the coil is sent in the opposite direction. In this case the magnetic field in the gap is from left to right (→), and the surface also is magnetized in the same direction, which we call a 0. In order to write a sequence of 1 s and 0 s, the magnetic surface is moved (in one direction). The direction of the current through the coil of the write head is adjusted as needed to write a 1 or a 0. Bits are thus recorded on the surface as shown in Fig. (b).

 To read data stored on the surface, a read head is used. The read head is called a magneto- resistive head. The resistance of this head increases if a magnet with S→ N alignment is placed below it and the resistance decreases if the alignment of a magnet below it is opposite, namely, NßS. The current i(t) flowing through the head is proportional to the resistance of the head. Thus, if the current increases, we say that a 1 is read (1 is NßS), and if it decreases, then a 0 is read. Recording on a magnetic surface is used in magnetic hard disks and magnetic tapes. (In recent magnetic recorders, the magnetic dipoles are aligned vertically by using a different design of recording head and a thicker ferromagnetic layer on the surface. This increases the number of bits that can be stored.)

 Polycarbonate Storage Cell

This type of storage cell is used in what are known as laser disks or compact disks. The surface of a thin polycarbonate substrate is coated with a reflecting material, usually aluminum. Over this material, a protective layer is coated (see Fig. ). To write bits on this surface, a laser beam is used.

Wherever a 1 is to be written, the beam is turned on which burns a 'pit' up to the reflective layer. Wherever a 0 is to be written, the laser beam is defocused and no 'pit' is burnt. A sequence of cells, each cell being a pit or no pit (no 'pit' is called a 'land'), are traced along a spiral track on the surface while the disk is rotated. Reading is achieved by rotating the disk and moving a laser beam along a track. Wherever there is a 'land', light reflects from the reflective layer and no light gets reflected from a 'pit'. The reflecting light is sensed by an electronic light sensing device and converted to an electrical signal representing a 0 or a 1.

 

RANDOM ACCESS MEMORY

·  =>The main memory of a computer is made using either capacitor storage cells or flip-flops to store data.

·  =>A set of cells are strung together to form a unit called a word.

·  =>A word consists of a set of bits. The number of bits in a word is called word length.

· =>A word is written into or read from a memory as a unit.

·  =>Words to be written in a small temporary storage unit called a register it is known as the Memory Data Register(MDR).

·   =>When a word is to be stored in a memory, it is first stored in MDR.When a word is read from memory, it is also stored in MDR, overwriting its contents.

·  =>The location in the memory where a word is to be stored is called the address of the word. The address where this word is to be stored is entered in another register called Memory Address Register(MAR).

·  =>The memory control circuits issue a write signal and the contents of MDR are written in the address specified by MAR.

·  =>If a word is to be read, its address is entered in MAR and a read signal is issued by the memory's control circuits. This results in the contents of the word whose address is in MAR to be copied from the memory to MDR.

·  =>The memory unit is organized as a number of addressed locations, each location storing a word. The address normally starts at 0, and the highest address equals the number of words that can be stored in the memory.

 


If a memory has 4096 locations, each location storing a byte (8 bits), the address starts with 0 and ends with 4095.

The MAR should have 12 bits, the address starting with 0 and ending with 111111111111 or FFF (Hex). The MDR should have 8 bits to accommodate 8 bits of a word.

 Figure depicts the block diagram of a Random Access Memory (RAM) which stores 4096, 8-bit words. The figure shows a MAR which is 12 bits long and MDR which is 8 bits long. The memory control circuits generate read/write signal. Two parameters of great interest to users are (i) the size of the memory and (ii) the speed of the memory.

Example 1: A RAM stores 256 MB and 16 bits are accessed in each memory read/write. What is the size of MAR and MDR of this memory?

Solution

The capacity of memory is 256 MB. If any byte is to be accessed, it should be possible to address any byte.

As there are 256 MB= 228 bytes (1kb=1024bytes,1mb=1024kb=>1024*1024=1048576 bytes=>256*1048576=268435456=228 bytes)

The number of bits in MAR is 28 bits.

As 16 bits are retrieved when a word is accessed, the size of MDR must be such as to accommodate all the bits retrieved. Thus the size of MDR is 16 bits.

 There are two types of RAMS used in today's computers.

1. Dynamic Random Access Memory (DRAM)

2. Static Random Access Memory (SRAM).

Dynamic Random Access Memory (DRAM)

·  =>The storage cell of DRAM is a capacitor.

·  =>DRAM will lose the data stored in it unless it is periodically refreshed.

·  =>DRAMs are used as the main memory in most computers.

·  =>DRAM is a destructive readout memory

·  =>DRAMS is volatile

Static Random Access Memory (SRAM)

· => The storage cells used in SRAM are flip-flops and they  does not need refreshing.

· =>The cycle time of SRAM is around 5 times shorter than that of DRAM. Thus SRAM is preferable as the main memory of a computer.

· =>The cost per bit of storage of a SRAM is higher compared to a DRAM.

· =>The storage capacity of a SRAM is much lower compared to a DRAM .

·  =>SRAM's  has higher speed, it is used as a cache memory.

·  =>SRAMS uses a technology called CMOS which consumes very little power. These SRAMS can be operated on batteries for a reasonably long period and are not volatile as long as the batteries are charged.

· =>SRAM is a non-destructive readout memory

·  =>SRAM is  also volatile.

"destructive readout"

By destructive read out we mean that the contents of the memory are erased by the process of reading. Hence it must be rewritten as soon as it is read., whereas. Both DRAMS and SRAMs are volatile.

 

READ ONLY MEMORY

·   =>ROM is also an addressable random access memory.

·   =>It is non-volatile; that is, when power is turned off, the data stored in it is not lost.

·    => In Fig. we depict a ROM whose capacity is 4 KB (8 bits per word).

·   =>ROM uses semiconductor memory cells which can be permanently placed in one of two states, 0 or 1, by a process called fusing.

·  =>It is a non-destructive readout, non-volatile memory. In other words, when we read data stored in it, a copy of the data is delivered; the original remains in the memory. With passage of time also the data stored in a ROM is not lost. In other words, the data stored in a ROM is retained indefinitely.

·   =>Just like in a RAM, to read data stored in a ROM, the address of the data is placed in the MAR and a read signal is issued. A copy of the data in the addressed location appears in the MDR from which it can be used for an application.

An important application of ROM is to store tables which do not change. As an example, let us see how a seven-segment display (shown in Fig) commonly used in digital watches and calculators can be designed using a ROM.

 


A table showing numbers (their binary equivalents) as input and segments of the display to be lighted for each number is given in Table .

 

S1, S2, S3, S4, S5, S6, S7 are segments (a light emitting device) which can be either lighted or not lighted.

Let us examine line 1 of Table . When the input is 0, all the lights except S7 in the seven-segment display should light up. This is shown by putting a 1 for the segment to be lighted and 0 for the segment which is to remain dark.

This table can be stored in a ROM. When 4 bits corresponding to the number to be displayed are placed in the MAR of a ROM, the seven bits corresponding to S1, S2, S3, ..., S7 appear in the MDR. These bits are used to light up the appropriate lamps.

For example, if we place 0 1 0 1 in the MAR (corresponding to the number 5), the output bits are S1 = 1, S2= 0, S3 = 1, S4= 1, S5=0, S6= 1, S7 = 1. Thus the segments S1, S3, S4, S6 and S7 will light up as shown in Fig., and 5 is displayed.

 

In many applications a user may like to store his own special tables or programs. Some common programs stored are for controlling the operation of custom designed appliances such as a security system. In such cases ROMs in which data can be written in the field are required.

 Such ROMs are available and are called Programmable ROM (PROM).

 Types of ROM :

Basically there are many types of Read Only Memories with different capabilities. Some of them are as follows

 Programmable ROM (PROM):

·   =>Programming requires special equipment to write data in the ROM.

·    =>The time taken to write the required data in a PROM is normally a few seconds as compared to reading time which is usually less than a microsecond.

·   =>PROM is not flexible as the data stored in it cannot be altered.

 Erasable and programmable (i.e., rewritable) ROMS (EPROMs):

=>Erasable and programmable (i.e., rewritable) ROMS (EPROMs) are now available.

=>There are two types of EPROMS known as

1.UVEPROM

2.EEPROM.

 UVEPROM (Ultra-Violet Erasable Programmable Read Only Memory )

=>UVEPROM is erased by shining ultraviolet light on a window on the EPROM chip.

=>It can then be reprogrammed and new data is stored in it.

 EEPROM (Electrically Erasable PROM)

·  =>In EEPROM, electrical pulses are used to erase the contents of PROM, and thus the name Electrically Erasable PROM.

·  =>After erasing the contents, new data can be written.

· =>It is thus seen that ROM is not a read/write memory like the main memory of computer.

·  =>Even though ROM is also a random access memory, the write time is much higher than the read time.

·  =>Special circuitry is needed to write data in a ROM.

 Flash Memory

·  =>A small variant of the Electrically Erasable and Programmable Read Only Memory (EEPROM) is called a flash memory.

·  =>They use one transistor per storage cell and come in capacities ranging from 8 GB to 1 TB

·   =>They are non- volatile.

· =>They will retain data stored in them without a power source.

· =>Flash memories are semiconductor memories.

·   =>Thus they are attractive as a storage device to replace magnetic storage such as a disk.

·  =>Data is written and read in large blocks in flash memories. There is no difference between read and write times in flash memories.

·  =>Speed is specified as the data transfer rate from and to the flash memory and is quoted as nx, where x is 150 KB/second and n is variable. The value of n is around 100 and it is continually increasing.

·   =>Digital cameras were the first devices to use flash memories.

·         There are two shapes which are common.

1.A stick shape called a pen drive plugs into a USB port of a computer or a laptop.

2. A flat disk shape(Memory Card) can be inserted in cameras and tablet computers.

·  => The flash drives used as replacement of hard disks are large,128 GB to 1 TB, and can transfer data at 1500 MB/second.

·  => They are much more expensive than hard disks but are faster.

·  => Flash memory  consume very little power.

·   =>  Another use of flash memories is as cache memory of disks to reduce latency delay. Nowadays tablet computers use flash memory as the secondary memory.

 

SECONDARY STORAGE

· =>Secondary storage which has a much higher capacity but is relatively slow.

· =>Secondary storage  is a directly addressable storage.

·  =>By a direct access storage we mean it is a storage in which data is stored in specified addresses. Data can be read directly if the address is given. In a direct access store the time taken to retrieve data in a direct access storage depends on where it is stored.

·  =>The most common direct access storage used in computers are magnetic disks, CDROMs and flash storage.

 Magnetic Disk Drives

·  =>Magnetic disks are smooth metal plates coated on both sides with a thin film of magnetic material.

·  => A set of such magnetic plates are fixed to a spindle one below the other to make up a disk pack (see Fig).

·   =>The disk pack is sealed and mounted on a disk drive. Such a disk drive is known as a Winchester disk drive.

·  => The disk drive consists of a motor to rotate the disk pack about its axis at a speed of around 7200 revolutions per second.

·  =>The drive also has a set of magnetic heads mounted on arms. The arm assembly is capable of moving in or out in radial direction (Fig.).

· =>Data is recorded on the surface of a disk by the magnetic heads while the disks rotate about their common axis.

·  =>Thus recording is on concentric tracks on each disk surface.  A set of corresponding tracks on all surfaces of a disk pack is called a cylinder (see Fig.).

·  => If a disk has n platters, there are 2n surfaces and thus 2n tracks per cylinder.

·   =>A track is divided into sectors. A sector is the smallest addressable unit in a disk. Thus sectors are read and written on a disk. If a string of bytes to be written is less than the capacity of a sector, then the last byte is duplicated to fill up available sector space and the result is stored in a sector.

=> If a disk has p sectors per track and a sector stores s bytes, then the storage in each track is p x s bytes. If the disk has t tracks per surface and there are m surfaces, the total storage capacity of the disk is:

 Total storage capacity = p x s x t x m bytes

 


Example1  A hard disk has 16384 tracks on each surface. It has four plates. How many tracks are there per cylinder? What is the total number of cylinders in the disk? How many tracks are there in the disk?

 Solution There are four plates and hence 8 surfaces. The corresponding tracks in all the surfaces constitute a cylinder. Thus there are 8 tracks in each cylinder.

Total number of cylinders = Tracks per surface = 16384.

Total number of tracks = Tracks per surface x number of surfaces 16384 x 8 = 131072.

 Example2 What is the storage capacity of the disk with 131072 tracks if there are 29824 physical sectors per track and each sector stores 512 bytes?

 Solution There are 131072 tracks in the disk. Each track has (29824 x 512) bytes. Thus the storage capacity of the disk is

131072 x 29824 x 512 = 1864 GB = 1.82 TB

 Disk Interface Controller

=>A disk interface controller checks the data read from disk for errors, if any.

=>The controller also reduces the participation of CPU in reading/writing data in the main memory from a disk.

=>An interface controller can control several peripherals such as disk, CDROM, printer, etc.

=>There are four standard interface controllers marketed by vendors.  They are:

1.      SATA (Serial Advanced Technology Attachment)

2.      SCSI (Small Computer System Interface pronounced SCUZZY)

3.      Ultra wide SCSI

4.      Fibre Channel Interface

=>These interface controllers are compared based on at what rate data can be transferred from the disk to the main memory and back, the highest speed drives they can support and the number of disk drives that can be controlled.

=>Of these interface controllers, SATA is the preferred controller used with desktop PCs with windows operating system. This is due to its low cost and performance which is sufficient for desktop PC applications.

=> SCSI is a more expensive and is used with expensive faster computers (servers) which support more than four peripherals such as several hard disks, CDROM, scanner, printer, etc. High speed disks also require SCSI controller.

=>If a computer is used by many users and higher data transfer rate disks are needed, ultra SCSI is appropriate. A recent version of SCSI controller is called Serial Attached SCSI or SAS and is very fast.

=>Fibre channel has the highest performance. It is used to control several disks/peripherals and arrays of disks. It can support up to 127 peripherals.

 


COMPACT DISK READ ONLY MEMORY (CDROM)

·  =>A polycarbonate cell used in a storage system called CDROM. The drive is called a CDROM drive and the medium in which data is recorded is called Compact Disk (CD).

·=>A CD is a circular shiny metal-like disk whose diameter is 12 cm. It can store 700 MB which is equivalent of 3,00,000 pages of printed text.

·  =>As the name implies, we assume that data on a CD is pre-recorded and it is read using a CDROM drive.

· =>The data on a CD is recorded as a sequence of lands and pits along spiral tracks (see Fig). The data stored on CD is read by inserting the disk in a drive.

· =>A motor in the drive rotates the disk at a speed of 360 revolutions per second.

·  =>A sharply focused laser beam senses pits and lands on the surface of the disk as the disk rotates. This is converted to 1 s and 0 s by an electronic interface unit.

· =>The rate of data retrieval from a CDROM disk is indicated using the notation nx, where x is an integer indicating the original nominal rate of 150 KB/second and n is the factor by which it is to be multiplied. Thus data from a CDROM drive specified as 52x can be retrieved at the rate of 52 x 150 KB/second = 7.8 MB/second

A standard has been evolved for storing data on CDROM. The current standard is called ISO 9660, standardized by the International Standards Organization which has been accepted by all CDROM vendors.

Major applications of CDROMs are:

1. Distribution of software.

2. Distribution of large texts such as encyclopedias, big manuals, conference proceedings, etc.

3. Distribution of multimedia files-that is, text, audio, graphics and video clips used in education and entertainment. CDROMs used to record movies are often called Video Cassette Disk (VCD).

If a CD is properly handled, it is claimed that it can preserve stored data for 100 years. The only problem is that with the progress of technology, the models of CD readers will change and you may not be able to read the old CDROMS with the new readers.

 CD-R and CD-RW

· => Compact disk recordable (CD-R) is used to store the information . CD-R disc cannot be formatted and data cannot be deleted from it.

=>A Compact disk recordable is also known as a Compact Disk-Write Once (CD-WO) or Compact Disk - Write once read many (CD-WORM)

·  =>CD-R is made of a polycarbonate plastic coating and it can read the information using photosensitive dye.

·   =>Manufacturers claim that the life of CD-R is around 10 years. The life depends on the quality of the dye and the plating material.

· =>To write '1' on disk , laser beam is turned on . To write '0' on disk , laser beam is not turned off. .

=> It is not necessary to write the entire data on a CD-R in one session. Data can be written

one track at a time or as packets. If a mistake is made while writing the data, the disk has to be discarded.

· =>CD-Rs are used to distribute material such as conference proceedings, send data files by post and backup copies of files.

· =>When the disk is inserted in a CD reader, it will sense 'lands' and 'pits' and correctly interpret the sequence of 0s and 1s written on the CD.

· => CD-RW term is known as CD-Rewritable or CD- Read Writable

· =>CD-RW are disks on which data can be written, erased and new data written. CD-RW are mostly used to temporarily back up files.

 Digital Versatile Disk Read Only Memory (DVDROM)

·   =>DVDROM uses the same general principle as a CD.

· =>Pre-recorded DVDROMS (abbreviated DVD) are extensively used to store large video files (e.g., movies) as their capacity is very high compared to CDROM.

·   =>The physical size of DVD is same as that of CD.

·  =>A DVD reader also uses a laser beam to read pits and lands as in a CDROM.

· =>The wavelength of the laser beam is however smaller (650 nm versus 780 nm for CDROM).

· =>The pits are much smaller as a shorter wavelength laser beam gives a smaller focused spot.

· =>This allows more data to be recorded on a track and also allows tracks to be closer to one another.

· => There are several types of DVDs. DVD-5 stores data on one side only in a single layer and has a capacity of 4.7 GB. DVD-5 is also known as DVD (SS, SL).

· =>DVD-10 stores data on both sides of the disk in a single layer and its capacity is 9.4 GB. DVD-10  is also known as DVD (DS, SL)

·  => DVD-18 stores data on both sides of the disk in two layers and has a capacity of 17 GB. DVD-18 is also known as DVD (DS, DL).

· =>The 1x speed of DVD is 1.35 MB/second as against 150 KB/second of CDROMs.

·  =>The high capacity of DVDs allows them to store full-length movies (1 to 3 hours) in a compressed form. The DVDs we described so far are pre-recorded. They are stamped using a master disk.

·  =>DVDs can also be written by users. There are several types of recordable DVDs. They are

DVD-R (DVD dash R), DVD+ R.

·  =>DVD-RDL and DVD + RDL store data on two layers and have a capacity of 8.544 and 8.548 GB, respectively.

· =>DVD±R can be recorded only once. DVD±RW, on the other hand, can be used to store, erase and rewrite new data.

·  =>The life of DVD+R, DVD±RW is claimed by manufacturers to be between 2 and 15 years depending on the quality of the dye and coating material used.



Blu-ray Disc

=> Blu-ray disc is a new standard which is designed to replace DVDs.

=>These disks also use a laser beam for recording.

=>The wavelength is smaller the density of recording is higher.

=>A Blu-ray disc (abbreviated BD) can store 25 GB per layer. Double-, triple-, and quadruple-layer BDs are also marketed with capacities of 50 GB, 100 GB and 150 GB, respectively.

=> The recording data rate is given as nx where x is 36 Mbits/second. Currently, the maximum value of n is 12.

=> BD-R (Writable once) and BD-RE (Recordable and Erasable) are also now available. Currently, BDs and BD players are more expensive compared to DVD players and DVDs.

=> BDs, however, can be used for high definition TV with much better quality. It is conjectured that DVDs and BDs will coexist for several years.

 

ARCHIVAL STORE

· =>Archival store means a storage device used to store data to be preserved.

· =>A duplicate copy is kept either for legal purposes or for further analysis. They have to be retained for a long duration and are called data archives.

·  =>Data archives are normally indexed so that they can be searched to locate specific files which can be retrieved.

· =>They are kept in what are known as archival storage units.

·  =>A storage unit which is appropriate as an archival storage is a magnetic tape. Data is stored on a magnetic tape along one or more tracks.

·  =>A tape drive which is currently used as archival storage unit is a Half-Inch Cartridge (HIC) tape (called Linear Tape Open (LTO) Ultrium

The main properties required for an archival storage unit are:

1. The medium used for storage should be removable from the drive.

2. It should be a writable store.

3. The size must be appropriate for the application-normally quite large-a few terabytes.

4. It should not be volatile-it should retain data stored in it for a considerable time.

5. It should have long life, i.e., data in it should be readable for several years (normally up to 30 years)


CENTRAL PROCESSING UNIT


INTRODUCTION

=>CPU is essential to retrieve instructions from the memory, interpret them and carry them out.

·=>The CPUs used in general purpose computers like  desktop PC, laptops, tablets, and larger computers are called general purpose processors .

=>A large number of CPUs are used in systems we use every day, such as washing machines, microwave ovens, cell phones, VCD players, and cars. Machines using such CPUs are called "intelligent" in advertisements as they are programmable and thus more flexible to use. In fact, the application of CPUs for such purposes is increasing day by day. Such CPUs are known as embedded processors as they are built into products such as washing machines, cars, etc.

=>The structure of CPU is similar for both general purpose computers and embedded devices.

=>All CPUs nowadays are microprocessors, popularly known as microchips. They are called microprocessors as the entire processor is fabricated on one silicon chip of size around 5 mm x 5 mm. Each chip has millions of switches which are wired together to carry out various operations on strings of bits.

 

STRUCTURE OF A CENTRAL PROCESSING UNIT

·=>A block diagram of a computer is given in Fig.

=>The Central Processing Unit (CPU) which is the "brain" of the computer

·=>It is used to manage all the functions performed by a computer. The user enters the data or instructions to the CPU through an input device. These instructions are executed and the CPU will communicate the result through output devices.


=>The main purpose of a Central Processing Unit (CPU) is to retrieve instructions from the memory, interpret them and carry out the operations specified in the instruction

=> Inorder to perform the operations, CPU will communicate with the input Unit, the output unit, the main memory and the secondary storage.

=> CPU can send control signals to all these units and order them to perform required operation.

=> The CPU is designed to interpret and carry out a number of operations, called its instruction set. The instruction set consists of a variety of operations required to solve problems. A representative set of instructions is given in Table


Normally an instruction should specify the following:

1. The operation to be performed.

2. The location at which the operands are stored in the main memory. The place in the main memory where the operand is stored is called the address of the operand.

3. From which address in the main memory the next instruction is to be taken. Normally, instructions are stored in successive addresses and instructions are executed sequentially. The normal flow is changed in some programs based on some inputs or results of previous operations.

=>The CPU hardware is designed to interpret operation codes that are strings of bits.

=>Addresses are also specified using binary numbers.

For example, if an addition operation is coded as 000011 and the address of the operand to be added is 1011 1111 0010 1101 0111 0110, the instruction will be:

 000011 1011 1111 0010 1101 0111 0110

 This is called a machine language instruction. It is obvious that it is very difficult for people to correctly write such a sequence of bits.

Thus instructions are usually written using meaningful abbreviations to represent operation codes (known as mnemonics) and strings of characters to represent operand addresses. We will describe the working of CPU using this idea.

The sequence of steps followed by the CPU is:

1. Read and store the program in the main memory of the computer. One instruction is stored in each address of the memory. Addresses are all word addresses.

2. Place the address of the first instruction in an instruction counter (also known as program counter or instruction pointer) in the CPU.

3. Retrieve the instruction from the main memory. The address from where it should be retrieved is specified in the instruction counter (here it is 01). Place the instruction in a register called the Instruction Register of the CPU (a register is a temporary store in which data can be placed. When new data is placed in a register, the earlier contents are automatically erased and the new value is stored).

4. Add 1 to the instruction counter so that it now has the address of the next instruction in the memory.

5. In step 3, the instruction from address 01 was placed in the instruction register. The instruction register consists of two parts: one part is used to store the operation code and the other the address of the operand. Decode the operation code.


6. The operation code is READ. The address part is A. Thus a command is issued to the input unit to read the data waiting at the input unit and place it in address A in the main memory.

7. The CPU refers to the address specified in the instruction counter (which is now 02). It retrieves the instruction from there, namely, READ B, and places it in the instruction register. On decoding it, the CPU sends a command to the input unit to read the data waiting there and stores it in address B in the main memory.

8. The next instruction is now placed in the instruction register. The operation code is LOAD and the address is A. This instruction commands that the contents of address A be taken and placed in ALU (Arithmetic Logic Unit) register in the CPU. Thus the number 28 is stored in it.

9. The next instruction is ADD B. On decoding this instruction, the contents of B. namely, 35, is added to the contents of the ALU register. The sum is 63, which is now in the ALU register.

10. The next instruction is STO C. When decoded it commands that the contents of the ALU register be stored in address C of main memory. Thus the sum 63 is stored in address C of main memory.

11. The next instruction is DIS C. When decoded, it commands that the contents of C. namely, 63, be displayed. 12. The last instruction is STOP, which stops the CPU from doing anything more.

 

SPECIFICATIONS OF A CPU

The characteristics of CPU are based on:

1. The variety of instructions it is designed to interpret and execute:

The number of instructions the CPU can execute is called the instruction set of the computer.

2. The number of bits of data that are accessed from the main memory in one cycle: It is called the word length (or data path length) of a computer. It is normally the number of bits in an instruction. The address length of a computer is the number of bits used to directly address bytes in the main memory.  With n bits address, 2n bytes can be directly addressed. The word length and the address length of CPUs have steadily increased ever since microprocessors (i.e.CPU on a single integrated circuit chip) were made by a company called Intel.

3. The architecture, i.e.. the internal structure of a processor:

There are three broad classes of CPU architecture.

RISC (Reduced Instruction Set Computer):

·         =>It has a very small number of instructions.

·         =>The control unit of RISC is simple.

·   =>This processor is used in many high performance computers.

·         =>The only instructions accessing the main memory are load and store.

·         =>All instructions are of uniform size.

CISC (Complex Instruction Set Computers):

·         =>This type of processor is used in PCs.

·         =>Most of the processors designed by Intel which are used in PCs are CISCs.

·        =>They have over 300 machine instructions and a complex control unit.

·         =>The structure of an instruction is also complex.

·     =>Some instructions specify three operand addresses, some only one address and some no address, making the length of instructions variable unlike RISC processors where all the instructions are of the same length.

Multicore Architecture

·         =>This class of CPU emerged in 2006.

·         =>It is called multicore architecture.

·         =>In this CPU, multiple identical processors called cores are integrated in one chip.

·         =>The instructions and the data are scheduled to the cores or processors.

·         =>The processors work simultaneously, thereby increasing the speed of computing.

·      =>At the beginning, CPUs were built with two cores. Currently commercial CPUs for desktop computer are available with 18 cores.

·        =>Having 18 cores does not increase the speed 18 times because in practice due to the dependency among instructions to be carried out by a program, some instructions have to wait for the completion of others.

·         =>Thus it is not always possible to keep all the cores busy performing useful work all the time. Some cores are forced to be idle. Thus the speed up in processing is usually lower than the number of cores.

 

4. Clock speed of CPU:

An important parameter used to describe a CPU is its clock speed or frequency. A clock is a periodic sequence of pulses and the unit used is hertz (Hz). The clock speed is an important parameter as it is an indicator of the rate at which a CPU can execute instructions. The clock synchronizes all the operations carried out by a CPU. Even though higher clock rates give higher processing speeds, this is not always true. It is true only for a given microprocessor family. Higher performance is obtained by increasing the number of cores in the CPU.

For example, the clock frequency of Intel Core 2 CPU is 3 GHz.  

5. MIPS rating of a CPU: Another parameter used to describe the speed of CPU is called its mips (million instructions per second) rating. Normally, it is specified as thousands of mips. It is not a very reliable measure as the time taken by different instructions is different and the mips rating of RISC is normally higher than CISC processors using the same clock frequency.

 

6 . SPEC rating of a CPU: As mips rating is not a very reliable measure of CPU performance, another measure called SPEC rating is used to compare the performance of CPUs. The expansion of SPEC is System Performance Evaluation Corporation. It is a non-profit organization which selected a set of common application programs (called a benchmark set) that are run on a computer to assess its speed. Higher SPEC marks imply that it is a faster computer.

The advantage of SPEC marks is that the performance measure is based on the time taken to run a variety of complete programs written in a high-level language such as C and thus realistically reflects the performance of not only the CPU but also the language used and the operating system.

 

INTERCONNECTION OF CPU WITH MEMORY AND I/O UNITS

CPU coordinates the execution of instructions. The CPU is connected to the main memory by a set of parallel wires called a bus. Bits are transferred from the memory to the CPU and back via a bus. There are two buses which connect the CPU to the memory.

Address Bus:  Which carries the address bits to the Memory Address Register (MAR) of memory from the CPU

Data Bus:   Which carries the data/instructions from the CPU to the Memory Data Register (MDR) of the memory.

Besides these two buses, there is also one more bus i.e.

Control Bus:  Which controls a large number of operations such as Read/Write from or to the memory and also input/output operations.

=> The number of parallel wires constituting a bus is called the bus width. If a MAR has 24 bits (16 MB memory), the address bus width is 24.

=>Normally we retrieve an instruction from the memory and place it in the CPU in one memory read cycle.

=>Thus the size of the data bus from the memory to the CPU equals the number of bits in an instruction, also called the CPU word length.

=>Most current CPUs, for example, Intel processors used in PCs, have a word length of 64 bits and hence a data bus width of 64.

=>The number of bits in the control bus depends on the signals required to coordinate input/output units as well as the main memory.

=>It is normally around 16. The interconnection of CPU, memory and I/O units with buses is shown in Fig.



=>The three buses, namely, the data bus, the address bus, and the control bus, emanate from the CPU chip and are used to connect the CPU to both the memory and the I/O units.

=>This collection of buses is called a system bus. The structure of these buses, i.e., the number of wires, the speed of transmission of data and the length are normally standardized by an industry group. This standardization is essential to allow diverse manufacturers of various peripheral devices such as hard disks, CDROM, display unit, and keyboard to design devices that can be easily connected to a PC.

=>An early bus standard was ISA (Industry Standard Architecture) for 8-bit PCs of the first generation.

=> It evolved into EISA (Extended ISA) which is a faster 32-bit bus.

=>Another current standard introduced by Intel is PCI (Peripheral Component Interconnect) bus which allows 32-and 64-bit implementations. It can be run at 33 MHz or 66 MHz and can connect to 16 peripheral devices.

=>Latest PCI standard is PCI-X-3.0 which is a 64-bit bus running at 66 MHz and with data transfer rate of 532 MB/second. Another standard called PCI Express is also used. Buses continue to evolve and improve with time.

 

Motherboard

=>The CPU, the main memory, the integrated circuits and the buses necessary to connect the I/O units to the CPU and the main memory are all mounted on a printed circuit board called a motherboard (Fig. ).

=>Motherboards are assembled and sold by vendors such as Intel.

=>The motherboard also has a ROM where a program called BIOS (Basic Input Output System) is stored to control all the peripheral devices connected to a computer.



=>A motherboard has a set of connection points called ports to connect units such as a Display Unit, a keyboard, etc. Besides that, it has a set of parallel wires (bus) connected to a pluggable connector to attach I/O units such as a hard disk, CDROM, etc.

=> The motherboard is mounted in a case and constitutes a "PC box".

=>Devices such as Display Unit, keyboard and mouse are outside this box. At the back of the PC box or cabinet, sockets called ports are placed to connect peripherals as shown in Fig.

=>Data are transmitted via a set of parallel lines (e.g., a PCI bus) on the motherboard to a parallel port. Connectors are plugged to the parallel ports and carry the data via a set of parallel wires (called ribbon cables) to fast peripherals such as a hard disk. These ports carry 16 to 64 bits simultaneously.

=>Some data from a motherboard are transmitted on single wires. These are called serial data as bits travel serially one after another. They are connected to serial ports. Serial data are used by slow devices such as a keyboard and a mouse. A standard bus which carries serial data is known as a Universal Serial Bus (USB) and is currently very popular.

=>A device connected to a PC via a USB port is usually connected to one or more USB ports. This allows more devices to be connected to the PC. This is called daisy chaining (see Fig. ).


=>The advantage of USB is that it is connected by a thin wire. It is not necessary to open a PC to connect new devices.

=>Further, with USB standard a new peripheral can be added while PC is on and working. This is called hot plugging.

=>The latest USB 3.0 has a speed of 5 GB/second. A common use of USB port is to connect pen drives to upload or download files to a computer's memory system.

 

EMBEDDED PROCESSORS

=>Special purpose or embedded processors are used for many other jobs such as controlling the functioning of washing machines, fuel and other controls in cars, and to control microwave ovens.

=>These processors have a simpler structure and are designed to interpret and execute a small instruction set.

=>They are also inexpensive as they are used in consumer goods which have to be sold at competitive prices.

=> These processors are called embedded processors as they are integrated as a part of the system in which they are employed.

=>In fact, they provide to the systems in which they are integrated tremendous flexibility as they are programmable and can adapt to changes in inputs they sense.

There are two major categories of embedded processors.

 

Microcontroller

=> Which is primarily used for controlling appliances such as washing machines.

=> Microcontrollers are programmed to cycle through a set of states based on the occurrence of some events.

An example is their use in an automatic washing machine. When clothes are put in a washing machine with required detergent powder, one can set water level based on the weight of the clothes loaded in the machine. One can also set a wash time and spin time for drying. When the machine is turned on, a valve in the water inlet opens. A water level sensor senses the water level and when it reaches a specified level, the machine begins a cycle. Washing continues till the pre-set time is reached. It then starts a rinse cycle which is usually a fixed time. When rinsing is over, a valve opens and drains the water. When all the water is drained, fresh water is let in automatically up to a specified level as commanded by the microcontroller. Rinsing is done again for a pre-set time, at which time the water outlet valve opens to drain the water from the machine. When fully drained, the machine enters a spin drying cycle. This cycle ends when the pre-set time is reached. The machine now gives a beeping sound indicating the end of washing. The actions that take place are summarized in Table

=>Observe that the system follows a specific sequence determined by various events and by sensing the timer.

=>A microcontroller is designed to support such sequential control applications.


Differences between a general purpose microprocessor and a special purpose microcontroller are:

=>Microcontrollers have a built-in ROM within the processor chip to store the control program for the specific application.

=>They have a small RAM for storing data temporarily. The size is of the order of 128 bytes.

=> The word size is usually 8 bits so that the limited ROM space can be used effectively.

=>They have built-in counters and timers which can be set by users.

=> Some microcontrollers have a small processor to perform logic operations on binary conditions (ie., on-off).

=>They have built-in input/output ports for easy interaction with devices external to the controller.

=>Very little external circuitry is needed for the microcontroller to effectively perform its function. The cost of a microcontroller is a fraction of the cost of a general purpose microprocessor.



=>Currently the most popular 8-bit microcontroller is Intel's 8051-series MCS-51.

=>The cheapest model has 4 KB ROM for programs and 128 bytes of RAM for data.

=>Development systems with necessary software are available for various models of microcontrollers.

=>Development systems are used to create bug-free application programs before microcontrollers are integrated into systems such as washing machines.

 

Digital Signal Processor.

Digital Signal Processors (DSPs) are optimized to process real-time audio and video signals. DSPs  used in CD players, mobile phones, digital cameras, etc.  By real-time we mean the time we measure with our watches.

=>For example, cricket match shown on TV "live" is real-time whereas the replay shown later on is not.

=> A real-time processor accepts input signals while it is being generated, for example, a telephone conversation.

=>Digital signal processors are widely used in cost-sensitive consumer products such as mobile phones, hi-fi audio systems, TVs, etc.,

=>Their cost must be much lower than that of general purpose processors such as Pentium.



In Fig.  we show how a DSP is connected to external input/output.

=>The input signal to a DSP is analog: that is, it is a continuously varying signal such as speech, music, video or electrocardiogram.

=> The analog to digital (A/D) converter samples the analog signal at appropriate intervals depending on the bandwidth of the signal and converts it to a sequence of binary numbers. This sequence of bits is input to the DSP. Observe that the input is fed to the DSP in real-time. The DSP processes the input using a program stored in its memory and a sequence of bits stream out as output in real-time.

=>It is converted back to a continuous waveform by a Digital to Analog (D/A) converter.

=>The A/D and D/A converters are integrated circuit chips. These are often part of the DSP itself; that is. they form a part of DSP chip and are not external to it.

Most DSP applications for audio signal processing perform operations using formula of

the type

y(n) = x(1)h(n-1)+x(2)h(n-2)+x(3)h(n-3)+…..+x(m)h(n-m)

 

where y(n) is the nth sample output

x(1), x(2), x(3), etc. are input samples of x(f) (a function

of time) at equal intervals, and h(n-1), hi(n-2), etc. are called weights whose values are adjusted based on the type of processing.

The value of m depends on the system. Observe that we need to multiply and add. A unit called Multiply Accumulate Unit (MAC) is thus an Output analog signal integral part of DSPs.

The arithmetic is to be done while the input data is streaming in and no input sample should be missed.

Thus DSPs have fast arithmetic unit with two ports.

One port continuously reads while the other port simultaneously outputs the processed stream of bits. DSPS normally have two different memories on chip-one for data and the other for program.

To summarize the most important units of a DSP are:

=> An A/D converter

=>A D/A converter

=> A Multiply Accumulate Unit

=>A fast ALU which handles real-time arithmetic

=>An on-chip data memory

=>An on-chip program memory



No comments:

Post a Comment