0% found this document useful (0 votes)
33 views23 pages

Conspect of Lecture 8

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views23 pages

Conspect of Lecture 8

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 23

Lecture № 8

External Memory.
The goal of the lecture: analyze and study types of external memory, data organization and formatting, RAID (Six levels of
RAID), Optical memory.

Contents

1. Types of external memory. Data organization and formatting.


2. RAID (Six levels of RAID).
3. Optical memory.
4. External semiconductor memory.

Literature.
1.http://home.ustc.edu.cn/~leedsong/reference_books_tools/Computer%20Organization%20and%20Architecture
%2010th%20-%20William%20Stallings.pdf.
2. Pustovarov V. I. Assembler. Programming and analysis of machinery programs correctness, - Kiev: “Irina”, 2010. -
476
3. Э. Таненбаум. Т. Остин. Архитектура компьютера. 6-е изд. Издательство: Питер, 2016. — 816 стр.
Keywords.
External memory, magnetic disk, track, combined read-write mechanism, SSD, tunnel effect, optical disk, RAID.

External memory (secondary storage) differs from internal one(primary storage) in that it is not directly accessible by the
CPU. The computer usually uses its input/output channels to access secondary storage and transfer the desired data to primary
storage. Secondary storage is non-volatile (retaining data when its power is shut off). Modern computer systems typically
have two orders of capacity more secondary storage than primary storage because secondary storage is less expensive.
In modern computers, hard disk drives (HDDs) or solid-state drives (SSDs) are usually used as secondary storage. The access
time per byte for HDDs or SSDs is typically measured in milliseconds (one thousandth seconds), while the access time per
byte for primary storage is measured in nanoseconds (one billionth seconds). Thus, secondary storage is significantly slower
than primary storage.
Types of External memory.
There are 10 digital Data Storage Devices for Computers:
1. Hard Drive Disks
2. Floppy Disks
3. Tapes
4. Compact Discs (CDs)
5. DVD and Blu-ray Discs
6. USB Flash Drives
7. Secure Digital Cards (SD Card)s
8. Solid-State Drives (SSDs)
9. Cloud Storage
10. Punch Cards

1.Hard Disk Drives


A hard disk drive (also known as a hard drive, HD, or HDD) can be found installed in almost every desktop and laptop computer. It
stores files for the operating system and software programs as well as user documents, such as photographs, text files, videos, and
audio. The hard drive uses magnetic storage to record and retrieve digital information to and from one or more fast-spinning disks
2. Floppy Disks
Also know as a diskette, floppy, or FD, the floppy disk is another type of storage medium that uses magnetic storage technology to
store information. Floppy disks were once a common storage device for computers and were very common from the mid-1970s
through to the start of the 21st century. The earliest floppies were 8 inches (203 mm) in size, but these were replaced first by 5.25-
inch (133 mm) disk drives and finally by 3.5-inch (90 mm) versions.
3. Tapes
In the past, magnetic tape was often used for digital data storage because of its low cost and ability to store large amounts of data.
The technology essentially consisted of a thin, magnetically coated piece of plastic wrapped around wheels. Its relative slowness and
unreliability compared to other data storage solutions have resulted in it now being largely abandoned as a storage medium.
4.Compact Discs (CDs)
The compact disk, (or CD for short) is a form of optical storage, a technology that employs lasers and lights to read and write data.
Initially, compact discs were used purely for music, but in the late 1980s, they began to be used for computer data storage. Initially,
the compact discs that were introduced were CD-ROMs (read-only), but these were followed by CD-Rs (writable compact discs) and
CD-RWs (rewritable compact discs).
5. DVD and Blu-ray Discs
The DVD (digital versatile disk) and Blu-ray disk (BD) are formats of digital optical disk data storage which have superseded compact
discs, mainly because of their much greater storage capacity. A Blu-ray disk, for example, can store 25 GB (gigabytes) of data on a
single-layer disk and 50 GB on a dual-layer disk. In comparison, a standard CD is the same physical size, but only holds 700 MB
(megabytes) of digital data.
6. USB Flash Drives
Also known as a thumb drive, pen drive, flash drive, memory stick, jump drive, and USB stick, the USB flash drive is a flash-memory
data-storage device that incorporates an integrated USB interface. Flash memory is generally more efficient and reliable than optical
media, being smaller, faster, and possessing much greater storage capacity. Flash drives are also more durable due to a lack of
moving parts.
7. Secure Digital Cards (SD Cards)
SD cards are commonly used in multiple electronic devices, including digital cameras and mobile phones. Although there are
different sizes, classes, and capacities available, they all use a rectangular design with one side "chipped off" to prevent the card
from being inserted into a camera or computer the wrong way.
8. Solid-State Drives (SSDs)
A solid-state drive uses flash memory to store data and is sometimes used in devices such as netbooks, laptops, and desktop
computers instead of a traditional hard disk drive. The advantages of an SSD over an HDD include a faster read/write speed,
noiseless operation, greater reliability, and lower power consumption. The biggest downside is cost, with an SSD offering lower
capacity than an equivalently priced HDD.
9. Cloud Storage
With users increasingly operating multiple devices in multiple places, many are adopting online cloud-computing solutions. Cloud
computing basically involves accessing services over a network via a collection of remote servers. Although the idea of a "cloud of
computers" may sound rather abstract to those unfamiliar with this metaphorical concept, in practice, it can provide powerful storage
solutions for devices that are connected to the internet.
10. Punch Cards
Punch cards (or punched cards) were a common method of data storage used with early computers. Basically, they consisted of a
paper card with punched or perforated holes created by hand or machine. The cards were entered into computers to enable the
storage and accessing of information. This data-storage medium pretty much disappeared as new and better technologies were
developed.

Data Organization and Formatting on HDD.

 Concentric rings or tracks (between 500 and 2000 tracks on one side)
 Tracks divided into sectors (data are read by blocks = sectors; there can be between 10 and 100 sectors)
 Adjacent tracks are separated by gaps. This prevents errors due to misalignment (несоосность) of the head (conducting
coil).
 To simplify the electronics, the same number of bits are typically stored on each track.
Figure 1. Disk Data Layout.
Figure 2. Addressing a specific location on a disk track.

Winchester Disk Track Format.https://www.slideshare.net/muhammadzawawi1/csc1401-


lecture07-external-memory
Figure 3. Winchester Disk Track Format.
Data are transferred to and from the disk in blocks, accordingly data are stored in block-size regions known as sectors. To avoid imposing unreasonable
precision requirements the adjacent sectors are separated by intra-track(record) gaps.
In order to identify positions within a track there are must be starting points on the tracks and ways for identification the start and the end of each sector.
These requirements are handled by means of control data recorded on the disk. Thus, the disk is formatted with some extra data used only by the disk driver,
and they are not accessible to the user.

In Fig. 3 Winchester Disk Track Format each track contains 30 fixed-length sectors of 600 bytes each. Every sector holds 512 bytes data, plus control
information useful to the disk controller.
The ID field is a unique identifier or address used to locate a particular sector.
The SYNCH byte is special bit pattern that determines the beginning of the field.
The track number identifies a head, since this disk has multiple surfaces.
The ID and data fields contain an error-detecting code (CRC).
Figure 4. Combined Read-Write mechanism.
Characteristics of Disk Systems

Characteristic Set of
Parameters/Possible
meanings
Head Motion Fixed head (one per track)
Movable head (one per
surface)
Disk Portability Non-removable disk
Removable disk
Sides Single-sided
Double-sided
Platters Single-platter
Multiple-platter
Head Mechanism Contact (floppy)
Fixed gap
Aerodynamic gap
(Winchester)
Disk Access Time

Disk Access Time is the main Characteristic of Disk Performance.

If removable heads are used and disk drive is operating, then to read/write, the head must be positioned at the desired track
and at the beginning of the desired sector on that track. The time it takes to position the head at the track is known as seek
time. In either case, once the track is selected, the system waits until the appropriate sector rotates to line up with the head.
The time it takes for the sector to reach the head is known as rotational latency.

Disk Access Time is equal to the sum of Seek time


Rotational Latency time and Transfer time
RAID (Six[seven] levels of RAID).
With the use of multiple disks, there is a wide variety of ways in which the data can be organised and in which redundancy
can be added to improve reliability. Industry has agreed on a standardised scheme for multiple-disk database design,
known as RAID (Redundant Array of Independent Disks)
The RAID scheme consists of six levels. These levels do not imply a hierarchical relationship but designate different
design architectures that share three common characteristics:
 RAID is a set of physical disk drives (набор приводов магнитных дисков) viewed by operating system as a single
logical drive.
 Data is distributed across the physical drives of an array.

 Redundant disk capacity is used to store parity information (контрольная информация), which guarantees data
recoverability in case of a disk failure.
RAID systems of different levels differ by methods of realisation the second and the third characteristics.
Logical Physical Physical Physical Physical
Disk Disk 0 Disk 1 Disk 2 Disk 3

Strip 1 Strip 2 Strip 3


Strip 0 Strip 0

0
Strip 1
0
Strip 4
1 Strip 5
2
Strip 6
3
Strip 7

1
Strip 2
4
Strip 8
5 Strip 9
6
Strip 10
7
Strip 11

2
Strip 3
8
Strip 12
9 Strip 13
1
Strip 14
1
Strip 15

3
1
Strip 4
1 1 1 1
4
Strip 5
0 1
5
3
Strip 6
2Management3Array 4 5
6
Strip 7

7
Strip 8 Software

8
6
Strip 9

9
Strip 10

1
8
Strip 11

1
Strip 12

1
0
8
Strip 13

1
Strip 14

1
2
Strip 15

1
3
4
5 Figure 5. RAID organization.
RAI D, Level 0
 No redundancy (is not a true member of the RAID family)
 Data is striped across all disks
 Round Robin stripe organization (циклическая ленточная организация)
 All the user and system data is viewed as being stored on a logical disk; the disk is divided into
strips, these strips may be physical blocks, sectors or some other units. The strips are mapped
round—robin to consecutive array members. A set of logically consecutive strips that maps exactly
one strip to each array member is referred to as a stripe. In an n-disk array the first n logical
strips are physically stored as the first strip on each of the n disks, the second n strips are
distributed as the second strips on each physical disk, and so on.

Data Mapping for a RAI D Level 0 Array

Strip Strip Strip Strip

3
Strip
3
Strip
3
Strip
3
Strip

7
Strip
7
Strip
7
Strip
7
Strip

1
Strip
1
Strip
1
Strip
1
Strip

1 1 1 1
1 1 1 1
RAI D 1
Mirrored

Mirrored Disks
 Data is striped across disks
 2 copies of each stripe on separate disks
 Read from either
 Write to both
 Recovery is simple
 Swap faulty disk & re-mirror
 No down time
Strip 0Expensive
Strip 1 Strip 2 Strip 3 Strip 0 Strip 1 Strip 2 Strip 3

3
Strip 4
3Strip 5
3
Strip 6
3
Strip 7
3
Strip 4
3
Strip 5
3
Strip 6
3
Strip 7

7
Strip 8
7Strip 9
7
Strip 10
7
Strip 11
7
Strip 8
7
Strip 9
7
Strip 10
7
Strip 11

1
Strip 12
1
Strip 13
1
Strip 14
1
Strip 15
1
Strip 12
1
Strip 13
1
Strip 14
1
Strip 15

1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
RAI D 2
Redundancy Through Hamming Code
 Disks are synchronized
 Very small stripes
 Error correction calculated across corresponding bits on disks
 Multiple parity disks store Hamming code error correction in corresponding positions.
 Lots of redundancy
 Expensive
 Not used

b0 b1 b2 b3 f0(b) f1(b) f2(b)


RAI D 3
Bit-I nterleaved Parity RAI D 4
 Similar to RAID 2 Block-Level Parity
 Only one redundant disk, no matter how large the array
 Simple parity bit for each set of corresponding bits
 Data on failed drive can be reconstructed from surviving data and parity info  Each disk operates independently
 Very high transfer rates
 Good for high I/O request rate
 Large stripes
 Bit by bit parity calculated across stripes on each disk
 Parity stored on each disk
Strip 0 Strip 1 Strip 2 Strip 3 P(0-3)
b0 b1 b2 b3 P(b)
3
Strip 4
3Strip 5
3Strip 6
3 Strip 7 P(4-7)

7
Strip 8
7Strip 9
7
Strip 10
7
Strip 11 P(8-11)

1
Strip 12
1
Strip 13
1
Strip 14
1
Strip 15 P(12-15)

1 1 1 1
RAI D 5
Block-Level Distributed Parity
 Like RAID 4 RAI D 6
 Parity striped across all disks Redundancy Through 2 Different Codes
 Round robin allocation for parity stripe  The scheme of functioning suggests calculation of 2 control codes stored in different
 Avoid RAID 4 botl-neck at parity disk blocks distributed through all disks.
 Commonly used in network servers  Control codes P and Q are calculated by different algorithms, it allows to restore lost
data when even two disks have been failed.
 The hardware is more complicated.
Strip 0 Strip 1 Strip 2 Strip 3 P(0-3)

3 3 3 3
Strip 0 Strip 1 Strip 2 Strip 3 P(0-3) Q(0-3)
Strip 4 Strip 5 Strip 6 P(4-7) Strip 7

7 7 7 7 3 3 3 3
Strip 8 Strip 9 P(8-11) Strip 10 Strip 11 Strip 4 Strip 5 Strip 6 P(4-7) Q(4-7) Strip 5

1 1 1 1 7 7 7 7
Strip 12 P(12-15) Strip 13 Strip 14 Strip 15 Strip 8 Strip 9 P(8-11) Q(8-11) Strip 8 Strip 9

1 1 1 1 1 1 1 1
P(16-19) Strip 16 Strip 17 Strip 18 Strip 19 Strip 12 P(12-15) Q(12-15) Strip 15 Strip 12 Strip 13

1 1 1 1 1 1 1 1
5 5 5 5 1 1 1 1
Optical Memory
Optical Disk Products:
 CD
A nonerasable disk that stores digital audio information. The standard system uses 12-cm disks and can record more than 60
minutes of uninterrupted playing time.
CD-ROM
A nonerasable disk used for storing computer data. The standard system uses 12-cm disks and can hold more than 550
Mbytes.
DVD
Digital video disk. The technology of video-signals recording and other data of a large volume is used and it’s based on
methods of information (data) compression.
WORM
Write-Once Read Many is more easily written than CD-ROM, making single-copy disks commercially feasible; holds
from 200 to 800 Mbytes of data.
Erasable Optical Disk
A disk that uses optical technology but that can be easily erased and rewritten. A typical capacity is 650 Mbytes.
Blu-ray Discs
A Blu-ray disk can store 25 GB (gigabytes) of data on a single-layer disk and 50 GB on a dual-layer disk.
Both the audio and the CD-ROM share similar technology. The main difference is in the formats of data
presentation.
Optical Storage CD-ROM
 Originally for audio
 650 (775) Mbytes giving over 70(73.2) minutes audio
 Poly-carbonate coated with highly reflective coat (aluminum)
 Data stored as pits
 Reads by reflecting laser
 Constant packing density
 Constant linear velocity (1.2 m/s)

Other Optical Storage


 CD-Writable
 WORM
 Now affordable
 Compatible with CD—ROM drives
 CD-RW
 Erasable
 Getting cheaper
 Mostly CD-ROM drive compatible
DVD Storage
 Digital Video Disk
 Used to indicate a player for movies
 Only plays video disks
 Digital Versatile Disk
 Used to indicate a computer drive
 Will read computer disks and play video disks.
Blu-ray, optical disk
Blu-ray, optical disk data-storage format
that is most often used for playback
of high-definition (HD) video. Blu-ray represents
the third generation of compact disk (CD) technology,
after audio CDs and digital video disks (DVDs).

CD-ROM block Format


Layered
00 FF x 10 00 Min Sec Sector Mode
Data ECC

12 bytes 4 bytes 2046 bytes 288 bytes


Sync Id

2352 bytes
 Mode 0 = blank data field
 Mode 1 = 2048 bytes data+ error correction
 Mode 2 = 2336 bytes data

CD-ROM block Format consists of the following fields:


1. Sync: identifies the beginning of a block;
2. Header: contains the block address and the mode byte;
3. Data: User’s data;
4. Auxiliary: additional user’s data in mode 2. In mode 1,
this is 288-bytes error-correcting code.

Flash Memory Operation.


Another form of semiconductor memory is flash memory. Flash memory is used
both for internal memory and external memory applications.Flash memory gets its
name because the microchip is organized so that a section of memory cells is
erased in a single action or “flash.” However, flash memory does not provide byte
level erasure. Figure 5 illustrates the basic operation of a flash memory. For
comparison, Figure 5.a depicts the operation of a transistor. Transistors exploit the
properties of semiconductors so that a small voltage applied to the gate can be used
to control the flow of a large current between the source and the drain.

A normal transistor (MOSFET) uses a gate electrode to open or close the


connection between two other electrodes, called the source and drain, allowing the
device to function as an on/off switch.

When charge is placed on the gate electrode, the semiconducting purple region
becomes conductive, and the source and drain are connected. When charge is
removed from the gate electrode, the purple region becomes insulating, and the
source and drain are disconnected. Note that when the power to a MOSFET is
turned off, charge drains from the gate through the circuit it's connected to, and it
reverts to being "off" (non-conducting).

A floating gate transistor has an additional electrode between the gate and the
semiconductor. Unlike the other electrodes, however, the floating gate is not
connected to anything (hence the name 'floating').
Figure 5. Flash memory operation.

Figure 5a. Flash memory vs. usual transistor.


At the moment, there are a couple of types of microcircuits that are most common:
NOR and NAND. In both, the storage transistors are connected to the bit lines - in
parallel and in series, respectively. In the first type, the cell sizes are quite large,
and there is an opportunity for fast random access, which allows you to execute
programs directly from memory. The second is characterized by smaller cell sizes,
as well as fast sequential access, which is much more convenient when it is
necessary to build block-type devices where large information will be stored.
To read NAND flash, every transistor is switched on in the cell except the one
being read. Because it's wired like a NAND gate, where if every signal is AND'ed
you get a low, if you see a low on the bit line then you know the memory cell was
set.
NAND flash has groups of flash transistors in series, like a NAND gate. This saves
some die area since you can connect them source -> drain without needing contacts
or metal. NOR flash has the flash transistors in parallel.

SSDs are based on flash memory technologies that enables data to be written, read,
and erased multiple times. Flash memory comes in two varieties: NOR and
NAND. Although each offers advantages and disadvantages, NAND has emerged
as the favored technology because it delivers faster erase and write times. Most
contemporary SSDs are based on NAND flash. An enterprise SSD contains
multiple NAND flash chips for storing data. Each chip contains one or more dies,
and each die contains one or more planes. A plane is divided into blocks, and a
block is divided into pages.Of these, the blocks and pages are the greatest concern,
not because you configure or manipulate them directly, but because of how data is
written, read, and erased on a NAND chip. Data is read and written at the page
level, but erased at the block level, as illustrated in Figure 6.

Figure 6. NAND flash memory organization in SSD.

Reading and Writing Data

https://www.red-gate.com/simple-talk/sql/database-administration/
storage-101-understanding-the-nand-flash-solid-state-drive/
SSD Read and Write operation.
Reading and writing data occur at the page level. Reading data is a fairly
straightforward operation. When the drive receives a request for data, the controller
locates the correct cells, determines the charge states, and ensures that the data is
properly returned, using buffer memory as necessary. The entire process has little
long-term impact on the drive itself.

Writing data is a programming operation that sets the data bits to the desired
charge state, a process orchestrated by the controller. – Writing data to a page for
the first time is nearly as straightforward as reading data. The process grows more
complex when modifying that data, which requires that it first be erased and then
rewritten, a process commonly referred to as a program/erase cycle (P/E cycle).

Figure 7. SSD Write operation.

During a typical P/E cycle, the entire block containing the targeted pages is written
to memory. The block is then marked for deletion and the updated data rewritten to
another block. The actual erase operation occurs asynchronously in order to
optimize performance.

The controller coordinates the erase and write processes, using advanced data
management algorithms. Even if only a single change on a single page needs to be
recorded, an entire P/E cycle is launched. The block is marked for deletion and all
its data rewritten.

The controller erases the block when it’s needed or as part of an optimization
process. When erasing the block, the controller sets every bit in every cell to 1.
After that, data can be written to any page in the block. However, if any bits in a
page are set to 0-even if only one-the entire page is off-limits to writing data.

As an SSD starts filling up, the writing and rewriting operations become more
complex and start to slow down. The controller must find places to store the data,
which can involve erasing blocks marked for deletion, moving and consolidating
data, or performing multiple P/E cycles. The fuller the drive, the more extensive
these operations, which is why performance can start to degrade as a drive reaches
capacity.

Because of the many P/E cycles, more data is routinely written to the drive than the
amount being modified, a characteristic commonly called write amplification. For
example, updating a simple 25-KB text file might result in 250 KB of data being
written, causing additional wear on the cells.

A flash SSD can support only a limited number of P/E cycles before it fails. The
more bits squeezed into each cell, the fewer that number and the faster the time to
failure. For example, an MLC drive might support up to 6,000 P/E cycles per
block, but a TLC drive might max out at 3,000.

As P/E cycles start adding up, cells start failing. For this reason, SSDs employ
several strategies to extend a drive’s lifespan, assure reliability, and maintain data
integrity, including:

 Wear leveling: A controller-based operation for distributing P/E cycles


evenly across the NAND chips to prevent any cells from premature failure.
 TRIM command: An operating system command for consolidating a
drive’s free space and erasing blocks marked for deletion, which can
improve performance and minimize write application.
 Over-provisioning: Extra drive space reserved for management processes
such as wear leveling and for reducing the extra write amplification that
occurs when a drive gets too full.
 Caching: A process of storing data in memory to boost performance and,
when used effectively, minimize P/E cycles.
 Error-correction code (ECC): A process for checking data for errors and
then, if necessary, correcting those errors.

An SSD might also incorporate strategies for improving performance. For


example, flash drives implement garbage collection, a background process for
moving, consolidating, and erasing data. There’s some debate about whether
garbage collection adds write amplification or reduces it. It depends on how the
garbage collection operations are implemented and the quality of the algorithms
used to carry out these operations.

SSD firmware updates might also address performance, reliability, and integrity
issues, along with other types of issues. Whenever you install a new SSD, one of
the first steps you should take is to ensure that you’re running the latest firmware.
These are not necessarily the only tactics that a drive will employ, but they
represent some of the most common.

Problems.
1. Why RAID 0 cannot be considered as a true member of RAID family? Compare RAID 5 and
RAID 6 (illustrate the answer by pictures).
2. List the well-known Optical Disk products and describe their characteristics.
3. Give an example of CD-ROM block formats.
4. List the major characteristics of Disk System.
5. How is evaluated the Disk Access Time? What does the Disk Access Time characterize?
What is RAID? List three common characteristics of RAID.
6. Describe the typical Disk data layout (draw a picture).
7. How are sector positions within a track identified? Give an example of disk track format
(describe the meaning of each field).
8. What is tunnel effect?
9. Describe SSD read and write operations.

You might also like