File Systems

Ace your homework & exams now with Quizwiz!

What are the two types of file system consistency checks?

- Blocks - Files

What are the elements of a partition?

- Boot Block - Superblock - Free Space Management - I-nodes - Root dir - Files and Directories

What are typical file system operations?

- Create - Delete - Open - Close - Read - Write

What are the four terms associated with files?

- Field - Record - File - Database

What type of file accesses are there?

- Sequential - Random Access

What are the shortcomings of a process address space?

- Virtual address space may not be enough - Information lost when process is terminated/kill/PC crash - Multiple processes may need info at same time

What are the requirements for long-term information storage?

- large amount of storage - info must survive process termination - concurrent access by multiple processes

What are the desirable properties of files?

- long-term existance - sharable between processes - structure to reflect relationships among files

What are some of the attribues of a file?

- protection - owner - hidden - archive - locked - create/access/change times

What can we do to optimize file system performance?

1) Block caching in memory 2) Block Read Ahead to cache 3) Reduce arm movement by placing related blocks physically close together 4) defragmentation

Where are the attributes of a directory stored?

1) Directly in the directory entry (windows) 2) in the inodes (Unix)

What are the two types of directory layouts?

1) Single-level directory systems 2) Hierarchical directory systems

Describe the typical ornagization of a file system.

1) file system accessesing level 2) Logical I/O - allows users to access file records 3) Basic I/O supervisor - Initiates and terminates File I/O, selects device to perform File I/O on, schedules disk access, assigns I/O buffers 4) Basic file system - primary interface with environment outside of computer system, deals with blocks of data (buffering in memory, placing in secondary storage)

What types of files are there?

1) regular ascii/binary files 2) character special to serial devices 3) block special to model disks

What are the two approaches to sharing files in different directories?

1) static linking 2) symbolic linking

What is the free space management block?

A bitmap or linked list containing the free space in that partition.

What is a file? (in structure terms)

A collection of records treated as a single entity. It may be referenced by name, and usually has access control restrictions.

What is a database?

A collection of related data, where the relations are explicit. It is designed for use by a number of different applications, and consists of one or more types of files.

What is a record?

A collection of related fields that can be treated as a unit by some application program of fixed or variable length.

What is a field?

A field is a basic element of data containing a single value of fixed or variable length.

What is a file?

A file is a logical unit of information created by a process used to model disks instead of RAM.

What is a file system?

A file system provides a means to store data organized as files (and their associated attributes) and provides a collection of functions that can be performed on files.

What is a journaling file system?

A journaling file system keeps a log of what the file system is going to do before it does it, and commits this log to disk as a record. If the system crashes before all tasks in logs are completed, it can finish after reboot. All logged operations must be idempotent.

What is a logical dump?

A logical dump starts at one or more specified directories and recursively dumps all the files and directories they contain that have changed since some base date.

What is an absolute path name?

A path name from the root to the specified file, with the first character as the seperator.

What is a relative path name?

A path name relative to the working direcory, which each process has.

What is a single indirect pointer?

A pointer within an i-node that points to a block containing more pointers that point directly to data. Can also have double, triple etc. indirection.

How can we deal with a block that has 0 in both tables in a block consistency check?

Add that block to the free list.

What is a Single-level directory system?

All files are linked to one root node. It is simple, used for embedded systems, but not adequate for large number of files.

How can we deal with a block that has multiple entries in the used table in block consistency check?

Allocate a free block, copy the block, give it to the other file, pray that it works.

What is an i-node?

An i-node is a data structure associated with each file that contains the meta data for that file. Contains the attributes and disk addresses of the file blocks. Only needs to be in memory when that file is open.

Describe an implementation of the I-node.

An i-node stores a set of block pointers. The first set of pointers go directly to data, while later, it can use single, double, triple indirection blocks to data. This creates fast small file access while still being able to present huge files.

What is an incrimental dump?

Backing up only the files that have been modified from the last full backup.

What is the superblock?

Contains all the key parameters about the file system.

How can we speed up access to files?

Continuously following the path from root to a file through several layers of directories is expensive. Use a DENTRY chache to store information of recently accessed directories, so that a full disk read does not need to be performed again.

What is static linking?

Directories point to a data structure (i-node) associated with the file. The problematic scenario is ????

What is FAT?

File Allocation table, it is an implementation of linked list allocation where the pointer word from each block is stored in a table in memory. Then a directory entry needs to keep only the start block number.

What are the disadvantages of implementing a variable-length filename?

File entries in a directory are no longer of the same length, leaving variable size gaps when files are removed. Large directories can span several pages, leading to page-faults.

How can we fix inconsistencies of file consistency check?

In either case (table count > i-node count or vice versa), set the i-node count to the correct value.

What is the structure of a file?

In most OS, it is a byte by byte structure. Historically, it was organized as records. And in some mainframes, there is a hierarchical structure????

What are the drawbacks of a physical dump?

It cannot skip selected directories or restore individual files.

How does the file consistency check operate?

It creates a count for each files usage in a table and compares those to the counts in the i-node of the file. Both counts must agree.

What is the main drawback of FAT?

It does not scale to large disks because the table must be kept in memory at all times.

What is a hierarchical directory system?

It groups related files together within a tree of directories that link back to a single root directory.

What is linked list allocation?

It is the storage of a file as a linked list of disk blocks. The first word of each block is used as a pointer to the next block. There is no external fragmentation, and the directory entry needs to just store the address of the first block.

What is continuous allocation?

It is the storage of each file as a contiguous run of disk blocks. It is simple to implement (start block + size) and the read performance is great (read in single operation)

What is the purpose of a virtual file system?

It is used to integrate multliple file systems into an orderly structure that can be uniformly accessed by the user without having to consider the specifics of that file system. Each file system will satisfy a predetermined API by the VFS.

What is the purpose of file naming?

It shields the user from the details of the file storage. Provides a way to access the file even after process creating that file terminates

What is a physical dump?

It starts at block 0 and writes all of the disk blocks onto the destination storage medium in order, halting when it finishes the last one. It is simple and fast.

What are OS Files an abstraction of?

Long term storage.

How can we alleviate some issues of variable-length filenames?

Maintain fixed-length directory entries and store the filenames as a heap at the end of the diretory. Page faults can still occur, though

What are the drawbacks of linked list allocation?

Random access is extremely slow, data storage amount is no longer a power of two (pointer takes a few bytes)

How can we deal with a block that has 2 in free list table in block consistency check.

Rebuild the list so it is only entered once.

How can we deal with a block that has 1 in both tables in block consistency check?

Remove it from the free list.

What is sector 0 of a disk?

Sector 0 of a disk is called the MBR.

What is the MBR?

The MBR is the master boot record, located at the beginning of a disk and used to boot the computer. The end of the MBR contains the partition table.

What are the drawbacks of continuous allocation?

The disk will become fragmented, and it is necessary to know the final size of a file upon creation.

Who manages files?

The file system is a portion of the OS that deals with/manages files.

What is a boot block?

The first block in a bootable partition that is executed by the MBR. It loads the OS contained in that partition.

What is the partition table?

The partition table gives the starting and ending addresses of each partition on the disk. It also marks one as active. Upon execution of the MBR by BIOS, the MBR finds the active partition and executes its boot block.

What are log-structured file systems?

The structure of entire files is that of a log. Periodically, all pending writes that are buffered in memory are written as a single segment in continuous space at the end of the log. This results in scattered i-nodes maintaned by an i-node map, whch is also cached. A cleaner thread scans the log to compact it and discard unneeded information.

How are file systems layed out?

They are stored on disks, which can be partitioned into different file systems.

What is symbolic linking?

To link to a file, the system creates a file of LINK type that contains the path name to the file which it is linked. The main drawback is extra overhead.

Describe the block consistency check?

Two tables are maintaned, each with a counter for all the blocks. Table 1 contains how many times a block is present in a file, while Table 2 contains how many times a block is present in the free list. It is inconsistent if a block doesn't contain 1 in one list and 0 in the other.

How are user disk quotas maintained?

When a user opens a file, the attributes and addresses are located and placed into an open file table. A second table contains the quota record for every user with a currently opened file.

What are the considerations of file-system block sizes?

too large -> wasted space too small -> wasted time


Related study sets

Tetracyclines, Aminoglycosides, and others CAQs pharm

View Set

questions assessment of muscular skeletal

View Set

Chapter 6. Entrepreneurship and Starting a Small Business

View Set

Google Ads - Measurement Certification

View Set

US HISTORY Nov 16 test review UNIT 5

View Set

A.D. Banker and Company Chapter 4 Life Policy Provisions and Options

View Set

MH Chapter 21 - Child, Partner, and Elder Violence, Mental Health Nursing Chapter 26: Children and Adolescents, Chapter 23 - Suicide (Thoughts and Behaviors), Chapter 22 - Sexual Violence, Varcarolis Ch. 24: Anger, Aggression, and Violence

View Set