• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/25

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

25 Cards in this Set

  • Front
  • Back

Conceptually, what is file?

A contiguous logical address space

What are two types of contents a file can contain (at the basic level)?

1) Data


2) Program




at higher levels, users can define different file types like images, text files (i.e. these are just data at a low level)

What are the attributes a file has?

Name, protection, unique ID, location on disk, size, time & date, type (for systems that support different types)

Where are the file attributes stored?

In the directory structure.

What sorts of operations may be performed on the abstract type of "File"?

Create, Write, Read, reposition within file, delete, truncate, open, close

What pieces of data the the OS need to manage open files?

Open File Table (shared between all processes), File-open count, File pointer (per process value), disk location of the file, access rights (per process)

What is a Shared Lock, with regard to file management?

A lock that lets many processes read from a file but not write to it.

What is an exclusive lock?

A lock that allows only one process to write.

What is the difference between Mandatory and Advisory locks?

Mandatory forces process to be locked out. Advisory leaves it up to individual process to decide.

What are 3 ways a file can be structured?

1) No structure, just an endless line of bytes


2) Simple structure; line markers, fixed lengths,


3) Complex structure; i.e. executable files

True or False: A directory is also a file.

True. Directories are files that contain references to other files

What does it mean when a disk, or disk partition, is raw?

It doesn't use a File System but relies on a DBMS, swap system, etc.

What is the name of the entity in which the File System lives (technically it varies by OS)?

A Volume

True or False: A Volume must exist in a partition on the disk.

False, it can live (i.e. as a Logical Volume) across multiple disks (i.e. in a storage array)

What is procfs?

A special-purpose file system in Unix-like OS's. It presents running processes in a hierarchy similar to the directory/file structure.

True or False: All File Systems have directory structure of some kind

True.

What is the main idea behind a two-level directory file system?

Each user has his own directory which can contain a single level of directories.

What's the difference between deleting a directory in Windows and deleting a directory in Linux?

In Windows, everything in the directory is automatically deleted. In Linux, you need to pass -r flag to delete all contents as well

What is the difference between a hard link and a soft link (aka symbolic link)?

When you delete the original file, a hard link to that file still points to the contents. Soft links don't

When a file is deleted, hard and soft links to it can remain. How are these danglers dealt with?

Linux doesn't do anything about soft links and let's the user figure it out eventually. Linux keeps track of hard links by adding a counter to a file. The OS can delete the file when the hard link counter goes down to zero.


Another strategy is backpointers, but this can be very expensive.

How do we guarantee there are no cycles in a file system directory?

1) Use cycle detection algorithm when new link is added, but this is expensive


2) Only allow links to files, not directories (what Linux does with hard links).


3) Limit the number of links traversed at one time

Before a file system can be accessed it must be...

mounted! at a "mount point"!

How does the Unix File System allow multiple users to access a shared file simultaneously?

By sharing file pointer to allow multiple users to read and write concurrently.


Any writes to an open file are visible right away to other users (like Google Docs)

How does the Andrew File System allow multiple users to access a shared file simultaneously?

All users get their own copy of the opened file and changes to one don't affect the others.

Regarding file access privileges, if you see a file with permission "761" what does that mean?

The Owner access is 7 (111), the Group access is 6 (110), and the Public access is 1 (001).




The binary digits correspond to Read, Write and Execute permissions.