CS 43 Operating System - Chapter 8: File Management

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/67

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

68 Terms

1
New cards

The File Manager

  • (also called the file management system) is the software responsible for creating, deleting, modifying, and controlling access to files—as well as for managing the resources used by the files.

2
New cards

The File Manager is responsible for:

  • Creating

  • Deleting

  • Modifying

  • Controlling Access to Files

3
New cards

The File Manager provides support for:

  • For libraries of programs and data to online users

  • For spooling operations

  • For interactive computing

4
New cards

Field

  • A group of related bytes that can be identified by the user with a name, type, and size. A record is made up of fields.

5
New cards

Record

  • A group of related fields treated as a unit. A file is a group of related records.

6
New cards

File

  • A group of related records that contains information to be used by specific application programs to generate reports.

7
New cards

Database

  • A group of related files that are interconnected at various levels to give users

    flexibility of access to the data stored.

8
New cards

Program Files

  • A file that contains instructions for the computer.

9
New cards

Directories

  • A storage area in a secondary storage volume (disk, disk pack, etc.) containing information about files stored in that volume.

10
New cards

Steps from the READ instructions:

  • Move the read/write heads to the cylinder or track where the record is to be found

  • Wait for the rotational delay until the sector containing the desired record passes under the read/write head

  • Activate the appropriate read/write head and read the record

  • Transfer the record to main memory

  • Set a Flag to indicate that the device is free to satisfy another request

11
New cards

Typical Volume Configurations:

  • Volume

  • Multifile Volumes

  • Each volume in the system is given a name

12
New cards

Volume

  • Any secondary storage unit, such as hard disks, disk packs, CDs, DVDs,

    removable disks, flash memory, or tapes.

13
New cards

Multifile Volumes

  • Each storage unit, whether it’s removable or not, is considered a volume, and each volume can contain several files, so they’re called “_________.”

14
New cards

Master File Directory (MFD)

  • A file stored immediately after the volume descriptor. It lists the names and characteristics of every file contained in that volume.

15
New cards

Subdirectory

  • A directory created by the user within the boundaries of an existing directory. Some operating systems call this a folder

16
New cards

File Descriptor Information:

  • Filename

  • File Type

  • File size

  • File Location

  • Date and Time of Creation

  • Owner

  • Protection Information

  • Record Size

17
New cards

Filename

  • Within a single directory, filenames must be unique; in some operating

    systems, the filenames are case sensitive

18
New cards

File Type

  • The organization and usage that are dependent on the system (for example, files and directories)

19
New cards

File Size

  • Although it could be computed from other information, the size is kept

    here for convenience

20
New cards

File Location

  • Identification of the first physical block (or all blocks) where the file

    is stored.

21
New cards

Protection Information

  • Access restrictions, based on who is allowed to access the file and what type of access is allowed

22
New cards

Record Size

  • Its fixed size or its maximum size, depending on the type of record

23
New cards

File-Naming Conventions 2 Components to many Fiilenames:

  • Relative filename

  • Extension

24
New cards

Complete Filename

25
New cards

Relative Filename

  • A file’s name and extension that differentiates it from other files in

    the same directory.

26
New cards

Extension

  • In some operating systems, it’s the part of the filename that indicates which compiler or software package is needed to run the files. In UNIX and Linux, it is

    optional and called a suffix.

27
New cards

File Organization

  • When we discuss file organization, we are talking about the arrangement of records within a file because all files are composed of records.

28
New cards

Record Format

  • All files are composed of records. When a user gives a command to modify the contents of a file, it’s actually a command to access records within the file.

Same format:

  • Fixed length, or

  • Variable length

Regardless of format, it can be:

  • Blocked

  • Not blocked

29
New cards

Fixed-length Records

  • A record that always contains the same number of characters.

30
New cards

Critical Aspect: is the size of the record

  • If it is too small, smaller than the number of characters to be stored in the record, the leftover characters are truncated

  • If it is too large, larger than the number of characters to be stored, storage space is wasted

31
New cards

Physical File Organization

  • The physical organization of a file has to do with the way records are arranged and the characteristics of the medium used to store it.

32
New cards

Ways on how files are organized on Magnetic Disks (Hard Drives):

  • Sequential

  • Direct

  • Indexed Sequential

33
New cards

Characteristics to consider in selecting the best of the file organizations:

  • Volatility of the data

  • Activity of the file

  • Size of the file

  • Response time

34
New cards

Volatility of the data

  • The frequency with which additions and deletions are made

35
New cards

Activity of the file

  • The percentage of records processed during a given run

36
New cards

Response time

  • The amount of time the user is willing to wait before the requested

    operation is completed (This is especially crucial when doing time-sensitive searches)

37
New cards

Sequential Record Organization

  • The organization of records in a specific sequence. Records in a sequential file must be processed one after another.

38
New cards

Direct Record Organization

  • Files stored in a direct access storage device and organized to give users the flexibility of accessing any record at random, regardless of its position in the file.

39
New cards

Relative Address

  • In a direct organization environment, it indicates the position of a

    record relative to the beginning of the file.

40
New cards

Logical Address

  • The result of a key-to-address transformation.

41
New cards

Indexed Sequential Record Organization

  • A way of organizing data in a direct access storage device. An index is created to show where the data records are stored. Any data record can be retrieved by consulting the index first.

42
New cards

Physical Storage Allocation

  • The File Manager must work with files not just as whole units but also as logical units or records. Records within a file must have the same format, but they can vary in length.

43
New cards

Types of Physical Storage Allocation:

  • Contiguous Storage

  • Noncontiguoous Storage

  • Indexed Storage

44
New cards

Contiguous Storage

  • A type of file storage in which all the information is stored in adjacent locations in a storage medium

Advantage:

Disadvantage:

45
New cards

Noncontiguous Storage

  • A type of file storage in which the information is stored in nonadjacent locations in a storage medium.

46
New cards

Extents

  • Any remaining records and all other additions to the file that are stored in

    other sections of the disk.

47
New cards

Efficient Methods of Storage Allocation:

  • Contiguous for direct files

  • Noncontiguous for sequential

48
New cards

Access Methods

  • Are dictated by a file’s organization; the most flexibility is allowed

    with indexed sequential files and the least with sequential.

49
New cards

Current Byte Address (CBA)

  • The address of the last byte read. It is used by the File Manager to access records in secondary storage and must be updated every time a record is accessed.

50
New cards

Sequential Access

  • For sequential access of fixed-length records, the CBA is updated simply by incrementing it by the record length (RL), which is a constant:

CBA = CBA + RL

51
New cards

Direct Access

  • If a file is organized in direct fashion, it can be accessed easily in either direct or sequential order if the records are of fixed length. In the case of direct access with fixed-length records, the CBA can be computed directly from the record length and the desired record number RN (information provided through the READ command) minus 1:

CBA = (RN - 1) * RL

(11-1) * 25 = 250

52
New cards

To Access a Record:

  • Do a sequential search

  • It becomes a half-sequential read through the file

53
New cards

Indexed Sequential File

  • Can be accessed either sequentially or directly, so either of the procedures to compute the CBA presented in this section would apply but with one extra step: the index file must be searched for the pointer to the block where the data is stored.

54
New cards

Levels in File Management System

File Manager

  • Basic File System

  • Access Control Module

  • Logical File System

Device Manager

  • Physical File System

  • Device Interface Module

  • Device

55
New cards

Transform Record Number to Byte Address:

CBA = (RN - 1) * RL

56
New cards

Access Control Matrix

  • is intuitively appealing and easy to implement, but because of its size it only works well for systems with a few files and a few users. In the matrix, each column identifies a user and each row identifies a file.

57
New cards

Access Control List

  • is a modification of the access control matrix. Each file is entered in the list and contains the names of the users who are allowed to access it and the type of access each is permitted.

58
New cards

SYSTEM or ADMIN

  • is designated for system personnel who have unlimited access to all files in the system.

59
New cards

OWNER

  • has absolute control over all files created in the owner’s account.

60
New cards

GROUP

  • file so that all users belonging to the appropriate group have access to it.

61
New cards

WORLD

  • is composed of all other users in the system; that is, those who don’t fall into

    any of the other three categories. In this system, the File Manager designates default types of access to all files at creation time, and it’s the owner’s responsibility to change them as needed.

62
New cards

Capability List

  • Shows the access control information from a different perspective. It

    lists every user and the files to which each has access

63
New cards

Data Compression

  • A procedure used to reduce the amount of space required to store data by reducing, encoding, or abbreviating repetitive terms or characters.

64
New cards

Data Compression Algorithms:

  • Lossless algorithms - typically used for text or arithmetic files

  • Lossy algorithm - typically used for image and sound files and remove data permanently

65
New cards

Text Compression

  • To compress text in a database, three methods are described briefly here: records with repeated characters, repeated terms, and front-end compression.

66
New cards

3 Methods to Compress Text in Database:

  • Records with repeated characters

  • Repeated terms

  • Front-end compression

67
New cards

Lossy Compression

  • Allows a loss of data from the original file to allow significant compression. This means the compression process is irreversible as the original file cannot be reconstructed.

68
New cards

For Video and Music Files:

  • International Organization for Standardization (ISO) issued MPEG standards

  • ISO is the world’s leading developer f international standards