EXTERNAL MEMORY (Part 1)

Similar documents
External Memory. Types of External Memory. Magnetic Disk. Optical. Magnetic Tape. RAID Removable. CD-ROM CD-Recordable (CD-R) CD-R/W DVD

Chapter 6 External Memory

CO212 Lecture 6: Memory Organization III

Magnetic Disk. Optical. Magnetic Tape. RAID Removable. CD-ROM CD-Recordable (CD-R) CD-R/W DVD

William Stallings Computer Organization and Architecture 6 th Edition. Chapter 6 External Memory

Computer Organization and Technology External Memory

William Stallings Computer Organization and Architecture 8 th Edition. Chapter 6 External Memory

Chapter 6 - External Memory

External Memory. Computer Architecture. Magnetic Disk. Outline. Data Organization and Formatting. Write and Read Mechanisms

Principles of Operating Systems CS 446/646

A track on a magnetic disk is a concentric rings where data is stored.

Semiconductor Memory Types Microprocessor Design & Organisation HCA2102

Semiconductor Memory Types. Computer & Microprocessor Architecture HCA103. Memory Cell Operation. Semiconductor Memory.

Computer System Architecture

Chapter 11. I/O Management and Disk Scheduling

SEN361 Computer Organization. Prof. Dr. Hasan Hüseyin BALIK (6 th Week)

Module 13: Secondary-Storage

Chapter 14: Mass-Storage Systems

Mass-Storage Structure

Overview of Mass Storage Structure

Memory and Disk Systems

UNIT 2 Data Center Environment

Chapter 9: Peripheral Devices: Magnetic Disks

Chapter 12: Mass-Storage Systems. Operating System Concepts 8 th Edition,

OPERATING SYSTEMS CS3502 Spring Input/Output System Chapter 9

External Memory. Patrick Happ Raul Queiroz Feitosa. Parts of these slides are from the support material provided by W. Stallings

Advanced Parallel Architecture Lesson 4 bis. Annalisa Massini /2015

Tape pictures. CSE 30341: Operating Systems Principles

OPERATING SYSTEMS CS3502 Spring Input/Output System Chapter 9

I/O, Disks, and RAID Yi Shi Fall Xi an Jiaotong University

Silberschatz, et al. Topics based on Chapter 13

MASS-STORAGE STRUCTURE

BCN1043. By Dr. Mritha Ramalingam. Faculty of Computer Systems & Software Engineering

Contents. Memory System Overview Cache Memory. Internal Memory. Virtual Memory. Memory Hierarchy. Registers In CPU Internal or Main memory

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University

Storage. CS 3410 Computer System Organization & Programming

I/O CANNOT BE IGNORED

COSC 243. Memory and Storage Systems. Lecture 10 Memory and Storage Systems. COSC 243 (Computer Architecture)

I/O CANNOT BE IGNORED

Chapter 14: Mass-Storage Systems

Disk Scheduling COMPSCI 386

CS3600 SYSTEMS AND NETWORKS

ASSIGNMENT 11. Textbook Assignment: Magnetic Disk Storage, chapter 10, pages 10-1 through

Chapter 10: Mass-Storage Systems

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

CHAPTER 12: MASS-STORAGE SYSTEMS (A) By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

secondary storage: Secondary Stg Any modern computer system will incorporate (at least) two levels of storage:

CSCI-GA Operating Systems. I/O : Disk Scheduling and RAID. Hubertus Franke

Hard facts. Hard disk drives

Chapter 13: Mass-Storage Systems. Disk Scheduling. Disk Scheduling (Cont.) Disk Structure FCFS. Moving-Head Disk Mechanism

Chapter 13: Mass-Storage Systems. Disk Structure

Chapter 12: Secondary-Storage Structure. Operating System Concepts 8 th Edition,

Database Systems II. Secondary Storage

Today: Secondary Storage! Typical Disk Parameters!

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 420, York College. November 21, 2006

CS370 Operating Systems

CS420: Operating Systems. Mass Storage Structure

Wednesday, April 25, Discs RAID: Introduction Error detection and correction Error detection: Simple parity Error correction: Hamming Codes

Disk scheduling Disk reliability Tertiary storage Swap space management Linux swap space management

CSE 153 Design of Operating Systems Fall 2018

Free Space Management

EIDE, ATA, SATA, USB,

Storage Devices for Database Systems

Data Storage and Query Answering. Data Storage and Disk Structure (2)

Chapter 5: Input Output Management. Slides by: Ms. Shree Jaswal

Hard Disk Organization. Vocabulary

Architecture of Computers and Parallel Systems Part 7: External Memories (Disks) Ing. Petr Olivka. Department of Computer Science

1. What is the difference between primary storage and secondary storage?

Overview. EE 4504 Computer Organization. Historically, the limiting factor in a computer s performance has been memory access time

Chapter 14: Mass-Storage Systems. Disk Structure

Lecture 9. I/O Management and Disk Scheduling Algorithms

Module 1: Basics and Background Lecture 4: Memory and Disk Accesses. The Lecture Contains: Memory organisation. Memory hierarchy. Disks.

Monday, May 4, Discs RAID: Introduction Error detection and correction Error detection: Simple parity Error correction: Hamming Codes

Chapter 12: Mass-Storage Systems. Operating System Concepts 8 th Edition,

CS61C - Machine Structures. Week 7 - Disks. October 10, 2003 John Wawrzynek

CPS104 Computer Organization and Programming Lecture 18: Input-Output. Outline of Today s Lecture. The Big Picture: Where are We Now?

Disks. Storage Technology. Vera Goebel Thomas Plagemann. Department of Informatics University of Oslo

1.1 Bits and Bit Patterns. Boolean Operations. Figure 2.1 CPU and main memory connected via a bus. CS11102 Introduction to Computer Science

FACTFILE: GCE DIGITAL TECHNOLOGY

CSE 153 Design of Operating Systems

Tutorial 4 KE What are the differences among sequential access, direct access, and random access?

Eastern Mediterranean University School of Computing and Technology CACHE MEMORY. Computer memory is organized into a hierarchy.

V. Mass Storage Systems

Overview of Mass Storage Structure

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

Chapter 10: Mass-Storage Systems

Chapter 12: Mass-Storage

Chapter 10: Mass-Storage Systems. Operating System Concepts 9 th Edition

Mass-Storage Systems. Mass-Storage Systems. Disk Attachment. Disk Attachment

CS 554: Advanced Database System

COS 318: Operating Systems. Storage Devices. Jaswinder Pal Singh Computer Science Department Princeton University

Disk Scheduling. Based on the slides supporting the text

Disk Scheduling. Chapter 14 Based on the slides supporting the text and B.Ramamurthy s slides from Spring 2001

Table 6.1 Physical Characteristics of Disk Systems

Chapter 10: Mass-Storage Systems. Operating System Concepts 9 th Edition

Chapter 12: Mass-Storage Systems. Operating System Concepts 8 th Edition

Chapter 11: Mass-Storage Systems

Performance Analysis of Disk Scheduling Algorithms

Chapter 12: Mass-Storage

Chapter 12: Mass-Storage

Transcription:

Eastern Mediterranean University School of Computing and Technology ITEC255 Computer Organization & Architecture EXTERNAL MEMORY (Part 1) Introduction When external memory is discussed, one should consider the followings: Magnetic disks are the foundation of external memory on virtually all computer systems. The use of disk arrays to achieve greater performance, known as RAID (Redundant Array of Independent Disks). An increasingly important component of many computer systems is external optical memory. Magnetic tapes was the first kind of secondary memory. It is still widely used as the lowest-cost, slowest-speed member of the memory hierarchy. 2 1

A disk is a circular platter constructed of nonmagnetic material, called substrate, coated with a magnetizable material. Traditionally, substrate has been an aluminum or aluminum alloy material. More recently, glass substrates have been introduced. Benefits are: Improve surface uniformity to produce better reliability. Reduction in surface defects to reduce read/write errors. Greater ability to resist damages. 3 Magnetic Read and Write Mechanisms Data are recorded on and later retrieved from the disk via a conducting coil named the head. In many systems, there are two heads, a read head and a write head. During a read or write operation, the head is stationary while the platter rotates beneath it. 4 2

In the write mechanism, electricity flows through a coil to produce a magnetic field. Electric pulses are sent to the write head, and the resulting magnetic patterns are recorded on the surface below, with different patterns for positive and negative currents. Reversing the direction of the current reverses the direction of the magnetization on the recording medium. 5 In traditional read mechanism, a magnetic field moves relative to a coil in order to produce an electrical current in the coil. When the surface of the disk passes under the head, it generates a current of the same polarity as the one already recorded. The structure of the head for reading is in this case essentially the same as for writing and therefore the same head can be used for both. Nowadays rigid disk systems use a different read mechanism, requiring a separate read head, positioned for convenience close to the write head. The read head consists of a partially shielded magnetoresistive (MR) sensor. 6 3

The MR material has an electrical resistance that depends on the direction of the magnetization of the medium moving under it. By passing a current through the MR sensor, resistance changes are detected as voltage signals. The MR design allows higher-frequency operation, which equates to greater operating speeds. 7 Data Organization and Formatting The head is a relatively small device capable of reading from or writing to a portion of the platter rotating beneath it. This gives rise to the organization of data on the platter in a concentric set of rings, called tracks. 8 4

Each track has the same width as the head. There are thousands of tracks per surface. Adjacent tracks are separated by intertrack gaps. This prevents, or at least minimizes, errors due to misalignment of the head or simply interference of magnetic fields. Data are transferred to and from the disk in sectors. There are typically hundreds of sectors per track, and these may be of either fixed or variable length. In most contemporary systems, fixed-length sectors are used, with 512 bytes being the nearly universal sector size. Adjacent sectors are separated by intersector gaps. 9 A bit near the center of a rotating disk travels past a fixed point (such as a read write head) slower than a bit on the outside. Therefore, some way must be found to compensate for the variation in speed so that the head can read all the bits at the same rate. This can be done by increasing the spacing between bits of information recorded in segments of the disk. The information can then be scanned at the same rate by rotating the disk at a fixed speed, known as the constant angular velocity (CAV). The disk is divided into a number of pie-shaped sectors and into a series of concentric tracks. 10 5

The advantage of using CAV is that individual blocks of data can be directly addressed by track and sector. To move the head from its current location to a specific address, it only takes a short movement of the head to a specific track and a short wait for the proper sector to spin under the head. The disadvantage of CAV is that the amount of data that can be stored on the long outer tracks is same as what can be stored on the short inner tracks. 11 Because the density increases in moving from the outermost track to the innermost track, disk storage capacity in a straightforward CAV system is limited by the maximum recording density that can be achieved on the innermost track. To increase density, modern hard disk systems use a technique known as multiple zone recording, in which the surface is divided into a number of concentric zones (16 is typical). 12 6

Within a zone, the number of bits per track is constant. Zones farther from the center contain more bits (more sectors) than zones closer to the center. This allows for greater overall storage capacity at the expense of somewhat more complex circuitry. As the disk head moves from one zone to another, the length (along the track) of individual bits changes, causing a change in the timing for reads and writes. 13 Some means is needed to locate sector positions within a track. Clearly, there must be some starting point on the track and a way of identifying the start and 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 drive and not accessible to the user. 14 7

An example of disk formatting is shown in the figure. In this case, each track contains 30 fixed-length sectors of 600 bytes each. Each sector holds 512 bytes of 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 a special bit pattern that delimits the beginning of the field. The track number identifies the track, the head number identifies the head and the sector number identifies the sector. The ID and data fields each contain an error detecting code (CRC). 15 The disk itself is mounted in a disk drive, which consists of the arm, a spindle that rotates the disk, and the electronics needed for input and output of binary data. 16 8

The major physical characteristics that differentiate among the various types of magnetic disks are considered. 1. Head Motion The head may either be fixed (one per track) or movable (one per surface) with respect to the radial direction of the platter. In a fixed-head disk, there is one read-write head per track. All of the heads are mounted on a rigid arm that extends across all tracks; such systems are rare today. In a movable-head disk, there is only one read-write head. The head is mounted on an arm and it is positioned on the tracks. 17 2. Disk Portability A nonremovable disk is permanently mounted in the disk drive. Hard disk is an example for a nonremovable disk. A removable disk can be removed and replaced with another disk. The advantage is that unlimited amounts of data are available with a limited number of disk systems. Furthermore, such a disk may be moved from one computer system to another. Floppy disks and ZIP cartridge disks are examples of removable disks. 18 9

3. Sides For most disks, the magnetizable coating is applied to both sides of the platter, which is then referred to as doublesided. Some less expensive disk systems use single-sided disks. 19 4. Platters Multiple-platter disks employ a movable head, with one read-write head per platter surface. All of the heads are mechanically fixed so that all are at the same distance from the center of the disk and move together. Thus, at any time, all of the heads are positioned over tracks that are of equal distance from the center of the disk. Single-platter disks employ only a single platter. 20 10

5. Head mechanism The head mechanism provides a classification of disks into three types. Traditionally, the read-write head has been positioned a fixed distance above the platter, allowing an air gap. This head mechanism is known as fixed-gap. At the other extreme is a head mechanism that actually comes into physical contact with the medium during a read or write operation. This mechanism is used with the floppy disk. Another head mechanism known as aerodynamic heads (Winchester) are designed to operate closer to the disk s surface than conventional rigid disk heads, thus allowing greater data density. The head is actually an aerodynamic foil that rests lightly on the platter s surface when the disk is motionless. The air pressure generated by a spinning disk is enough to make the foil rise above the surface. 21 The actual details of disk I/O operation depend on the computer system, the operating system, and the nature of the I/O channel and disk controller hardware. A general timing diagram of disk I/O transfer is shown in the figure. When a process issues an I/O request, it must first wait in a queue for the device to be available. At that time, the device is assigned to the process. If the device shares a single I/O channel or a set of I/O channels with other disk drives, then there may be an additional wait for the channel to be available. At that point, the seek is performed to begin disk access. 22 11

When the disk drive is operating, the disk is rotating at constant speed. To read or write, the head must be positioned at the desired track and at the beginning of the desired sector on that track. On a movable head system, the time it takes to position the head at the track is known as seek time. A typical average seek time on contemporary hard disks is under 10ms. Once the track is selected, the disk controller waits until the appropriate sector rotates to line up with the head. The time it takes for the beginning of the sector to reach the head is known as rotational delay, or rotational latency. In nowadays hard disks, the average rotational delay is less than 3ms. 23 The sum of the seek time and the rotational delay equals the access time, which is the time it takes to get into position to read or write. Once the head is in position, the read or write operation is then performed as the sector moves under the head; this is the data transfer portion of the operation; the time required for the transfer is the transfer time. The transfer time to or from the disk depends on the rotation speed of the disk in the following fashion: T = b rn where T = transfer time b = number of bytes to be transferred N = number of bytes on a track r = rotation speed, in revolutions per second (rpm) 24 12

Finally, the total average transfer time (T a ) can be expressed as: T a = T s + 1 2r + b rn where T s = average seek time. 25 Example: Consider a typical disk with an advertised average seek time of 4ms, rotational speed of 15,000 rpm and 512 byte sectors with 500 sectors per track. Suppose that we wish to read a file consisting of 2500 sectors for a total of 1.28 Mbytes. Calculate the total transfer time for the following cases: a) assume that the file is stored as compactly as possible (sequential organization) b)accesses to the sectors are distributed randomly over the disk (random access) 26 13

a) sequential organization If sequential organization is considered, 2500 sectors are occupied on all of sectors on 5 adjacent tracks. 5 tracks 500 sectors/track = 2500 sectors Average seek time (T s ) = 4ms Average rotational delay = 1 2r = 1 2(15000rpm/60sec) = 2ms Time to read first track (500 sectors) = b rn = ( 15000 60 512x500 )(512x500) = 4ms 27 a) sequential organization Total time to read the first track (500 sectors) is calculated as: T a = T s + 1 2r + b rn = 4 + 2 + 4 = 10ms 4 tracks are left to read (2000 sectors). These tracks are transferred without any seek time. Thus, each track can be transferred in 2ms (rotational delay) + 4ms (time to read 1 track). 4 (2 + 4) = 24ms Total transfer time for the whole file (2500 sectors) =10+24 = 34ms 28 14

b) random access Average seek time and rotational delay is considered for each sector. Average seek time (T s ) = 4ms Average rotational delay = 1 2r = 1 2(15000rpm/60sec) = 2ms Time to read 500 sectors is 4ms. Thus, time to read 1 sector is = 4/500 = 0.008ms Time to access and read 1 sector is = 4 + 2 + 0.008 = 6.008ms Total transfer time to read 2500 sectors = 2500 6.008 = 15020ms 29 It is clear that the order in which sectors are read from the disk has a tremendous effect on I/O performance. This leads to a consideration of disk scheduling algorithms. 30 15