file structures 2

Upload: raghurammullapudi

Post on 18-Jan-2016

222 views

Category:

Documents


1 download

DESCRIPTION

File Structures 2

TRANSCRIPT

  • Chapter 2 :Secondary Storage and system software File Structures

    *B.Meena,Asst.Prof.,IT Dept,ANITS

  • DisksMagnetic TapeDisk versus TapeIntroduction to CD-ROMPhysical organization of CD-ROMCD-ROM strengths and weaknessStorage as HierarchyByte journeyBuffer Management

    Topics under discussion*B.Meena,Asst.Prof.,IT Dept,ANITS

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • B.Meena,Asst.Prof.,IT Dept,ANITS*

    DISCDISKrefers to optical mediarefers to magnetic mediaaudio CD, CD-ROM, DVD-ROM, DVD-RAM, or DVD-Video discfloppy disk, disk in your computer's hard drive, an external hard drive. All discs are removable Disks are always rewritable unless intentionally locked or write-protected.

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • DISKSB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • B.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • B.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • B.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • B.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • B.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • B.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • Organization of disksEstimating the capacitiesOrganizing tracks by sectors Organizing tracks by blocksNon data overheadThe cost of disk accessEffect of block size on performanceDisk as bottle neck

    Disks : topic under DisksB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • B.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • Disk organizationB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • B.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • Track capacity = no.of sectors * byes per sectorCylinder capacity= no.of tracks per cylinder * track capacityDrive capacity = number .of cylinders * cylinder capacity

    Estimating the capacitiesB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • Block :often refers to a collection of recordsMay be collection of sectorsSome times called as physical recordSector is sometimes called a blockBlocking factor : no. of records stored per block

    Key termsB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • B.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • Physical placement of sectorsThis is another view of sectorsHaving adjacent sectors Having interleaving factor32 sector track

    Organizing tracks by sectorB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • ClustersWhen a file is requested it get s from file managerFile manager maps by viewing it from series of clustersDecided by system administratorEg : like 3 512-byte sector per cluster

    B.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • ExtentsPhysical continuous sectors with a min seek timeEfficient when a file to be processed sequentially

    B.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • FragmentationSector size : 512 bytesRecord size : 300 bytesLoss of space with in the sector : internal fragmentation

    B.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • Block : group of sectorsNot always divided into sectors Some times divided into blocks of variable sizeBlocking factor : indicates no. of records

    Organization of tracks by blocksB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • Blocks and sectors require certain amount of space take up called as non data over headE.g. : index pages in the text book

    Non data overheadB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • Disk access is divided into three physical operationsSeek time : time required to move the access arm to the correct cylinderRotational delay : the time it takes for the disk to rotate so the sector we want is under the r/w headTransfer time : rotation time X ( no.of bytes transferred/no of bytes on a track)

    Cost of the disk accessB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • A file of 87,04,000 byte (34000 * 256 )Is divided into 34,000 records of each 256 byte1 cluster holds 16 records 16 * 256 = 4096 byte cluster size Now 4096 byte sector occupies 100 tracksIt means the disk needs 100 tracks to hold 8704 KB Experimenting on reading the file in sequence and random gave a result as

    An experiment on timing computationsB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • B.Meena,Asst.Prof.,IT Dept,ANITS*

    OPERATIONSSEQUENTIALRANDOMAverage seek8 msec8 msecRotational delay3 msec3 msecRead one track6 msec0.28 msectotal17 msec11.28 msecDrive (100 tracks)100 * 17 msec

    =1.7 sec34000 sectors * 11.28 msec=9.25 sec

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • Effect of block size on performance :unixB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • TechniquesMultiprogramming : using multithreading in java etcStriping : involves splitting into parts (like IDM)Buffering using disk cache

    Disk as bottle neckB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • Organization of disksEstimating the capacitiesOrganizing tracks by sectors Organizing tracks by blocksNon data overheadThe cost of disk accessEffect of block size on performanceDisk as bottle neck

    Topics covered under DisksB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • Are compact Stand up well in different environmental conditionsEasy to store and transportLess expensive than diskUsed many years ago

    Magnetic tapeB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • Types of the tape systemHigh performance tape systemData organization on 9-track tapesEstimation of tape lengthEstimating data transmission

    Tape : Topic under discussionB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • B.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • B.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • B.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • SD3 storage tek redwood1997Configured in silo has storage racks , tape robot , multiple tape drivesTapes formatted with helical racksCartridge 4 by 4 inchTape 1 and half inch50 GB , Avg seek time 53 sec , load time 17 sec Read write full tape 75 minMounted in 2 min

    High performance tape systemB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • Organization of data on 9 track tapeB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • B.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • Tape density 800,1600 or 6250 bits per inch per trackTape speed 30 to 200 inches per secSize of inter block gap 0.3 inch and 0.75 inch

    Performance difference in 3 quantities B.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • S=n X (b+g)n is number of data blocks , b physical length of a data block , g is length of an interblock gapLength of each block = blocksize (bytes per block ) / tape density (bpi)

    Estimating tape lengthB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • Nominal recording densityOther factors : Speed, gap size, Nominal rate = tape density (bpi) X tape speed (ips)

    Estimating data transmissionB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • Disk versus tapeB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • B.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • Types of the tape systemHigh performance tape systemData organization on 9-track tapesEstimation of tape lengthEstimating data transmissionDisk vs tape

    Tape : Topic coveredB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • HistoryCompact disc Read only memoryOffspring of video disc technology1960 1970Surviving format is laser visionCompanies : sony , philips ,moserbearCd rom file structure problemTo index a text bookMemory access 20 secMagnetic Disk access takes 2 monthsCD-ROM stretches to 2 and half years

    Introduction to CD-ROMB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • Compact Disc Read Only Memory. A compact disc format that is used to hold text, graphics, and hi-fi stereo sound.

    What is CD-ROM

    B.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • Sony of Japan and Philips of the Netherlands developed the compact disc (CD)A small hard plastic disc that could be economically produced in large quantities. CD-Audio was the first application for this new technology. CD-Audio was very successfulWhen CD-ROM was designed, the industry recognized the need for standards and developed ISO 9660 as the base standard for all CD-ROMs.

    History of CD-ROM

    B.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • Data is placed on the CD-ROM in the form of small pits recorded in a spiral track starting at the centre of the CD- ROM and working to the outer edge. If the data track of a CD-ROM could be stretched out it would be about 4.5Km long.

    AttributesB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • Reading pits and landsCLV instead of CAVAddressingStructure of a sector

    Physical organization of CD-ROMB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • Reading pits and landsCD ROM are stamped from a master discMaster disc is made of glassIt has a coating changed by laser beamWhen hit by laser turns to pit and landThe smooth unchanged areas between pits is called as land

    B.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • B.Meena,Asst.Prof.,IT Dept,ANITS*s

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • B.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • B.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • According to philps/sony standardCD is divided into 75 sectors each hold 2KB data earlierNow blue ray 25 GB 50 GBDVD 9 GB Sony announces 1 TB of blue

    addressingB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • B.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • B.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • Structure of a sector : CD ROMB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • Seek Performance: very bad Data Transfer Rate: Not Terrible/Not Great Storage Capacity: Great Benefit: enables us to build indexes and other support structures that can help overcome some of the limitations associated with CD-ROMs poor performance. Read-Only Access: There cant be any changes ==> File organization can be optimized. No need for interaction with the user (which requires a quick response)

    CD-ROM Strengths & WeaknessesB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

  • Storage as hierarchyB.Meena,Asst.Prof.,IT Dept,ANITS*

    B.Meena,Asst.Prof.,IT Dept,ANITS

    *B.Meena,Asst.Prof.,IT Dept,ANITSB.Meena,Asst.Prof.,IT Dept,ANITS