+ All Categories
Home > Documents > Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to...

Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to...

Date post: 18-Jan-2018
Category:
Upload: kelly-carroll
View: 234 times
Download: 0 times
Share this document with a friend
Description:
File systems are used on data storage devices, such asdata storage devices I.hard disk drives,hard disk drives II.floppy disks,floppy disks III.optical discs, oroptical discs IV.flash memory storage devices,flash memory to maintain the physical locations of the computer files.computer files They may provide access to data on a file server by acting as clients for a network protocol (e.g. NFS, SMB, or 9P clients),file servernetwork protocolNFSSMB9P SECONDARY STORAGE 3
25
Logically Physically Access time FILE SYSTEMS 1
Transcript
Page 1: Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to organize data expected to be retained after a program terminates.

1

LogicallyPhysicallyAccess time

FILE SYSTEMS

Page 2: Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to organize data expected to be retained after a program terminates.

2

A file system (or file system) is a means to organize data expected to be retained after a program terminates by providing procedures to store, retrieve and update data as well as manage the available space on the device(s) which contain it.

A file system organizes data in an efficient manner and is tuned to the specific characteristics of the device.

A tight coupling usually exists between the operating system and the file system

FILE SYSTEM

Page 4: Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to organize data expected to be retained after a program terminates.

4

A file name (or filename) is used to reference the storage location in the file system. Most file systems have restrictions on the length of the filename

Most file system interface utilities have special characters that you cannot normally use in a filename (the file system may use these special characters to indicate a device, device type, directory prefix or file type).

Some file system utilities, editors and compilers treat prefixes and suffixes in a special way. These are usually merely conventions and not implemented within the file system.

FILE NAMES

Page 5: Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to organize data expected to be retained after a program terminates.

5

File systems typically have directories (sometimes called folders) which allow the user to group files.

This may be implemented by connecting the file name to an index in a table of contents or an inode in a Unix-like file system.

Directory structures may be flat (i.e. linear), or allow hierarchies where directories may contain subdirectories.

DIRECTORIES (FOLDERS)

Page 6: Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to organize data expected to be retained after a program terminates.

6

Other bookkeeping information is typically associated with each file within a file system.

The length of the data contained in a file may be stored as the number of blocks allocated for the file or as a byte count.

The time that the file was last modified may be stored as the file's timestamp. File systems might store the file creation time, the time it was last accessed, the time the file's meta-data was changed, or the time the file was last backed up.

METADATA (DATA ABOUT DATA)

Page 7: Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to organize data expected to be retained after a program terminates.

7

File systems include utilities to initialize, alter parameters of and remove an instance of the file system.

Directory utilities create, rename and delete directory entries and alter metadata associated with a directory.

File utilities create, list, copy, move and delete files, and alter metadata. They may be able to truncate data, truncate or extend space allocation, append to, move, and modify files in-place.

Also in this category are utilities to free space for deleted files if the file system provides an undelete function.

UTILITIES

Page 8: Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to organize data expected to be retained after a program terminates.

8

There are several mechanisms used by file systems to control access to data.

Usually the intent is to prevent reading or modifying files by a user or group of users.

Another reason is to ensure data is modified in a controlled way so access may be restricted to a specific program.

Examples include passwords stored in the metadata of the file or elsewhere and file permissions in the form of permission bits, access control lists, or capabilities.

ACCESS AND PERMISSION

Page 9: Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to organize data expected to be retained after a program terminates.

9

The most important purpose of a file system is to manage user data. This includes storing, retrieving and updating data.

Some file systems accept data for storage as a stream of bytes which are collected and stored in a manner efficient for the media.

When a program retrieves the data it specifies the size of a memory buffer and the file system transfers data from the media to the buffer

USER DATA

Page 10: Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to organize data expected to be retained after a program terminates.

10

A disk file system takes advantages of the ability of disk storage media to randomly address data in a short amount of time.

Additional considerations include the speed of accessing data following that initially requested and the anticipation that the following data may also be requested.

DISK FILE SYSTEMS

Page 11: Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to organize data expected to be retained after a program terminates.

11

A network file system is a file system that acts as a client for a remote file access protocol, providing access to files on a server.

Examples of network file systems include clients for the NFS, AFS, SMB protocols.

NFSI. Network File System (NFS) is a distributed file system protocol

originally developed by Sun Microsystems in 1984, [ 1 ] al lowing a user on a cl ient computer to access files over a network in a manner similar to how local storage is accessed.

II. NFS, l ike many other protocols, builds on the Open Network Computing Remote Procedure Call (ONC RPC) system.

III. The Network Fi le System is an open standard defined in RFCs, al lowing anyone to implement the protocol.

NETWORK FILE SYSTEM

Page 12: Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to organize data expected to be retained after a program terminates.

12

SECTORS AND TRACKS

Page 13: Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to organize data expected to be retained after a program terminates.

13

CONTIGUOUS FILES

Page 14: Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to organize data expected to be retained after a program terminates.

14

LINKED FILES

Page 15: Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to organize data expected to be retained after a program terminates.

15

Fi les stored on a round rotating disk with a moveable read/write head wil l take some time to access the data. The access t ime is modeled by: T = m*n + s T = estimated seek timen = number of tracks traversed.m = constant that depends on the disk drive.s = startup t ime For example, an inexpensive hard disk on a personal computer might be approximated by m = 0.3 ms, s = 20 ms, while more expensive disk drive might have m = 0.1 ms and s = 3ms.

Rotational delay, typical ly disks rotate at 3600 rpm, which is 16.7 ms. Which is on average 8.35 ms.  

FILE SEEK TIME

Page 16: Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to organize data expected to be retained after a program terminates.

16

 Transfer time can be modeled as: T = b/rN T = transfer timeb = number of bytes to be transferredN = number of bytes on a trackr = rotation speed, in revolutions per second The total average access time can be expressed at:T = (seek time) + (rotational delay) + (Transfer time)= (m*n + s )+ (1/2r) + (b/rN)

FILE TRANSFER TIME/TOTAL TIME

Page 17: Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to organize data expected to be retained after a program terminates.

17

FCFS (First-Come-First-Serve) There is no reordering of the queue. SSTF (Shortest-Seek-Time-First)Disk arm is posit ioned next at the request ( inward or outward) that minimizes arm movement SCANDisk arm sweeps back and forth across the disk surface, serving all requests in its path. It changes direction only when there are no more requests to service in the current direction. C-SCAN (Circular-SCAN)Disk arm moves unidirectional across the disk surface toward the inner track. When there are no more requests for service ahead of the arm, it jumps back to surface the request nearest the outer track and proceeds inward again. N-Step scanDisk arm sweeps back and forth as in SCAN, but al l requests that arrive during a sweep in one direction are batched and reordered for optimal service during the return sweep.

SEEK TIME ALGORITHMS

Page 18: Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to organize data expected to be retained after a program terminates.

18

Contiguous AllocationFi les are ass igned to contiguous areas of secondary storage. A user specifies in advance the s ize of the area needed to hold a file to be created. I f the des ired amount of cont iguous space is not avai lab le, the fi le cannot be created. Non-Contiguous Al locationBecause files tend to grow and shr ink al l the t ime, the need for dynamic noncontiguous storage al locat ion is needed. Sector-Oriented Linked AllocationDisks are view as individual sectors. Fi les are a l inked l is t of Sectors. Each sector has a pointer to the next sector in the file. Block AllocationBlocks of cont iguous sectors (sometime cal led extents) are al located to the fi le . Block chaining

Each block has a pointer to the next block. Index block Chaining A fixed s ize block containing the pointers to the actual b locks in the file is maintained. I f there are more blocks in the file than the index b lock can hold than a chain of index blocks wi l l be created. Therefore each index block must have a pointer to the next index b lock.

DISK SPACE ALLOCATION

Page 19: Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to organize data expected to be retained after a program terminates.

19

Most common form of file structure is sequential. All records are the same length, consisting of the same number of fixed-length fields in a particular order.

Key field – Usually the first field, the key uniquely identifies each record in the file. Keys are in either in alphabetical or numerical order.

Sequential files are usually used in batch processing of records

Easily stored on disk or tape.

A log file is used to capture records that are added to the file. Periodically, a batch update is performed that merges the log file with the master file to produce a new file in correct key sequence.

FILE TYPE: SEQUENTIAL

Page 20: Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to organize data expected to be retained after a program terminates.

20

Similar to the sequential Files but with 2 additions:

An index table contains each key value and a pointer to the corresponding record in that file on disk.

The overflow file which is similar to the log file of sequential records, but is integrated so that records in the overflow file are located by following a pointer from their predecessor record.

This greatly reduces the access time of individual records without giving up the sequential nature of the file.

FILE TYPE INDEXED SEQUENTIAL

Page 21: Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to organize data expected to be retained after a program terminates.

21

Files where the records do not have any particular order. There are indexes (may be more that one) that are used to access the records.

FILE TYPE: MULTIPLE INDEX FILES

Page 22: Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to organize data expected to be retained after a program terminates.

22

Records are directly (randomly) access by their physical address on the direct access storage device (DASD). The application user places the records on the DASD in any order appropriate for a particular application. Hashing techniques are often locating data in a Direct access file.

Direct Access Files exploit the capability found on disks to access directly any block of a known address. A key field is required in each record. There is no order to the records.

FILE TYPE: DIRECT ACCESS

Page 23: Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to organize data expected to be retained after a program terminates.

23

Fixed BlockingFixed length records are used, and an integral number of records are stored in a block. There may be unused space at the end of each block. Variable-length spanned blockingVariable-length records are used, and are packed intoblocks with no unused space. Thus, some records must span two blocks, with the continuation indicated by a pointer to the successor block. Variable-length unspanned blockingVariable-length records are used, but spanning is not employed. There is wasted space in most blocks because of the inability to use the remainder of the block if the next records is larger that the remaining unused space.

RECORD BLOCKING

Page 24: Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to organize data expected to be retained after a program terminates.

24

Queued AccessUsed when the sequence in which records are to

be processed can be anticipated, such as in sequential and indexed sequential accessing. The queued methods perform anticipated buffering and scheduling of I/O operations. They try to have the next record available for processing as soon as the previous one is processed.

Basic AccessUsed when the sequence in which records are to

be processed cannot be anticipated.

ACCESS METHODS

Page 25: Logically Physically Access time FILE SYSTEMS 1. A file system (or file system) is a means to organize data expected to be retained after a program terminates.

25

RAID(REDUNDANT ARRAY OF

INEXPENSIVE DISKS)


Recommended