Chapter 11 - Everything

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

A file-control block (FCB)

(an inode in UNIX file systems) contains information about the file, including ownership, permissions, and location of the file contents.

A directory structure

(per file system) is used to organize the files. In UFS, this includes file names and associated inode numbers. In NTFS, it is stored in the master file table.

A boot control block

(per volume) can contain information needed by the system to boot an operating system from that volume. If the disk does not contain an operating system, this block can be empty. It is typically the first block of a volume. In UFS, it is called the boot block. In NTFS, it is the partition boot sector.

A volume control block

(per volume) contains volume (or partition) details, such as the number of blocks in the partition, the size of the blocks, a free-block count and free-block pointers, and a free-FCB count and FCB pointers. In UFS, this is called a superblock. In NTFS, it is stored in the master file table.

Disks provide most of the secondary storage on which file systems are maintained. Two characteristics make them convenient for this purpose:

1. A disk can be rewritten in place; it is possible to read a block from the disk, modify the block, and write it back into the same place. 2. A disk can access directly any block of information it contains. Thus, it is simple to access any file either sequentially or randomly, and switching from one file to another requires only moving the read-write heads and waiting for the disk to rotate.

Provide at least two different approaches for allocating disk blocks to files.

1. Contiguous Allocation - each file occupies a set of contiguous blocks 2. Linked Allocation - each file is a linked list of disk blocks, which may be scattered anywhere on the disk. *3. Indexed Allocation - provides an index block that consolidates all of the file pointers together into one location, the index block.

What two forms of I/O are stored in a unified buffer cache?

1. File data 2. Process pages

The second layer is called the virtual file system (VFS) layer. The VFS layer serves two important functions:

1. It separates file-system-generic operations from their implementation by defining a clean VFS interface. Several implementations for the VFS interface may coexist on the same machine, allowing transparent access to different types of file systems mounted locally. 2. It provides a mechanism for uniquely representing a file throughout a network. The VFS is based on a file-representation structure, called a vnode, that contains a numerical designator for a network-wide unique file. (UNIX inodes are unique within only a single file system.) This network-wide uniqueness is required for support of network file systems. The kernel maintains one vnode structure for each active node (file or directory).

What are the two general approaches for implementing a directory?

1. Linear List - list of file names with pointers to the data blocks. 2. Hash Table - Linear list stores directory entries, but a hash data structure is used; greatly reducing directory search time.

What are the two protocols associated with NFS?

1. Mount Protocol 2. NFS Protocol

File Attributes

1. Name (only information in human readable form) 2. Identifier (unique tag, identifies the file within the file system) 3. Type 4. Size 5. Location 6. Time, date, and user identification

File Access Methods (2)

1. Sequential Access (tape drive model of file) 2. Direct Access (random access / relative access)

What would the bit vector appear as if blocks 0, 3, 4, and 6 were free?

1001101

On disk, the file system may contain information about how to boot an operating system stored there, the total number of blocks, the number and location of free blocks, the directory structure, and individual files. Many of these structures are detailed throughout the remainder of this chapter. Here, we describe them briefly:

A boot control block A volume control block A directory structure A per-file FCB contains many details about the file. It has a unique identifier number to allow association with a directory entry. In NTFS, this information is actually stored within the master file table, which uses a relational database structure, with a row per file.

Multilevel index

A variant of linked representation uses a first-level index block to point to a set of second-level index blocks, which in turn point to the file blocks. To access a block, the operating system uses the first-level index to find a second-level index block and then uses that block to find the desired data block. This approach could be continued to a third or fourth level, depending on the desired maximum file size. With 4,096-byte blocks, we could store 1,024 four-byte pointers in an index block. Two levels of indexes allow 1,048,576 data blocks and a file size of up to 4 GB.

Acyclic-graph directories

Adds the ability to directly share data between users.

external fragmentation

All these algorithms suffer from the problem of _. As files are allocated and deleted, the free disk space is broken into little pieces. _______ exists whenever free space is broken into chunks. It becomes a problem when the largest contiguous chunk is insufficient for a request; storage is fragmented into a number of holes, none of which is large enough to store the data. Depending on the total amount of disk storage and the average file size, _______ may be a minor or a major problem

extended file system

Although Linux supports over forty different file systems, the standard Linux file system is known as the _______, with the most common versions being ext3 and ext4. There are also distributed file systems in which a file system on a server is mounted by one or more client computers across a network.

file-allocation table (FAT)

An important variation on linked allocation is the use of a _____. This simple but efficient method of disk-space allocation was used by the MS-DOS operating system. A section of disk at the beginning of each volume is set aside to contain the table. The table has one entry for each disk block and is indexed by block number. The _____ is used in much the same way as a linked list. The directory entry contains the block number of the first block of the file. The table entry indexed by that block number contains the block number of the next block in the file. This chain continues until it reaches the last block, which has a special end-of-file value as the table entry. An unused block is indicated by a table value of 0. Allocating a new block to a file is a simple matter of finding the first 0-valued table entry and replacing the previous end-of-file value with the address of the new block. The 0 is then replaced with the end-of-file value.

mount table

An in-memory _____ contains information about each mounted volume.

Linked scheme

An index block is normally one disk block. Thus, it can be read and written directly by itself. To allow for large files, we can link together several index blocks. For example, an index block might contain a small header giving the name of the file and a set of the first 100 disk-block addresses. The next address (the last word in the index block) is null (for a small file) or is a pointer to another index block (for a large file).

Combined scheme

Another alternative, used in UNIX-based file systems, is to keep the first, say, 15 pointers of the index block in the file's inode. The first 12 of these pointers point to direct blocks; that is, they contain addresses of blocks that contain data of the file. Thus, the data for small files (of no more than 12 blocks) do not need a separate index block. If the block size is 4 KB, then up to 48 KB of data can be accessed directly. The next three pointers point to indirect blocks. The first points to a single indirect block, which is an index block containing not data but the addresses of blocks that do contain data. The second points to a double indirect block, which contains the address of a block that contains the addresses of blocks that contain pointers to the actual data blocks. The last pointer contains the address of a triple indirect block. (A UNIX inode is shown in Figure 11.9.)Under this method, the number of blocks that can be allocated to a file exceeds the amount of space addressable by the 4-byte file pointers used by many operating systems. A 32-bit file pointer reaches only 232 bytes, or 4 GB. Many UNIX and Linux implementations now support 64-bit file pointers, which allows files and file systems to be several exbibytes in size. The ZFS file system supports 128-bit file pointers.

unified virtual memory

Caching file data using virtual addresses is far more efficient than caching through physical disk blocks, as accesses interface with virtual memory rather than the file system. Several systems—including Solaris, Linux, and Windows—use page caching to cache both process pages and file data.

shapshots

Clones are also efficient, using the same techniques as ______ . In this case, a read-only ______captures the state of the file system, and a clone refers back to that read-only ______. Any writes to the clone are stored in new blocks, and the clone's pointers are updated to refer to the new blocks. The original ______ is unmodified, still giving a view into the file system as it was before the clone was updated. Clones can also be promoted to replace the original file system; this involves throwing out all of the old pointers and any associated old blocks. Clones are useful for testing and upgrades, as the original version is left untouched and the clone deleted when the test is done or if the upgrade fails.

log-based transaction-oriented (or journaling)

Computer scientists often find that algorithms and technologies originally used in one area are equally useful in other areas. Such is the case with the database log-based recovery algorithms. These logging algorithms have been applied successfully to the problem of consistency checking. The resulting implementations are known as ______ file systems.

File Operations

Create, write, read, reposition within file, delete, and truncate.

chained-overflow hash table.

Each hash entry can be a linked list instead of an individual value, and we can resolve collisions by adding the new entry to the linked list. Lookups may be somewhat slowed, because searching for a name might require stepping through a linked list of colliding table entries. Still, this method is likely to be much faster than a linear search through the entire directory.

True or False? The UNIX inode is an example of linked allocation.

False; the UNIX inode is an example of indexed allocation.

bit map or bit vecto

Frequently, the free-space list is implemented as a bit map or bit vector. Each block is represented by 1 bit. If the block is free, the bit is 1; if the block is allocated, the bit is 0.

transaction

Fundamentally, all metadata changes are written sequentially to a log. Each set of operations for performing a specific task is a ______. Once the changes are written to this log, they are considered to be committed, and the system call can return to the user process, allowing it to continue execution. Meanwhile, these log entries are replayed across the actual file-system structures. As the changes are made, a pointer is updated to indicate which actions have completed and which are still incomplete.

Open-file Table

Global table maintained containing process independent open file information.

Indexed allocation

Linked allocation solves the external-fragmentation and size-declaration problems of contiguous allocation. However, in the absence of a FAT, linked allocation cannot support efficient direct access, since the pointers to the blocks are scattered with the blocks themselves all over the disk and must be retrieved in order. _____ solves this problem by bringing all the pointers together into one location: the index block.

This point raises the question of how large the index block should be. Every file must have an index block, so we want the index block to be as small as possible. If the index block is too small, however, it will not be able to hold enough pointers for a large file, and a mechanism will have to be available to deal with this issue. Mechanisms for this purpose include the following:

Linked scheme. Multilevel index. Combined scheme.

Open File Locking

Mediates access to a file (shared or exclusive) *Mandatory - access denied dependent upon the locks held and requested. *Advisory - process can find the status of locks and decide what to do.

UNIX systems refer to it as a file descriptor; Windows refers to it as a file handle.

Next, an entry is made in the per-process open-file table, with a pointer to the entry in the system-wide open-file table and some other fields. These other fields may include a pointer to the current location in the file (for the next read() or write() operation) and the access mode in which the file is open. The open() call returns a pointer to the appropriate entry in the per-process file-system table. All file operations are then performed via this pointer. The file name may not be part of the open-file table, as the system has no use for it once the appropriate FCB is located on disk. It could be cached, though, to save time on subsequent opens of the same file. The name given to the entry varies.

page cache

Other systems cache file data using a ______. The page cache uses virtual memory techniques to cache file data as pages rather than as file-system-oriented blocks.

The NFS protocol provides a set of RPCs for remote file operations. The procedures support the following operations:

Searching for a file within a directory Reading a set of directory entries Manipulating links and directories Accessing file attributes Reading and writing files

free-space list

Since disk space is limited, we need to reuse the space from deleted files for new files, if possible. (Write-once optical disks allow only one write to any given sector, and thus reuse is not physically possible.) To keep track of free disk space, the system maintains a ______. The ______ records all free disk blocks—those not allocated to some file or directory. To create a file, we search the ______ for the required amount of space and allocate that space to the new file. This space is then removed from the ______. When a file is deleted, its disk space is added to the free-space list. The ______may not be implemented as a list.

buffer cache

Some systems maintain a separate section of main memory for a ______, where blocks are kept under the assumption that they will be used again shortly.

unified buffer cache

Some versions of UNIX and Linux provide a ______. To illustrate the benefits of the unified buffer cache, consider the two alternatives for opening and accessing a file. One approach is to use memory mapping; the second is to use the standard system calls read() and write(). Without a unified buffer cache. Here, the read() and write() system calls go through the buffer cache. The memory-mapping call, however, requires using two caches—the page cache and the buffer cache. A memory mapping proceeds by reading in disk blocks from the file system and storing them in the buffer cache. Because the virtual memory system does not interface with the buffer cache, the contents of the file in the buffer cache must be copied into the page cache. This situation, known as double caching, requires caching file-system data twice. Not only does it waste memory but it also wastes significant CPU and I/O cycles due to the extra data movement within system memory. In addition, inconsistencies between the two caches can result in corrupt files. In contrast, when a unified buffer cache is provided, both memory mapping and the read() and write() system calls use the same page cache. This has the benefit of avoiding double caching, and it allows the virtual memory system to manage file-system data.

Consistency Semantics

Specifies how multiple users are to access a shared file system simultaneously.

Partitions

Subdivisions of a disk. *can be used raw (without a file system) or formatted (with a file system)

NFS protocol

The NFS specification distinguishes between the services provided by a mount mechanism and the actual remote-file-access services. Accordingly, two separate protocols are specified for these services: a mount protocol and a protocol for remote file accesses, the ______. The protocols are specified as sets of RPCs. These RPCs are the building blocks used to implement transparent remote file access.

dynamic storage-allocation

The contiguous-allocation problem can be seen as a particular application of the general _____ problem, which involves how to satisfy a request of size n from a list of free holes. First fit and best fit are the most common strategies used to select a free hole from the set of available holes. Simulations have shown that both first fit and best fit are more efficient than worst fit in terms of both time and storage utilization. Neither first fit nor best fit is clearly best in terms of storage utilization, but first fit is generally faster.

The four main object types defined by the Linux VFS are:

The inode object, which represents an individual file The file object, which represents an open file The superblock object, which represents an entire file system The dentry object, which represents an individual directory entry

Linked allocation does have disadvantages

The major problem is that it can be used effectively only for sequential-access files. To find the ith block of a file, we must start at the beginning of that file and follow the pointers until we get to the ith block. Each access to a pointer requires a disk read, and some require a disk seek. Consequently, it is inefficient to support a direct-access capability for linked-allocation files.

linear list

The simplest method of implementing a directory is to use a _____ of file names with pointers to the data blocks. This method is simple to program but time-consuming to execute. To create a new file, we must first search the directory to be sure that no existing file has the same name. Then, we add a new entry at the end of the directory. To delete a file, we search the directory for the named file and then release the space allocated to it. To reuse the directory entry, we can do one of several things. We can mark the entry as unused (by assigning it a special name, such as an all-blank name, or by including a used-unused bit in each entry), or we can attach it to a list of free directory entries. A third alternative is to copy the last entry in the directory into the freed location and to decrease the length of the directory. A linked list can also be used to decrease the time required to delete a file.

clusters

The usual solution to this problem is to collect blocks into multiples, called _____, and to allocate _____rather than blocks. For instance, the file system may define a _____ as four blocks and operate on the disk only in _____ units. Pointers then use a much smaller percentage of the file's disk space. This method allows the logical-to-physical block mapping to remain simple but improves disk throughput (because fewer disk-head seeks are required) and decreases the space needed for block allocation and free-list management. The cost of this approach is an increase in internal fragmentation, because more space is wasted when a _____ is partially full than when a block is partially full. _____ can be used to improve the disk-access time for many other algorithms as well, so they are used in most file systems.

Another alternative to consistency checking is employed by Network Appliance's WAFL file system and the Solaris ZFS file system.

These systems never overwrite blocks with new data. Rather, a transaction writes all data and metadata changes to new blocks. When the transaction is complete, the metadata structures that pointed to the old versions of these blocks are updated to point to the new blocks. The file system can then remove the old pointers and the old blocks and make them available for reuse. If the old pointers and blocks are kept, a snapshot is created; the snapshot is a view of the file system before the last update took place. This solution should require no consistency checking if the pointer update is done atomically. WAFL does have a consistency checker, however, so some failure scenarios can still cause metadata corruption.

blocks

To improve I/O efficiency, I/O transfers between memory and disk are performed in units of _____. Each _____ has one or more sectors. Depending on the disk drive, sector size varies from 32 bytes to 4,096 bytes; the usual size is 512 bytes.

File

Uniform logical view of information storage. The smallest allotment of nameable storage. *structure is decided by the Operating System and/or program

circular buffer

When an entire committed transaction is completed, it is removed from the log file, which is actually a circular buffer. A ______ writes to the end of its space and then continues at the beginning, overwriting older values as it goes. We would not want the buffer to write over data that had not yet been saved, so that scenario is avoided. The log may be in a separate section of the file system or even on a separate disk spindle. It is more efficient, but more complex, to have it under separate read and write heads, thereby decreasing head contention and seek times.

With read-ahead,

a requested page and several subsequent pages are read and cached. These pages are likely to be requested after the current page is processed. Retrieving these data from the disk in one transfer and caching them saves a considerable amount of time. One might think that a track cache on the controller would eliminate the need for read-ahead on a multiprogrammed system. However, because of the high latency and overhead involved in making many small transfers from the track cache to main memory, performing a read-ahead remains beneficial.

If a system crashes,

all transactions in the log file were not completed to the file system.

dual-booted

allowing us to install multiple operating systems on a single system. How does the system know which one to boot? A boot loader that understands multiple file systems and multiple operating systems can occupy the boot space. Once loaded, it can boot one of the operating systems available on the disk. The disk can have multiple partitions, each containing a different type of file system and a different operating system.

NFS Network file systems

are commonplace. They are typically integrated with the overall directory structure and interface of the client system. ______is a good example of a widely used, well implemented client-server network file system. Here, we use it as an example to explore the implementation details of network file systems. ______ is both an implementation and a specification of a software system for accessing remote files across LANs (or even WANs). ______ is part of ONC+, which most UNIX vendors and some PC operating systems support. The implementation described here is part of the Solaris operating system, which is a modified version of UNIX SVR4. It uses either the TCP or UDP/IP protocol (depending on the interconnecting network). The specification and the implementation are intertwined in our description of ______ . Whenever detail is needed, we refer to the Solaris implementation; whenever the description is general, it applies to the specification also.

The system-wide open-file table

contains a copy of the FCB of each open file, as well as other information.

The per-process open-file table

contains a pointer to the appropriate entry in the system-wide open-file table, as well as other information.

back up

data from disk to another storage device, such as a magnetic tape or other hard disk. Recovery from the loss of an individual file, or of an entire disk, may then be a matter of restoring the data from backup.

The mount protocol

establishes the initial logical connection between a server and a client. In Solaris, each machine has a server process, outside the kernel, performing the protocol functions.

UNIX treats a directory

exactly the same as a file.

What is the name of the standard Linux file system?

extended file system (ext3 / ext4)

The write-anywhere file layout (WAFL)

from Network Appliance is an example of this sort of optimization. ______ is a powerful, elegant file system optimized for random writes. ______ is used exclusively on network file servers produced by Network Appliance and is meant for use as a distributed file system. It can provide files to clients via the NFS, CIFS, ftp, and http protocols, although it was designed just for NFS and CIFS. When many clients use these protocols to talk to a file server, the server may see a very large demand for random reads and an even larger demand for random writes. The NFS and CIFS protocols cache data from read operations, so writes are of the greatest concern to file-server creators. ______ is used on file servers that include an NVRAM cache for writes. The ______ designers took advantage of running on a specific architecture to optimize the file system for random I/O, with a stable-storage cache in front. Ease of use is one of the guiding principles of ______ . Its creators also designed it to include a new snapshot functionality that creates multiple read-only copies of the file system at different points in time, as we shall see.

What is the name of the consistency checker program for UNIX systems?

fsck

The direct-access nature of disks

gives us flexibility in the implementation of files. In almost every case, many files are stored on the same disk. The main problem is how to allocate space to these files so that disk space is utilized effectively and files can be accessed quickly. Three major methods of allocating disk space are in wide use: contiguous, linked, and indexed. Each method has advantages and disadvantages. Although some systems support all three, it is more common for a system to use one method for all files within a file-system type.

An in-memory directory-structure cache

holds the directory information of recently accessed directories. For directories at which volumes are mounted, it can contain a pointer to the volume table.

Path-name translation

in NFS involves the parsing of a path name such as /usr/local/dir1/file.txt into separate directory entries, or components: (1) usr,(2) local, and (3) dir1. Path-name translation is done by breaking the path into component names and performing a separate NFS lookup call for every pair of component name and directory vnode. Once a mount point is crossed, every component lookup causes a separate RPC to the server. This expensive path-name-traversal scheme is needed, since the layout of each client's logical name space is unique, dictated by the mounts the client has performed. It would be much more efficient to hand a server a path name and receive a target vnode once a mount point is encountered. At any point, however, there might be another mount point for the particular client of which the stateless server is unaware.

This boot loader

in turn knows enough about the file-system structure to be able to find and load the kernel and start it executing. It can contain more than the instructions for how to boot a specific operating system.

What is the UNIX term for a file control block?

inode

The function table lists the addresses of the actual functions that implement the defined operations for that particular object. For example, an abbreviated API for some of the operations for the file object includes:

int open(...)—Open a file. int close(...)—Close an already-open file. ssize_t read(...)—Read from a file. ssize_t write(...)—Write to a file. int mmap(...)—Memory-map a file.

An advantage of the sorted list

is that a sorted directory listing can be produced without a separate sort step.

The real disadvantage of a linear list of directory entries

is that finding a file requires a linear search. Directory information is used frequently, and users will notice if access to it is slow. In fact, many operating systems implement a software cache to store the most recently used directory information. A cache hit avoids the need to constantly reread the information from disk. A sorted list allows a binary search and decreases the average search time. However, the requirement that the list be kept sorted may complicate creating and deleting files, since we may have to move substantial amounts of directory information to maintain a sorted directory. A more sophisticated tree data structure, such as a balanced tree, might help here.

One strategy for preventing loss of significant amounts of disk space to external fragmentation

is to copy an entire file system onto another disk. The original disk is then freed completely, creating one large contiguous free space. We then copy the files back onto the original disk by allocating contiguous space from this one large hole. This scheme effectively compacts all free space into one contiguous space, solving the fragmentation problem. The cost of this compaction is time, however, and the cost can be particularly high for large hard disks. Compacting these disks may take hours and may be necessary on a weekly basis. Some systems require that this function be done off-line, with the file system unmounted. During this down time, normal system operation generally cannot be permitted, so such compaction is avoided at all costs on production machines. Most modern systems that need defragmentation can perform it on-line during normal system operations, but the performance penalty can be substantial.

Raw disk

is used where no file system is appropriate. UNIX swap space can use a raw partition, for example, since it uses its own format on disk and does not use a file system. Likewise, some databases use ______ and format the data to suit their needs. ______ can also hold information needed by disk RAID systems, such as bit maps indicating which blocks are mirrored and which have changed and need to be mirrored. Similarly, ______ can contain a miniature database holding RAID configuration information, such as which disks are members of each RAID set.

The major difficulties with a hash table are

its generally fixed size and the dependence of the hash function on that size.

The file-organization module

knows about files and their logical blocks, as well as physical blocks. By knowing the type of file allocation used and the location of the file, the file-organization module can translate logical block addresses to physical block addresses for the basic file system to transfer. Each file's logical blocks are numbered from 0 (or 1) through N. Since the physical blocks containing the data usually do not match the logical numbers, a translation is needed to locate each block. The file-organization module also includes the free-space manager, which tracks unallocated blocks and provides these blocks to the file-organization module when requested.

The I/O control

level consists of device drivers and interrupt handlers to transfer information between the main memory and the disk system. A device driver can be thought of as a translator. Its input consists of high-level commands such as "retrieve block 123." Its output consists of low-level, hardware-specific instructions that are used by the hardware controller, which interfaces the I/O device to the rest of the system. The device driver usually writes specific bit patterns to special locations in the ______ ler's memory to tell the controller which device location to act on and what actions to take.

logical file system

manages metadata information. Metadata includes all of the file-system structure except the actual data (or contents of the files). The ______ manages the directory structure to provide the file-organization module with the information the latter needs, given a symbolic file name. It maintains file structure via file-control blocks. The ______ is also responsible for protection,

The in-memory information is used for both file-system management and performance improvement via caching. The data are loaded at mount time, updated during file-system operations, and discarded at dismount. Several types of structures may be included.

mount table An in-memory directory-structure cache The system-wide open-file table The per-process open-file table Buffers

The basic file system

needs only to issue generic commands to the appropriate device driver to read and write physical blocks on the disk. Each physical block is identified by its numeric disk address. This layer also manages the memory buffers and caches that hold various file-system, directory, and data blocks. A block in the buffer is allocated before the transfer of a disk block can occur. When the buffer is full, the buffer manager must find more buffer memory or free up buffer space to allow a requested I/O to complete. Caches are used to hold frequently used file-system metadata to improve performance, so managing their contents is critical for optimum system performance.

Synchronous writes

occur in the order in which the disk subsystem receives them, and the writes are not buffered. Thus, the calling routine must wait for the data to reach the disk drive before it can proceed.

Disk blocks are made up of

one or more sectors.

File systems

provide efficient and convenient access to the disk by allowing data to be stored, located, and retrieved easily. A ______ poses two quite different design problems. The first problem is defining how the file system should look to the user. This task involves defining a file and its attributes, the operations allowed on a file, and the directory structure for organizing files. The second problem is creating algorithms and data structures to map the logical file system onto the physical secondary-storage devices.

Free-behind

removes a page from the buffer as soon as the next page is requested. The previous pages are not likely to be used again and waste buffer space.

Contiguous allocation

requires that each file occupy a set of contiguous blocks on the disk. Disk addresses define a linear ordering on the disk. With this ordering, assuming that only one job is accessing the disk, accessing block b + 1 after block b normally requires no head movement. When head movement is needed (from the last sector of one cylinder to the first sector of the next cylinder), the head need only move from one track to the next. Thus, the number of disk seeks required for accessing ______ files is minimal, as is seek time when a seek is finally needed.

Linked allocation

solves all problems of contiguous allocation. With linked allocation, each file is a linked list of disk blocks; the disk blocks may be scattered anywhere on the disk. The directory contains a pointer to the first and last blocks of the file.

hash table

takes a value computed from the file name and returns a pointer to the file name in the linear list. Therefore, it can greatly decrease the directory search time.

The server maintains an export list

that specifies local file systems that it exports for mounting, along with names of machines that are permitted to mount them. (In Solaris, this list is the /etc/dfs/dfstab, which can be edited only by a superuser.) The specification can also include access rights, such as read only. To simplify the maintenance of export lists and mount tables, a distributed naming scheme can be used to hold this information and make it available to appropriate clients.

In an asynchronous write

the data are stored in the cache, and control returns to the caller. Most writes are asynchronous. However, metadata writes, among others, can be synchronous. Operating systems frequently include a flag in the open system call to allow a process to request that writes be performed synchronously. For example, databases use this feature for atomic transactions, to assure that data reach stable storage in the required order.

What does the acronym VFS refer to?

virtual file system

The root partition

which contains the operating-system kernel and sometimes other system files, is mounted at boot time. Other volumes can be automatically mounted at boot or manually mounted later, depending on the operating system. As part of a successful mount operation, the operating system verifies that the device contains a valid file system. It does so by asking the device driver to read the device directory and verifying that the directory has the expected format. If the format is invalid, the partition must have its consistency checked and possibly corrected, either with or without user intervention. Finally, the operating system notes in its in-memory mount table that a file system is mounted, along with the type of the file system. The details of this function depend on the operating system.

UNIX uses the UNIX file system (UFS),

which is based on the Berkeley Fast File System (FFS). Windows supports disk file-system formats of FAT, FAT32, and NTFS (or Windows NT File System), as well as CD-ROM and DVD file-system formats.

What does the acronym WAFL stand for?

write-anwhere file layout - a powerful, elegant file system optimized for random writes and used exclusively on network file servers with distributed file systems.

The consistency checker

—a systems program such as fsck in UNIX—compares the data in the directory structure with the data blocks on disk and tries to fix any inconsistencies it finds.


Set pelajaran terkait

Prehospital Emergency Care Chapter 15

View Set

Business Communications: Chapter 18

View Set

OPTE Review from Hobson Clinical A

View Set

Are we naturally good or bad? part 2

View Set

Adult and Elder exam 3 Jimmy questions

View Set