0% found this document useful (0 votes)
233 views

Explain File Management in An Operating System

File management in an operating system organizes data on storage devices in an efficient manner. It provides procedures to store, retrieve, and update data as well as manage available space. There are several file organization techniques including sequential, direct, indexed sequential, and partitioned. The appropriate technique depends on factors like the storage device and access requirements. File allocation methods like contiguous, linked list non-contiguous using blocks, and linked list non-contiguous using indexes determine how files are physically stored on devices.

Uploaded by

Ask Areu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
233 views

Explain File Management in An Operating System

File management in an operating system organizes data on storage devices in an efficient manner. It provides procedures to store, retrieve, and update data as well as manage available space. There are several file organization techniques including sequential, direct, indexed sequential, and partitioned. The appropriate technique depends on factors like the storage device and access requirements. File allocation methods like contiguous, linked list non-contiguous using blocks, and linked list non-contiguous using indexes determine how files are physically stored on devices.

Uploaded by

Ask Areu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 57

EXPLAIN FILE MANAGEMENT IN AN OPERATING SYSTEM

Student will be able : ~ To Identify the basic function of file system

Student will be able : ~ To describe the following file organization techniques : a. sequential b. direct c. indexed sequential d. partitioned

Student will be able : ~ To Identify which file organization technique is appropriate for a specific device

What is a File System ?

How does it being use ?

How does it function ?

File System
Function Applies

To organize data expected to be retained after a program terminates by providing procedures to store, retrieve and update data as well as manage the available space on the device(s) which contain it.

organizes data in an efficient manner and is tuned to the specific characteristics of the device.

used on data storage devices, such as hard disk drives, floppy disks, optical discs, or flash memory storage devices, to maintain the physical locations of the computer files.

Field

Record

Group of related bytes Identified by user (name, type, size)


Group of related fields Group of related records Information used by specific application programs

File

Flat file

Report generation

No connections to other files, no dimensionality

Databases

Groups of related files Interconnected at various levels Contain instructions


Contain data

Program files Data files

Give users flexibility of access to stored data

Directories

Listings of filenames and their attributes

Arrangement of records within files All files composed of records Modify command
Request to access record within a file

Volatility of datafrequency with which additions & deletions made. Activity of file% records processed during a given run. Size of file. Response timeamount of time user is willing to wait before requested operation is completed.

yourself into 5 group please Activity Duration: 30 minutes

Divide

Identify FOUR basic function of file system in OS

13

Describe sequential file organization techniques

14

Describe direct file organization techniques ?

15

Describe indexed sequential file organization techniques ?

16

Describe partitioned file organization techniques ?

17

Further explanation of the organization concept

Sequential record organization


Records stored and retrieved serially
One after the other

Easiest to implement File search: beginning until record found Optimization features may be built into system
Select key field from record and sort records by that field before storage Complicates maintenance algorithms Preserve original order when records added, deleted

Direct record organization


Random organization Random access files

Uses direct access files Direct access storage device implementation


Give users flexibility of accessing any record in any order without having to begin search from beginning of file. Relative address record identification (their addresses
relative to beginning of file) :

Known as logical addresses

Uses hashing algorithms to transform a key field

Computed when records stored, retrieved

computed when records are stored & again when records are retrieved.

Advantages: 1) Fast access to records. 2) Can be updated more quickly than sequential files because records quickly rewritten to original addresses after modifications 3) No preservation of records order 4) Adding, deleting records is quick

Disadvantage: 1) Several records with unique keys may generate same logical address (collision)

22

Understanding Operating Systems, Fifth Edition

Indexed sequential record organization


Best of sequential and direct access Uses Indexed Sequential Access Method (ISAM) software: creates, maintains Advantage: no collisions (no hashing algorithm)
Generates index file for record retrieval Divides ordered sequential file into equal sized blocks Each entry in index file contains the highest record key and physical data block location Search index file

You

have been expose to FOUR types of file organization techniques. Identify which file organization technique is appropriate for a specific device Activity Duration: 30 minutes

Student will be able : ~ To describe the three types of file structure a. Unstructured (byte sequence) b. Structured (record sequence) c. Complex structure (Tree)

What do unstructured means?

What do structured means?

1.

Unstructured (byte sequence) Structured (record sequence)

2.

3.

Complex Structure (Tree)

29

Ant

Fox goat rat lion worm

Cow Chick

cat

dog owl
pony

hen

lamb

tiger

(c)

1 byte
(a)

1 record
(b)

Three kinds of file structure ; a. Byte sequence b. Record sequence c. Tree structured
30

The operating system does not know or care what is in the file. All it sees are BYTES. Any meaning must be imposed by user-level programs. Both UNIX and Windows use this approach. Having the operating system regard files as nothing more than byte sequences provides the maximum flexibility. User programs can put anything they want in their files and name them any way that is convenient

1 byte

Fig. ( a ) : is an unstructured sequence of bytes.

Collections of bytes treated as a unit Example : employee records Operation at the level of records (read_rec, write_rec)

1 record

File is a collections of similar record OS can optimize operations on record

Read operation returns one record and the write operation overwrites or appends one record

Fig. ( b) : a file is a sequence of fixed-length records, each with some internal structure

The tree is sorted on the key field, to allow rapid searching for a particular key Example: Search keyword pony, without worrying about its exact position in the file New records can be added to the file, with the operating system, and not the user, deciding where to place them Records of variable length
Record retrieval base on key
Fig. ( c ) : a file consists of a tree of records, not necessarily all the same length, each containing a key field in a fixed position in the record

Each has a associated key

Student will be able : ~ To describe the various methods of file allocation a. Contiguous b. Linked list Non Contiguous (blocks) c. Linked list Non Contiguous (index)

File manager works with files Within file


As whole units As logical units or records

Records subdivided into fields Application programs manage record structure Three methods:

Records must have same format Record length may vary

1) Contiguous file allocation 2) Linked list non-contiguous (using blocks) 3) Linked list non-contiguous (using index)

yourself into 3 group please Activity Duration: 15 minutes


A
1. Discuss the concepts for methods of file allocation for ; 2. Discuss the advantage & disadvantage for; G1 :: Contiguous G2 :: Linked list Non Contiguous (blocks) G3 :: Linked list Non Contiguous (index)

Divide

Records stored one after another


Advantages
Any record found once starting address, size known Easy direct access Locating file data is straightforward

Disadvantages
Difficult file expansion External Fragmentation ? poor performance - file grows too large and must be moved

Files use any available disk storage space File records stored in contiguous manner
If enough empty space

Remaining file records and additions


Stored in other disk sections (extents) Extents
Linked together with pointers Physical size determined by operating system Usually 256 bytes

File extents linked in two ways


Storage level
Each extent points to next one in sequence Directory entry Filename, storage location of first extent, location of last extent, total number of extents (not counting first) Each extent listed with physical address, size, pointer to next extent Null pointer indicates last one

Directory level

Each file is a linked list of disk blocks: blocks may be scattered anywhere on the disk.

block

pointer

File-allocation table (FAT) disk-space allocation used by MS-DOS and OS/2.

Eliminates external storage fragmentation Eliminates need for compaction Simple need only starting address No random access

No direct access support Mapping Data fragmentation

Advantage

Disadvantage

Allows direct record access


Brings pointers together
Links every extent file into index block

Every file has own index block


Disk sector addresses for file Lists entry in order sectors linked

Logical view.

Supports sequential and direct access

Does not necessarily improve storage space use Larger files experience several index levels Need index table

Advantage

Disadvantage

Given the directory for Contiguous file allocation. Draw a diagram of how file management solve the problem.
File Tug_1
Exer_3 Nota Song Pict

Start 8
0 12 25 16

Length 3
4 2 6 4

Given the directory for Linked list non-contiguous (using blocks) :: Directory level file allocation. Draw a diagram of how file management solve the problem.
File Tug 1(1) 1 : Address 512 : Size 5 Next

Tug 2(1)
Tug 1(2) Nota 1(1)

4
5 6

512
512 512 : :

14
19 18

Tug 2(2) Tug 1(4)

14 15 :

512 512 : 512 512 512

Nota 1(3) Tug 1(3) Nota 1(2)

18 19 20

15 20

A file management system is a set of system software that provides services to users and applications in the use of files, including file access, directory maintenance and access control. The file management system is typically viewed as a system service that itself is served by the operating system, rather than being part of the operating itself. A file consists of a collection of records. If a file is to be processed as a whole, then a sequential file access is the simplest and most appropriate.

If sequential access is needed but random access to an individual file is also desired, than an indexed sequential file

You might also like