Lecture 12 - Filesystems Flashcards

1
Q

What is a filesystem?

A

Method of long term storage

Stores large amounts of data

Organised as data and metadata

Usually on block devices

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

What is metadata?

A

Data about data

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

What is structural metadata?

A

About the design and specification of data structures

“Data about the containers of data”

i.e. where are blocks stored on disk

how long are blocks

is it fast or slow

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

What is descriptive metadata?

A

Data about the actual content

e.g. when was this file created, by whom, whats the encoding, can it be trusted

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

What are some design choices about filesystems?

A

Namespace - flat, hierarchical

Types of files - structured/unstructured

what metadata to use

how to store on the device

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

What are some important file attributes?

A

Name - human readable

Identifier - for machine use

Type

Location - both within the filesystem and on the device

Size

Protection

Time, date, user info

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

What are the two ways of accessing a file?

A

sequential access - read from beginning - cannot randomly pick and choose a bit to read

Random access - read in any order, pick and choose as you like

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

What are some typical file operations?

A

Create

Delete

Open

Close

Read

Write

Append

Seek

Get/set attributes

Rename

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

What are file descriptors?

A

An integer the kernel uses to name a file when it is open

In unix also applies to devices since they are represented as files

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

What does the POSIX file api do?

A

Forms an interface between OS kernel and software in user mode

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

What is the difference between mandatory and advisory file locking?

A

Mandatory - access is denied depending on locks held and requested

Advisory - processes can find status of locks and decide what to do

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

What is a hard link?

A

Link to low-level reference to the file, i.e. points to the actual file itself on disk

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

What is a soft link?

A

Symbolic link

High level reference to file, i.e. where it is in the hierarchy

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

How are files accessed in filesystem?

A

By name: name identifies unique file (including path)

By content or attribute: could index by the actual content of a file - would need to search to find it

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

What are the 5 layers in file systems?

A

Application programs

Logical file system (hierarchy - files, diretcories etc.)

Basic file system (block read/write)

I/O control (drivers, interrupts)

Hardware devices

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

Why is a layer of abstraction necessary when dealing with disks?

A

Otherwise would need to know about many different types of disk - so many details to know and things to handle it would be a nightmare

17
Q

What is device abstraction?

A

Making all devices of the same type look the same to the programmer

e.g. make all hdds have the same interface, and ssds, etc even though they work in very different ways