SlideShare a Scribd company logo
1 of 38
Secondary Storage Devices

     V.SARANYA AP/CSE
Sri Vidya College of Engineering
        and Technology




                                   1
2
Magnetic disk in floppy disk




                               3
Secondary Storage Devices
 Two major types of storage devices:
1. Direct Access Storage Devices (DASDs)
  –   Magnetic Disks
       Hard disks (high capacity, low cost per bit)
       Floppy disks (low capacity, slow, cheap)
  –   Optical Disks
       CD-ROM = (Compact disc, read-only memory)
2. Serial Devices
  –   Magnetic tapes (very fast sequential access)


                                                      4
Magnetic Disks

• Bits of data (0’s and 1’s) are stored on
  circular magnetic platters called disks.
• A disk rotates rapidly (& never stops).
• A disk head reads and writes bits of data
  as they pass under the head.
• Often, several platters are organized into
  a disk pack (or disk drive).

                                           5
Bits of Data




               6
A Disk Drive

surfaces




                  Spindle          Boom
                        Read/Write heads

           Disk drive with 4 platters and 8 surfaces
                                                       7
8
Looking at
the Surface
Organization of Disks
• Disk contains concentric tracks.
• Tracks are divided into sectors
• A sector is the smallest addressable unit
  in a disk.




                                              10
Accessing Data
• When a program reads a byte from the disk,
  the operating system locates the surface, track
  and sector containing that byte, and reads the
  entire sector into a special area in main
  memory called buffer.
• The bottleneck of a disk access is moving the
  read/write arm. So it makes sense to store a file
  in tracks that are below/above each other in
  different surfaces, rather than in several tracks
  in the same surface.
                                                 11
Cylinders
• A cylinder is the set of tracks at a given
  radius of a disk pack.
  – i.e. a cylinder is the set of tracks that can be
    accessed without moving the disk arm.
• All the information on a cylinder can be
  accessed without moving the read/write
  arm.


                                                       12
Cylinders
Estimating Capacities

• Track capacity = # of sectors/track * bytes/sector
• Cylinder capacity = # of tracks/cylinder * track
  capacity
• Drive capacity = # of cylinders * cylinder capacity
• Number of cylinders = # of tracks in a surface




                                                    14
Exercise
• Store a file of 20000 records on a disk with
  the following characteristics:
  # of bytes per sector = 512
  # of sectors per track = 40
  # of tracks per cylinder = 12
  # of cylinders = 1331
Q1. How many cylinders does the file require
 if each data record requires 256 bytes?
Q2. What is the total capacity of the disk?
                                                 15
Clusters
• Another view of sector organization is the
  one maintained by the O.S.’s file manager.
• It views the file as a series of clusters of
  sectors.
• File manager uses a file allocation table
  (FAT) to map logical sectors of the file to
  the physical clusters.


                                            16
Extents
• If there is a lot of room on a disk, it may be
  possible to make a file consist entirely of
  contiguous(near by)clusters. Then we say
  that the file is one extent. (very good for
  sequential processing)
• If there isn’t enough contiguous space
  available to contain an entire file, the file is
  divided into two or more noncontiguous
  parts. Each part is an extent.
                                                17
Fragmentation
 Internal fragmentation: loss of space
  within a sector or a cluster.
1) Due to records not fitting exactly in a sector:
   e.g. Sector size is 512 and record size is 300
   bytes. Either
      – store one record per sector, or
      – allow records span(duration) sectors.
2) Due to the use of clusters: If the file size is not
   a multiple of the cluster size, then the last
   cluster will be partially used.

                                         18
Choice of cluster size
 Some operating systems allow system
  administrator to choose cluster size.

• When to use large cluster size?

• What about small cluster size?


                                          19
Organizing Tracks by Block
• Disk tracks may be divided into user-defined blocks
  rather than into sectors.
• Blocks can be fixed or variable length.
• A block is usually organized to hold an integral number
  of logical records.
• Blocking Factor = number of records stored in a block.
• No internal fragmentation, no record spanning two
  blocks.
• In block-addressing scheme each block of data is
  accompanied by one or more sub blocks containing
  extra information about the block.

                                                       20
Non-data Overhead
• Both blocks and sectors require non-data
  overhead (written during formatting)
• On sector addressable disks this information
  involves sector address, track address, and
  condition     (usable/defective). Also  pre-
  formatting involves placing gaps and
  synchronization marks.
• On block-organized disk, more information is
  needed and the programmer should be aware
  of some of this information.
                                            21
Exercise
• Consider a block-addressable disk with the
  following characteristics:
  – Size of track 20,000 bytes.
  – Nondata overhead per block = 300 bytes.
  – Record size = 100 byte.
• Q) How many records can be stored per
  track if blocking factor is
  a) 10
  b) 60
                                               22
The Cost of a Disk Access
 The time to access a sector in a track on a surface is
  divided into 3 components:

 Time Component                         Action
 Seek Time               Time to move the read/write arm to
                         the correct cylinder
 Rotational delay (or    Time it takes for the disk to rotate so
 latency)                that the desired sector is under the
                         read/write head
 Transfer time           Once the read/write head is
                         positioned over the data, this is the
                         time it takes for transferring data

                                                           23
Seek time
• Seek time is the time required to move the arm to
  the correct cylinder.
• Largest in cost.
Typically:
   – 5 ms (miliseconds) to move from one track to the next
     (track-to-track)
   – 50 ms maximum (from inside track to outside track)
   – 30 ms average (from one random track to another
     random track)


                                                             24
Average Seek Time (s)
• Since it is usually impossible to know exactly how many
  tracks will be traversed in every seek, we usually try to
  determine the average seek time (s) required for a
  particular file operation.
• If the starting and ending positions for each access are
  random, it turns out that the average seek traverses
  one third of the total number of cylinders.
• Manufacturer’s specifications for disk drives often list
  this figure as the average seek time for the drives.
• Most hard disks today have s of less than 10 ms, and
  high-performance disks have s as low as 7.5 ms.

                                                         25
Latency (rotational delay)
• Latency is the time needed for the disk to rotate so
  the sector we want is under the read/write head.
• Hard disks usually rotate at about 5000rpm, which
  is one revolution per 12 msec.
• Note:
   – Min latency = 0
   – Max latency = Time for one disk revolution
   – Average latency (r) = (min + max) / 2
                         = max / 2
                         = time for ½ disk revolution
• Typically 6 – 8 ms average
                                                        26
Transfer Time
• Transfer time is the time for the read/write head
  to pass over a block.
• The transfer time is given by the formula:
                  number of bytes transferred
  Transfer time = --------------------------------- x rotation time
                  number of bytes on a track
• e.g. if there are 63 sectors per track, the time to
  transfer one sector would be 1/63 of a
  revolution.
                                                                27
Exercise
Given the following disk:
   – 20 surfaces
     800 tracks/surface
     25 sectors/track
     512 bytes/sector
   – 3600 rpm (revolutions per minute)
   – 7 ms track-to-track seek time
     28 ms avg. seek time
     50 ms max seek time.
Find:
a) Average latency
b) Disk capacity
c) Time to read the entire disk, one cylinder at a time
                                                          28
Sequential Reading
•   Given the following disk:
    – s = 16 ms
    – r = 8.3 ms
    – Block transfer time = 8.4 ms
a) Calculate the time to read 10 sequential
   blocks
b) Calculate the time to read 100 sequential
   blocks
                                               29
Random Reading
Given the same disk,
a) Calculate the time to read 10 blocks
   randomly
b) Calculate the time to read 100 blocks
   randomly




                                           30
Fast Sequential Reading
• We assume that blocks are arranged so that
  there is no rotational delay in transferring from
  one track to another within the same cylinder.
  This is possible if consecutive track beginnings
  are staggered (like running races on circular
  race tracks)
• We also assume that the consecutive blocks are
  arranged so that when the next block is on an
  adjacent cylinder, there is no rotational delay
  after the arm is moved to new cylinder
• Fast sequential reading: no rotational delay
  after finding the first block.
                                                 31
Consequently …
Reading b blocks:
i. Sequentially:
     s + r + b * btt
  insignificant for large files

    ⇒ b * btt
ii. Randomly:
     b * (s + r + btt)

                                    32
Exercise
•    Specifications of a 300MB disk drive:
    –     Min seek time = 6ms.
    –     Average seek time = 18ms
    –     Rotational delay = 8.3ms
    –      transfer rate = 16.7 ms/track or 1229 bytes/ms
    –     Bytes per sector = 512
    –     Sectors per track = 40
    –     Tracks per cylinder = 12
    –     Tracks per surface = 1331
    –     Interleave factor = 1
    –     Cluster size= 8 sectors
    –     Smallest extent size = 5 clusters
Q) How long will it take to read a 2048Kb file that is
     divided into 8000 256 byte records?
    i)    Access the file sequentially
    ii)   Access the file randomly
                                                            33
Secondary Storage Devices:
        CD-ROM




                             34
Physical Organization of CD-ROM
•   Compact Disk – read only memory (write once)
•   Data is encoded and read optically with a laser
•   Can store around 600MB data
•   Digital data is represented as a series of Pits and
    Lands:
    – Pit = a little depression, forming a lower level in the
     track
    – Land = the flat part between pits, or the upper levels
     in the track

                                                                35
Organization of data
• Reading a CD is done by shining a laser at the disc
  and detecting changing reflections patterns.
   – 1 = change in height (land to pit or pit to land)
   – 0 = a “fixed” amount of time between 1’s
  LAND        PIT     LAND               PIT        LAND
 ...------+     +-------------+       +---...
          |_____|             |_______|
..0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 ..

• Note : we cannot have two 1’s in a row!
  => uses Eight to Fourteen Modulation (EFM) encoding
  table.
                                                           36
Properties
• Note that: Since 0's are represented by the length
  of time between transitions, we must travel at
  constant linear velocity (CLV)on the tracks.
• Sectors are organized along a spiral
• Sectors have same linear length
• Advantage: takes advantage of all storage space
  available.
• Disadvantage: has to change rotational speed
  when seeking (slower towards the outside)
                                                       37
Addressing
• 1 second of play time is divided up into 75
  sectors.
• Each sector holds 2KB
• 60 min CD:
  60min * 60 sec/min * 75 sectors/sec =
  270,000 sectors = 540,000 KB ~ 540 MB
• A sector is addressed by:
  Minute:Second:Sector
  e.g. 16:22:34
                                                38

More Related Content

What's hot

Disk scheduling & Disk management
Disk scheduling & Disk managementDisk scheduling & Disk management
Disk scheduling & Disk managementSiva Priya
 
Storage devices and media
Storage devices and mediaStorage devices and media
Storage devices and mediaAnjan Mahanta
 
Storage devices(present)
Storage devices(present)Storage devices(present)
Storage devices(present)Zawawi Mohamad
 
DIRECT ACCESS STORAGE DEVICES
DIRECT ACCESS STORAGE DEVICESDIRECT ACCESS STORAGE DEVICES
DIRECT ACCESS STORAGE DEVICESStaus Nyongesa
 
Primary and secondary Storage devices
Primary and secondary Storage devicesPrimary and secondary Storage devices
Primary and secondary Storage devicesMuhammad Usman
 
introduction To Operating System
introduction To Operating Systemintroduction To Operating System
introduction To Operating SystemLuka M G
 
Presentation on storage devices
Presentation on storage devicesPresentation on storage devices
Presentation on storage devicesNouman Riaz
 
Computer storage devices
Computer storage devicesComputer storage devices
Computer storage devicesRizwan Qamar
 
Chapter 3 storage media and devices
Chapter 3   storage media and devicesChapter 3   storage media and devices
Chapter 3 storage media and devicesPratik Gupta
 
Ch2: Computer System Structure (OS)
Ch2: Computer System Structure (OS)Ch2: Computer System Structure (OS)
Ch2: Computer System Structure (OS)Ahmar Hashmi
 

What's hot (20)

STORAGE DEVICES
STORAGE DEVICESSTORAGE DEVICES
STORAGE DEVICES
 
Secondary memory
Secondary memorySecondary memory
Secondary memory
 
Graphics card ppt
Graphics card pptGraphics card ppt
Graphics card ppt
 
Disk scheduling & Disk management
Disk scheduling & Disk managementDisk scheduling & Disk management
Disk scheduling & Disk management
 
Secondary Memory
Secondary MemorySecondary Memory
Secondary Memory
 
Storage devices and media
Storage devices and mediaStorage devices and media
Storage devices and media
 
Storage devices(present)
Storage devices(present)Storage devices(present)
Storage devices(present)
 
DIRECT ACCESS STORAGE DEVICES
DIRECT ACCESS STORAGE DEVICESDIRECT ACCESS STORAGE DEVICES
DIRECT ACCESS STORAGE DEVICES
 
Primary and secondary Storage devices
Primary and secondary Storage devicesPrimary and secondary Storage devices
Primary and secondary Storage devices
 
Presentation on storage device
Presentation on storage devicePresentation on storage device
Presentation on storage device
 
introduction To Operating System
introduction To Operating Systemintroduction To Operating System
introduction To Operating System
 
Presentation on storage devices
Presentation on storage devicesPresentation on storage devices
Presentation on storage devices
 
Hard disk PPT
Hard disk PPTHard disk PPT
Hard disk PPT
 
Computer storage devices
Computer storage devicesComputer storage devices
Computer storage devices
 
Flash memory
Flash memoryFlash memory
Flash memory
 
secondary storage devices
secondary storage devicessecondary storage devices
secondary storage devices
 
Storage devices
Storage devicesStorage devices
Storage devices
 
Chapter 3 storage media and devices
Chapter 3   storage media and devicesChapter 3   storage media and devices
Chapter 3 storage media and devices
 
Ch2: Computer System Structure (OS)
Ch2: Computer System Structure (OS)Ch2: Computer System Structure (OS)
Ch2: Computer System Structure (OS)
 
CD DRIVE
CD DRIVECD DRIVE
CD DRIVE
 

Viewers also liked

Secondary storage devices
Secondary storage devicesSecondary storage devices
Secondary storage devicesAbhinav Kp
 
Secondary storage devices and
Secondary storage devices andSecondary storage devices and
Secondary storage devices androsey46
 
Primary and secondary storage devices
Primary and secondary storage devicesPrimary and secondary storage devices
Primary and secondary storage devicesPichano Kikon
 
Secondary storage devices
Secondary storage devicesSecondary storage devices
Secondary storage devicesSrijan Jaiswal
 
Secondary storage
Secondary storageSecondary storage
Secondary storageAmni Muin
 
Secondary Storage Devices
Secondary Storage DevicesSecondary Storage Devices
Secondary Storage Devicessilaah
 
Secondary storage devices by Neeraj Bhandari ( Surkhet.Nepal )
Secondary storage devices by Neeraj Bhandari ( Surkhet.Nepal )Secondary storage devices by Neeraj Bhandari ( Surkhet.Nepal )
Secondary storage devices by Neeraj Bhandari ( Surkhet.Nepal )Neeraj Bhandari
 
Solved Question Paper of PSC Computer Operator 2016
Solved Question Paper of PSC Computer Operator 2016Solved Question Paper of PSC Computer Operator 2016
Solved Question Paper of PSC Computer Operator 2016Suresh Khanal
 
database recovery techniques
database recovery techniques database recovery techniques
database recovery techniques Kalhan Liyanage
 
Introduction of USB 3.1
Introduction of USB 3.1 Introduction of USB 3.1
Introduction of USB 3.1 Rainny Tu
 
USB Powerpoint
USB PowerpointUSB Powerpoint
USB Powerpointaaron924
 
DBMS-chap 2-Concurrency Control
DBMS-chap 2-Concurrency ControlDBMS-chap 2-Concurrency Control
DBMS-chap 2-Concurrency ControlMukesh Tekwani
 

Viewers also liked (17)

Secondary storage devices
Secondary storage devicesSecondary storage devices
Secondary storage devices
 
Secondary Storage
Secondary StorageSecondary Storage
Secondary Storage
 
Secondary storage devices
Secondary storage devicesSecondary storage devices
Secondary storage devices
 
Secondary storage devices and
Secondary storage devices andSecondary storage devices and
Secondary storage devices and
 
Primary and secondary storage devices
Primary and secondary storage devicesPrimary and secondary storage devices
Primary and secondary storage devices
 
Secondary storage devices
Secondary storage devicesSecondary storage devices
Secondary storage devices
 
Secondary storage
Secondary storageSecondary storage
Secondary storage
 
Secondary Storage Devices
Secondary Storage DevicesSecondary Storage Devices
Secondary Storage Devices
 
Secondary storage devices by Neeraj Bhandari ( Surkhet.Nepal )
Secondary storage devices by Neeraj Bhandari ( Surkhet.Nepal )Secondary storage devices by Neeraj Bhandari ( Surkhet.Nepal )
Secondary storage devices by Neeraj Bhandari ( Surkhet.Nepal )
 
Solved Question Paper of PSC Computer Operator 2016
Solved Question Paper of PSC Computer Operator 2016Solved Question Paper of PSC Computer Operator 2016
Solved Question Paper of PSC Computer Operator 2016
 
database recovery techniques
database recovery techniques database recovery techniques
database recovery techniques
 
Introduction of USB 3.1
Introduction of USB 3.1 Introduction of USB 3.1
Introduction of USB 3.1
 
USB 3.0 Intro
USB 3.0 IntroUSB 3.0 Intro
USB 3.0 Intro
 
wireless usb ppt
wireless usb pptwireless usb ppt
wireless usb ppt
 
Usb universal serial bus
Usb   universal serial busUsb   universal serial bus
Usb universal serial bus
 
USB Powerpoint
USB PowerpointUSB Powerpoint
USB Powerpoint
 
DBMS-chap 2-Concurrency Control
DBMS-chap 2-Concurrency ControlDBMS-chap 2-Concurrency Control
DBMS-chap 2-Concurrency Control
 

Similar to Secondary storage devices

Secondarystoragedevices1 130119040144-phpapp02
Secondarystoragedevices1 130119040144-phpapp02Secondarystoragedevices1 130119040144-phpapp02
Secondarystoragedevices1 130119040144-phpapp02Seshu Chakravarthy
 
9_Storage_Devices.pptx
9_Storage_Devices.pptx9_Storage_Devices.pptx
9_Storage_Devices.pptxJawaharPrasad3
 
Unit 4 external sorting
Unit 4   external sortingUnit 4   external sorting
Unit 4 external sortingDrkhanchanaR
 
disk sechduling
disk sechdulingdisk sechduling
disk sechdulinggopi7
 
Computer Memory Hierarchy Computer Architecture
Computer Memory Hierarchy Computer ArchitectureComputer Memory Hierarchy Computer Architecture
Computer Memory Hierarchy Computer ArchitectureHaris456
 
Disk Management through the Computer Management
Disk Management through the Computer ManagementDisk Management through the Computer Management
Disk Management through the Computer ManagementAnshGoyal32
 
19IS305_U4_LP10_LM10-22-23.pdf
19IS305_U4_LP10_LM10-22-23.pdf19IS305_U4_LP10_LM10-22-23.pdf
19IS305_U4_LP10_LM10-22-23.pdfJESUNPK
 
Disk scheduling geekssay.com
Disk scheduling geekssay.comDisk scheduling geekssay.com
Disk scheduling geekssay.comHemant Gautam
 
Disks and Stable Storage.ppt
Disks and Stable Storage.pptDisks and Stable Storage.ppt
Disks and Stable Storage.pptjguuhxxxfp
 

Similar to Secondary storage devices (20)

Secondarystoragedevices1 130119040144-phpapp02
Secondarystoragedevices1 130119040144-phpapp02Secondarystoragedevices1 130119040144-phpapp02
Secondarystoragedevices1 130119040144-phpapp02
 
9_Storage_Devices.pptx
9_Storage_Devices.pptx9_Storage_Devices.pptx
9_Storage_Devices.pptx
 
Os7
Os7Os7
Os7
 
9_Storage_Devices.pptx
9_Storage_Devices.pptx9_Storage_Devices.pptx
9_Storage_Devices.pptx
 
Ch9 mass storage systems
Ch9   mass storage systemsCh9   mass storage systems
Ch9 mass storage systems
 
Operating Systems
Operating SystemsOperating Systems
Operating Systems
 
Unit 4 DBMS.ppt
Unit 4 DBMS.pptUnit 4 DBMS.ppt
Unit 4 DBMS.ppt
 
Unit 4 external sorting
Unit 4   external sortingUnit 4   external sorting
Unit 4 external sorting
 
Disk Scheduling
Disk SchedulingDisk Scheduling
Disk Scheduling
 
disk sechduling
disk sechdulingdisk sechduling
disk sechduling
 
18CSC205J-UNIT-5.pptx
18CSC205J-UNIT-5.pptx18CSC205J-UNIT-5.pptx
18CSC205J-UNIT-5.pptx
 
Computer Memory Hierarchy Computer Architecture
Computer Memory Hierarchy Computer ArchitectureComputer Memory Hierarchy Computer Architecture
Computer Memory Hierarchy Computer Architecture
 
Disk Management through the Computer Management
Disk Management through the Computer ManagementDisk Management through the Computer Management
Disk Management through the Computer Management
 
Module5 secondary storage
Module5 secondary storageModule5 secondary storage
Module5 secondary storage
 
19IS305_U4_LP10_LM10-22-23.pdf
19IS305_U4_LP10_LM10-22-23.pdf19IS305_U4_LP10_LM10-22-23.pdf
19IS305_U4_LP10_LM10-22-23.pdf
 
7 disk managment
7 disk managment7 disk managment
7 disk managment
 
Disk scheduling geekssay.com
Disk scheduling geekssay.comDisk scheduling geekssay.com
Disk scheduling geekssay.com
 
Cs8493 unit 4
Cs8493 unit 4Cs8493 unit 4
Cs8493 unit 4
 
Disks and Stable Storage.ppt
Disks and Stable Storage.pptDisks and Stable Storage.ppt
Disks and Stable Storage.ppt
 
Ch12
Ch12Ch12
Ch12
 

More from Slideshare

Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010Slideshare
 
Report generation
Report generationReport generation
Report generationSlideshare
 
Security in Relational model
Security in Relational modelSecurity in Relational model
Security in Relational modelSlideshare
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship ModelSlideshare
 
Major issues in data mining
Major issues in data miningMajor issues in data mining
Major issues in data miningSlideshare
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessingSlideshare
 
What is in you
What is in youWhat is in you
What is in youSlideshare
 
Propositional logic & inference
Propositional logic & inferencePropositional logic & inference
Propositional logic & inferenceSlideshare
 
Logical reasoning 21.1.13
Logical reasoning 21.1.13Logical reasoning 21.1.13
Logical reasoning 21.1.13Slideshare
 
Statistical learning
Statistical learningStatistical learning
Statistical learningSlideshare
 
Resolution(decision)
Resolution(decision)Resolution(decision)
Resolution(decision)Slideshare
 
Reinforcement learning 7313
Reinforcement learning 7313Reinforcement learning 7313
Reinforcement learning 7313Slideshare
 
Neural networks
Neural networksNeural networks
Neural networksSlideshare
 
Instance based learning
Instance based learningInstance based learning
Instance based learningSlideshare
 
Statistical learning
Statistical learningStatistical learning
Statistical learningSlideshare
 
Neural networks
Neural networksNeural networks
Neural networksSlideshare
 
Logical reasoning
Logical reasoning Logical reasoning
Logical reasoning Slideshare
 

More from Slideshare (20)

Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010
 
Report generation
Report generationReport generation
Report generation
 
Trigger
TriggerTrigger
Trigger
 
Security in Relational model
Security in Relational modelSecurity in Relational model
Security in Relational model
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
OLAP
OLAPOLAP
OLAP
 
Major issues in data mining
Major issues in data miningMajor issues in data mining
Major issues in data mining
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
 
What is in you
What is in youWhat is in you
What is in you
 
Propositional logic & inference
Propositional logic & inferencePropositional logic & inference
Propositional logic & inference
 
Logical reasoning 21.1.13
Logical reasoning 21.1.13Logical reasoning 21.1.13
Logical reasoning 21.1.13
 
Logic agent
Logic agentLogic agent
Logic agent
 
Statistical learning
Statistical learningStatistical learning
Statistical learning
 
Resolution(decision)
Resolution(decision)Resolution(decision)
Resolution(decision)
 
Reinforcement learning 7313
Reinforcement learning 7313Reinforcement learning 7313
Reinforcement learning 7313
 
Neural networks
Neural networksNeural networks
Neural networks
 
Instance based learning
Instance based learningInstance based learning
Instance based learning
 
Statistical learning
Statistical learningStatistical learning
Statistical learning
 
Neural networks
Neural networksNeural networks
Neural networks
 
Logical reasoning
Logical reasoning Logical reasoning
Logical reasoning
 

Recently uploaded

Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 

Recently uploaded (20)

Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 

Secondary storage devices

  • 1. Secondary Storage Devices V.SARANYA AP/CSE Sri Vidya College of Engineering and Technology 1
  • 2. 2
  • 3. Magnetic disk in floppy disk 3
  • 4. Secondary Storage Devices  Two major types of storage devices: 1. Direct Access Storage Devices (DASDs) – Magnetic Disks Hard disks (high capacity, low cost per bit) Floppy disks (low capacity, slow, cheap) – Optical Disks CD-ROM = (Compact disc, read-only memory) 2. Serial Devices – Magnetic tapes (very fast sequential access) 4
  • 5. Magnetic Disks • Bits of data (0’s and 1’s) are stored on circular magnetic platters called disks. • A disk rotates rapidly (& never stops). • A disk head reads and writes bits of data as they pass under the head. • Often, several platters are organized into a disk pack (or disk drive). 5
  • 7. A Disk Drive surfaces Spindle Boom Read/Write heads Disk drive with 4 platters and 8 surfaces 7
  • 8. 8
  • 10. Organization of Disks • Disk contains concentric tracks. • Tracks are divided into sectors • A sector is the smallest addressable unit in a disk. 10
  • 11. Accessing Data • When a program reads a byte from the disk, the operating system locates the surface, track and sector containing that byte, and reads the entire sector into a special area in main memory called buffer. • The bottleneck of a disk access is moving the read/write arm. So it makes sense to store a file in tracks that are below/above each other in different surfaces, rather than in several tracks in the same surface. 11
  • 12. Cylinders • A cylinder is the set of tracks at a given radius of a disk pack. – i.e. a cylinder is the set of tracks that can be accessed without moving the disk arm. • All the information on a cylinder can be accessed without moving the read/write arm. 12
  • 14. Estimating Capacities • Track capacity = # of sectors/track * bytes/sector • Cylinder capacity = # of tracks/cylinder * track capacity • Drive capacity = # of cylinders * cylinder capacity • Number of cylinders = # of tracks in a surface 14
  • 15. Exercise • Store a file of 20000 records on a disk with the following characteristics: # of bytes per sector = 512 # of sectors per track = 40 # of tracks per cylinder = 12 # of cylinders = 1331 Q1. How many cylinders does the file require if each data record requires 256 bytes? Q2. What is the total capacity of the disk? 15
  • 16. Clusters • Another view of sector organization is the one maintained by the O.S.’s file manager. • It views the file as a series of clusters of sectors. • File manager uses a file allocation table (FAT) to map logical sectors of the file to the physical clusters. 16
  • 17. Extents • If there is a lot of room on a disk, it may be possible to make a file consist entirely of contiguous(near by)clusters. Then we say that the file is one extent. (very good for sequential processing) • If there isn’t enough contiguous space available to contain an entire file, the file is divided into two or more noncontiguous parts. Each part is an extent. 17
  • 18. Fragmentation  Internal fragmentation: loss of space within a sector or a cluster. 1) Due to records not fitting exactly in a sector: e.g. Sector size is 512 and record size is 300 bytes. Either – store one record per sector, or – allow records span(duration) sectors. 2) Due to the use of clusters: If the file size is not a multiple of the cluster size, then the last cluster will be partially used. 18
  • 19. Choice of cluster size  Some operating systems allow system administrator to choose cluster size. • When to use large cluster size? • What about small cluster size? 19
  • 20. Organizing Tracks by Block • Disk tracks may be divided into user-defined blocks rather than into sectors. • Blocks can be fixed or variable length. • A block is usually organized to hold an integral number of logical records. • Blocking Factor = number of records stored in a block. • No internal fragmentation, no record spanning two blocks. • In block-addressing scheme each block of data is accompanied by one or more sub blocks containing extra information about the block. 20
  • 21. Non-data Overhead • Both blocks and sectors require non-data overhead (written during formatting) • On sector addressable disks this information involves sector address, track address, and condition (usable/defective). Also pre- formatting involves placing gaps and synchronization marks. • On block-organized disk, more information is needed and the programmer should be aware of some of this information. 21
  • 22. Exercise • Consider a block-addressable disk with the following characteristics: – Size of track 20,000 bytes. – Nondata overhead per block = 300 bytes. – Record size = 100 byte. • Q) How many records can be stored per track if blocking factor is a) 10 b) 60 22
  • 23. The Cost of a Disk Access  The time to access a sector in a track on a surface is divided into 3 components: Time Component Action Seek Time Time to move the read/write arm to the correct cylinder Rotational delay (or Time it takes for the disk to rotate so latency) that the desired sector is under the read/write head Transfer time Once the read/write head is positioned over the data, this is the time it takes for transferring data 23
  • 24. Seek time • Seek time is the time required to move the arm to the correct cylinder. • Largest in cost. Typically: – 5 ms (miliseconds) to move from one track to the next (track-to-track) – 50 ms maximum (from inside track to outside track) – 30 ms average (from one random track to another random track) 24
  • 25. Average Seek Time (s) • Since it is usually impossible to know exactly how many tracks will be traversed in every seek, we usually try to determine the average seek time (s) required for a particular file operation. • If the starting and ending positions for each access are random, it turns out that the average seek traverses one third of the total number of cylinders. • Manufacturer’s specifications for disk drives often list this figure as the average seek time for the drives. • Most hard disks today have s of less than 10 ms, and high-performance disks have s as low as 7.5 ms. 25
  • 26. Latency (rotational delay) • Latency is the time needed for the disk to rotate so the sector we want is under the read/write head. • Hard disks usually rotate at about 5000rpm, which is one revolution per 12 msec. • Note: – Min latency = 0 – Max latency = Time for one disk revolution – Average latency (r) = (min + max) / 2 = max / 2 = time for ½ disk revolution • Typically 6 – 8 ms average 26
  • 27. Transfer Time • Transfer time is the time for the read/write head to pass over a block. • The transfer time is given by the formula: number of bytes transferred Transfer time = --------------------------------- x rotation time number of bytes on a track • e.g. if there are 63 sectors per track, the time to transfer one sector would be 1/63 of a revolution. 27
  • 28. Exercise Given the following disk: – 20 surfaces 800 tracks/surface 25 sectors/track 512 bytes/sector – 3600 rpm (revolutions per minute) – 7 ms track-to-track seek time 28 ms avg. seek time 50 ms max seek time. Find: a) Average latency b) Disk capacity c) Time to read the entire disk, one cylinder at a time 28
  • 29. Sequential Reading • Given the following disk: – s = 16 ms – r = 8.3 ms – Block transfer time = 8.4 ms a) Calculate the time to read 10 sequential blocks b) Calculate the time to read 100 sequential blocks 29
  • 30. Random Reading Given the same disk, a) Calculate the time to read 10 blocks randomly b) Calculate the time to read 100 blocks randomly 30
  • 31. Fast Sequential Reading • We assume that blocks are arranged so that there is no rotational delay in transferring from one track to another within the same cylinder. This is possible if consecutive track beginnings are staggered (like running races on circular race tracks) • We also assume that the consecutive blocks are arranged so that when the next block is on an adjacent cylinder, there is no rotational delay after the arm is moved to new cylinder • Fast sequential reading: no rotational delay after finding the first block. 31
  • 32. Consequently … Reading b blocks: i. Sequentially: s + r + b * btt insignificant for large files ⇒ b * btt ii. Randomly: b * (s + r + btt) 32
  • 33. Exercise • Specifications of a 300MB disk drive: – Min seek time = 6ms. – Average seek time = 18ms – Rotational delay = 8.3ms – transfer rate = 16.7 ms/track or 1229 bytes/ms – Bytes per sector = 512 – Sectors per track = 40 – Tracks per cylinder = 12 – Tracks per surface = 1331 – Interleave factor = 1 – Cluster size= 8 sectors – Smallest extent size = 5 clusters Q) How long will it take to read a 2048Kb file that is divided into 8000 256 byte records? i) Access the file sequentially ii) Access the file randomly 33
  • 35. Physical Organization of CD-ROM • Compact Disk – read only memory (write once) • Data is encoded and read optically with a laser • Can store around 600MB data • Digital data is represented as a series of Pits and Lands: – Pit = a little depression, forming a lower level in the track – Land = the flat part between pits, or the upper levels in the track 35
  • 36. Organization of data • Reading a CD is done by shining a laser at the disc and detecting changing reflections patterns. – 1 = change in height (land to pit or pit to land) – 0 = a “fixed” amount of time between 1’s LAND PIT LAND PIT LAND ...------+ +-------------+ +---... |_____| |_______| ..0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 .. • Note : we cannot have two 1’s in a row! => uses Eight to Fourteen Modulation (EFM) encoding table. 36
  • 37. Properties • Note that: Since 0's are represented by the length of time between transitions, we must travel at constant linear velocity (CLV)on the tracks. • Sectors are organized along a spiral • Sectors have same linear length • Advantage: takes advantage of all storage space available. • Disadvantage: has to change rotational speed when seeking (slower towards the outside) 37
  • 38. Addressing • 1 second of play time is divided up into 75 sectors. • Each sector holds 2KB • 60 min CD: 60min * 60 sec/min * 75 sectors/sec = 270,000 sectors = 540,000 KB ~ 540 MB • A sector is addressed by: Minute:Second:Sector e.g. 16:22:34 38