2 memory-and-io-devices

51
06/21/22 1 MEMORY

Transcript of 2 memory-and-io-devices

Page 1: 2 memory-and-io-devices

05/02/231

MEMORY

Page 2: 2 memory-and-io-devices

Memory The memory unit is an essential component in any digital computer

since it is needed for storing programs and data Not all accumulated information is needed by the CPU at the same time Therefore, it is more economical to use low-cost storage devices to

serve as a backup for storing the information that is not currently used by CPU

The memory unit that directly communicate with CPU is called the main memory or Primary Memory

Devices that provide backup storage are called auxiliary memory or Secondary Memory

The memory hierarchy system consists of all storage devices employed in a computer system from the slow by high-capacity auxiliary memory to a relatively faster main memory, to an even smaller and faster cache memory

Page 3: 2 memory-and-io-devices

An Example Memory Hierarchy

05/02/233

registers

on-chip L1cache (SRAM)

main memory(DRAM)

local secondary storage(local disks)

Larger, slower,

and cheaper (per byte)storagedevices

remote secondary storage(tapes, distributed file systems, Web servers)

Local disks hold files retrieved from disks on remote network servers.

Main memory holds disk blocks retrieved from local

disks.

off-chip L2cache (SRAM)

L1 cache holds cache lines retrieved from the L2 cache

memory.

CPU registers hold words retrieved from L1 cache.

L2 cache holds cache lines retrieved from main memory.

L0:

L1:

L2:

L3:

L4:

L5:

Smaller,faster,and

costlier(per byte)storage devices

Page 4: 2 memory-and-io-devices

Memory The main memory occupies a central position by being

able to communicate directly with the CPU and with auxiliary memory devices through an I/O processor

A special very-high-speed memory called cache is used to increase the speed of processing by making current programs and data available to the CPU at a rapid rate

Page 5: 2 memory-and-io-devices

Memory HierarchyCPU logic is usually faster than main memory

access time, due to this reason processing speed of CPU is limited primarily by the speed of main memory

The cache is used for storing segments of programs currently being executed in the CPU and temporary data frequently needed in the present calculations

The typical access time ratio between cache and main memory is about 1 to 7~10

Auxiliary memory access time is usually 1000 times greater than that of main memory

Page 6: 2 memory-and-io-devices

Main MemoryMost of the main memory in a general

purpose computer is made up of RAM integrated circuits chips, but a portion of the memory may be constructed with ROM chips

RAM– Random Access memoryStatic and Dynamic

ROM– Read Only memory

Page 7: 2 memory-and-io-devices

Types of RAM Static RAM (SRAM)

Each cell stores bit with a six-transistor circuit.Bit is stored in the form of voltageRetains value indefinitely, as long as it is kept powered.Relatively insensitive to disturbances such as electrical

noise.Faster (8-16 times faster) and more expensive (8-16 times

more expensice as well) than DRAM.Access time around 10 nanosecondsUsed for cache memory

Dynamic RAM (DRAM)Each cell stores bit with a capacitor and transistor.Bit is stored in the form of chargeValue must be refreshed every 10-100 ms.Sensitive to disturbances.Slower and cheaper than SRAM.Almost all computer has DRAMAccess time 60 – 70 nanoseconds

Note: a nanosecond is one billionth of a second!

Page 8: 2 memory-and-io-devices

Types of RAM

Synchronous Dynamic Random Access Memory (SDRAM)

• Quicker than DRAM

• Access time less than 60 nanoseconds Direct Rambus Dynamic Random Access Memory (DRDRAM)

• New type of RAM architecture

• Access time 20 times faster than DRAM

• More expensive

Cache memory

• Small amount of memory typically 256 or 512 kilobytes

• Temporary store for often used instructions

• Level 1 cache is built within the CPU (internal)

• Level 2 cache may be on chip or nearby (external)

• Faster for CPU to access than main memory

05/02/238

Page 9: 2 memory-and-io-devices

Types of RAM Video Random Access memory

• Holds data to be displayed on computer screen

• Has two data paths allowing READ and WRITE to occur at the same time

• A system’s amount of VRAM relates to the number of colours and resolution

• A graphics card may have its own VRAM chip on board

Virtual memory

• Uses backing storage e.g. hard disk as a temporary location for programs and data where insufficient RAM available

• Swaps programs and data between the hard-disk and RAM as the CPU requires them for processing

• A cheap method of running large or many programs on a computer system

• Cost is speed: the CPU can access RAM in nanoseconds but hard-disk in milliseconds (Note: a millisecond is a thousandth of a second)

• Virtual memory is much slower than RAM05/02/239

Page 10: 2 memory-and-io-devices

Static RAM Cell

Page 11: 2 memory-and-io-devices

ROMROM is used for storing programs that are

PERMANENTLY resident in the computer and for tables of constants that do not change in value once the production of the computer is completed

The ROM portion of main memory is needed for storing an initial program called bootstrap loader, witch is to start the computer software operating when power is turned off

ROM stores Bit in the form of Diode. Access time of between 10 and 50 nanoseconds

Page 12: 2 memory-and-io-devices

Types of ROM

05/02/2312

1. PROM – Programmable ROM – a type of memory whose contents can be programmed by the user• OTP – One Time Programmable, a PROM is OTP if contents can be

programmed only once. • Has polysilicon wires, arranged in matrix, works as diode or fuses.• Burning the fuses to program the ROM called “Burning the PROM”2. EPROM –Erasable PROM-Can be programmed, erased and

reprogrammed• The EPROM chip has a small window on top allowing it to be erased by shining

ultra-violet light on it• After reprogramming the window is covered to prevent new contents being

erased• Access time is around 45 – 90 nanoseconds

Fig: EPROM with small window

Page 13: 2 memory-and-io-devices

Types of ROM3. Electrically Erasable Programmable Read Only Memory (EEPROM)

• Reprogrammed electrically without using ultraviolet light

• Must be removed from the computer and placed in a special machine to do this

• Access times between 45 and 200 nanoseconds

4. Flash ROM

• Similar to EEPROM

• However, can be reprogrammed while still in the computer

• Easier to upgrade programs stored in Flash ROM

• Used to store programs in devices e.g. modems

• Access time is around 45 – 90 nanoseconds5. ROM cartridges

• Commonly used in games machines

• Prevents software from being easily copied

05/02/2313

Fig: Flash Memory

Page 14: 2 memory-and-io-devices

Secondary memory-Hard Disk Geometry

Disks consist of platters, each with two surfaces Each surface consists of concentric rings called tracks Each track consists of sectors separated by gaps

spindle

surfacetracks

track k

sectors

gaps

Page 15: 2 memory-and-io-devices

Disk Geometry(Muliple-Platter View)

Aligned tracks form a cylinder

surface 0surface 1surface 2surface 3surface 4surface 5

cylinder k

spindle

platter 0

platter 1

platter 2

Each Platter has two read write Head

Page 16: 2 memory-and-io-devices

Disk Operation (Single-Platter View) The disk

surface spins at a fixedrotational rate

spindle

By moving radially, arm can position read/write head over any track

Read/write headis attached to endof the arm and flies overdisk surface onthin cushion of air

spindle

Page 17: 2 memory-and-io-devices

Hard Disk Drive

1/4/201417

Page 18: 2 memory-and-io-devices

I/O Devices

Page 19: 2 memory-and-io-devices

• A standard computer keyboard has about 100 keys.

• Most keyboards use the QWERTY layout, named for the first six keys in the top row of letters.

The Keyboard - Standard Keyboard Layout

Most keyboards have keys arranged in five groups:1.Alphanumeric keys2. Numeric keypad3. Function keys4.Modifier keys5.Cursor-movement keys

Page 20: 2 memory-and-io-devices

ACADEMIC RECORDSPassword

ENTER Invalid Password* * * * *

Page 21: 2 memory-and-io-devices

• The keyboard controller detects the keystroke.

• The controller places a scan code in the keyboard buffer, indicating which key was pressed.

• The keyboard sends the computer an interrupt request, telling the CPU to accept the keystroke.

When you press a key:

The Keyboard - How a Keyboard Works

Page 22: 2 memory-and-io-devices

The Keyboard - How a Keyboard Works

Page 23: 2 memory-and-io-devices

The Mouse - What is a Mouse?

• The mouse is a pointing device. You use it to move a graphical pointer on the screen.

• The mouse can be used to issue commands, draw, and perform other types of input tasks.

1. Pointing; Move the mouse to move the on-screen pointer.2. Clicking; Press and release the left mouse button

once.3. Double-clicking; Press and release the left mouse

button twice.4. Dragging; Hold down the left mouse button as you

move the pointer.5. Right-clicking; Press and release the right mouse button.

Mouse Techniques:Using the mouse involves five techniques:

Page 24: 2 memory-and-io-devices

Variants of the Mouse

• Trackballs

• Trackpads

• Integrated Pointed Devices

Page 25: 2 memory-and-io-devices

Variants of the Mouse - Trackballs

• A trackball is like a mouse turned upside-down.

• Use your thumb to move the exposed ball and your fingers to press the buttons.

Many styles of trackball are available.

Page 26: 2 memory-and-io-devices

Variants of the Mouse - Trackpads

• A trackpad is a touch-sensitive pad that provides the same functionality as a mouse.

• To use a trackpad, you glide your finger across its surface.

• Trackpads provide a set of buttons that function like mouse buttons.

Page 27: 2 memory-and-io-devices

Trackpad

Page 28: 2 memory-and-io-devices

Variants of the Mouse-Integrated Pointing Devices

• An integrated pointing device is a small joystick built into the keyboard.

• To use an integrated pointing device, you move the joystick.

• These devices provide a set of buttons that function like mouse buttons

Page 29: 2 memory-and-io-devices

Devices for the HandPen based input

Tablet PCs, PDAPen used to

write dataPen used as

a pointerHandwriting recognition

Page 30: 2 memory-and-io-devices

Devices for the hand

3B-30

Touch screensSensors determine

where finger pointsSensors create an

X,Y coordinateUsually presents a

menu to usersFound in cramped

or dirty environments

Page 31: 2 memory-and-io-devices

Devices for the handGame controllers

Enhances gaming experienceProvide custom input to the gameJoystickGame pad

Page 32: 2 memory-and-io-devices

Optical Input DevicesAllows the computer to see inputBar code readers

Converts bar codes to numbersComputer find number in a databaseWorks by reflecting light

Amount of reflected light indicates number

Page 33: 2 memory-and-io-devices

Optical Input DevicesImage scanners

Converts printed media into electronicReflects light off of the imageSensors read the intensityFilters determine color depths

Page 34: 2 memory-and-io-devices

Optical input devicesOptical character recognition (OCR)

Converts scanned text into editable textEach letter is scannedLetters are compared to known lettersBest match is entered into documentRarely 100% accurate

Page 35: 2 memory-and-io-devices

Audiovisual Input DevicesMicrophones

Used to record speechSpeech recognition

“Understands” human speechAllows dictation or control of computerMatches spoken sound to known phonemesEnters best match into document

Page 36: 2 memory-and-io-devices

Audiovisual Input DevicesDigital cameras

Captures images electronicallyNo film is neededImage is stored as a JPG fileMemory cards store the imagesUsed in a variety of professions

Page 37: 2 memory-and-io-devices

• Categories of Monitors

• CRT Monitors

• Flat-Panel Monitors

• Comparing Monitors

• Video Controllers

Page 38: 2 memory-and-io-devices

Monitors - Categories of Monitors

Monitors are categorized by the technology they use:

• Cathode ray tube (CRT) monitors• Flat-panel displays• LCD• LED• Plasma

And by the way they display colors:

• Monochrome – One color on a black background

• Grayscale – Shades of gray on a white or off-white background

• Color – From 16 to 16 million unique colors

Page 39: 2 memory-and-io-devices

Monitors - CRT Monitors

• In CRT monitors, electrons are fired at phosphor dots on the screen.

• The dots are grouped into pixels, which glow when struck by electrons.

• In color CRTs, each pixel contains a red, green, and blue dot. These glow at varying intensities to produce color images.

Page 40: 2 memory-and-io-devices
Page 41: 2 memory-and-io-devices

Monitors - Flat-Panel Monitors

• Most flat-panel monitors use liquid crystal display (LCD) technology.

• TFT(Thin-film transistor )displays use multiple transistors for each pixel.

• Flat-panel monitors take up less desk space.

Page 42: 2 memory-and-io-devices

Monitors - Comparing Monitors

When comparing monitors, consider four features:• Size

• Resolution

• Refresh rate

• Dot pitch

Page 43: 2 memory-and-io-devices

Comparing Monitors - Size

• A monitor's size is the diagonal measurement of its face, in inches.

• Early days, 15" monitors (13"viewing area) were standard.

• Today, 17" monitors (15" viewing area) are common.

• Larger monitors are available, but can be expensive.

Page 44: 2 memory-and-io-devices

The diagonalsize (often 15”)

Page 45: 2 memory-and-io-devices

Comparing Monitors - Resolution

• Resolution is the number of pixels on the screen, expressed as a matrix (such as 600x800).

• A 17" monitor offers resolutions from 640x480 up to 1280x1024.

• The Video Graphics Array (VGA) standard is 640x480. Super VGA (SVGA) monitors provide resolutions of 800x600, 1024x768 or higher.

Page 46: 2 memory-and-io-devices

Comparing Monitors - Refresh Rate

• Refresh rate is the number of times each second that the electron guns scan the screen's pixels.

• Refresh rate is measured in Hertz (Hz), or cycles per second.

• Look for a refresh rate of 72 Hz or higher. A slower rate may cause eyestrain.

Page 47: 2 memory-and-io-devices

Fast scanning = Quick refresh (less flicker)

Page 48: 2 memory-and-io-devices

Comparing Monitors - Dot Pitch

• Dot pitch is the distance between the phosphor dots that make up a single pixel.

• In color monitors, three dots (red, green, and blue) comprise each pixel.

• Look for a dot pitch no greater than 0.28 millimeter.

Fine dot pitch = Crisp displays

Page 49: 2 memory-and-io-devices

R + BB + G

R + GR + B + G

Phosphor Dot Color Mixing

Page 50: 2 memory-and-io-devices

PC Projectors

• A PC projector connects to a PC and is used to project images on a large screen.

• Many PC projectors provide the same resolutions and color levels as high-quality monitors.

Printer•Dot Matrix•Ink jet•Laser

Page 51: 2 memory-and-io-devices

05/02/2351