Unit-2 OS Ch-3 Complete
Unit-2 OS Ch-3 Complete
File Structure
Files can be organized as a simple sequence of words
or bytes without any specific structure.
They can also be structured into simple records such
as lines, Fixed/Variable length records.
They can also have more complex structures such as
Formatted docs, Relocatable load files.
It is possible to simulate complex structures using the
first method by inserting appropriate control
characters.
The structure of a file is determined by OS & specific
program accessing the file.
File Operations
Creating a File:
o Finding space in the file system and creating an
entry in the directory.
Writing a File:
o System call specifies file name and data to be
written.
o System searches directory for file location.
o Write pointer in the file indicates the next write
location and is updated after each write operation.
Reading a File:
o System call specifies file name and memory location
for data.
o Directory searched for file's location.
o Read pointer indicates the next read location and
is updated after each read operation.
Repositioning within a File (File Seek):
o Directory searched for the appropriate file entry.
o Current-file-position pointer repositioned to a
given value.
Deleting a File:
OS UNIT 2: Chapter 3 2
Join Now:-
©️ NFS Club:-
https://chat.whatsapp.com/CX7qyc
rvE2QIpfeBPBrbxe