File Management Flashcards

1
Q

File system

A

–resides on secondary storage (disks)
* Provided user interface to storage, mapping logical to physical
* Provides efficient and convenient access to disk by allowing data to be stored, located retrieved easily

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

File control block (FCB)

A

Also called File Descriptor is a storage structure consisting of information about a file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

File System Layers

A

–Application programs
–Logical file system
–File-organization module
–Basic file system
–IO control
–Devices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Application programs

A

file created by user and giver to logical file system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Logical file system

A

Accepts file name as input and check if file is present in directory structure, if yes it finds the location of the file as well as the logical block member

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

File-organization module

A

Accepts logical block member as input and it performs a mapping in order to find the physical block member in the hard disk

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Basic file system

A

Accepts block member and issues a command to I/O control with help of block member

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

IO control

A

Accepts commands form basic file system and contains device drivers or driver files which interacts with devices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Stream-block translation

A

is the process by which the file system maps the logical view of the data (the stream) into the physical blocks on the disk.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

File Control Block (FCB)

A

– Contains many details about the file:
* typically inode number, permissions, size, dates
* NFTS stores into in master file table using relational DB structures

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

File Descriptor

A

Maintains information about the
file including:
- External name: symbolic name of the file
- Current state: i.e. open for reading, open for execution, closed, etc.
- Sharable: File is sharable if many processes can have it once
- Owner: identity of file owner
- User: list of processes that have the file open
- Locks: read locks and write locks are used to indicate that the file is open for reading or writing
- Protection setting: file permissions
- Reference count: the number of directories in which the file appear
- Length; time of creation; time of last access, time of last modification, etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Three classes of users on Unix / Linux

A

a) owner access 7
b) group access 6
c) public access 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How file system can keep track of allocated blocks to a file

A
  • Contiguous Allocation
  • Linked List Allocation
  • Index Table Allocation
  • UNIX file structure
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Contiguous Allocation

A

Maps N logical blocks of the file into N continuously physical blocks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Linked allocation

A

Each file a linked list of blocks

  • File ends at nil pointer
  • No external fragmentation
  • Each block contains pointer to next block
  • No compaction, external fragmentation
  • Free space management system called when new block needed
  • Improve efficiency by clustering blocks into groups but increases internal fragmentation
  • Reliability can be a problem
  • Locating a block can take many I/Os and disk seeks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

File-Allocation Table

A

Uses a table to track the clusters on a storage volume and how those clusters link together through associated directories and files.

17
Q

Indexed Allocation

A

each file has its own index block, which is essentially a table of pointers. Each pointer in the index block refers to a block on the disk where part of the file’s data is stored.

18
Q

UNIX File Structure

A

The file manager is configured with 4KB (KBytes) blocks, 12 direct pointers, 1 single indirection, 1 double indirection, and 1 triple indirection. Assume 32-bit system.

19
Q

The directory is organized logically to obtain

A

– Efficiency – locating a file quickly
– Naming – convenient to users
* Two users can have same name for different files
* The same file can have several different names
– Grouping – logical grouping of files by properties, (e.g., all Java programs, all games, …)

19
Q

Directory Organization

A

-Single-Level Directory
-Two-Level Directory
-Tree-Structured Directories

20
Q

Single-Level Directory

A
  • Naming problem
  • Grouping problem
21
Q

Two-Level Directory

A
  • Path name
  • Can have the same file name for different user
  • Efficient searching
  • No grouping capability
22
Q

Tree-Structured Directories

A
  • Efficient searching
  • Grouping capability
23
Q
A