Professional Documents
Culture Documents
BASIC OPERATING
SYSTEM CONCEPT
MANAGEMENT
At the end of this chapter…
(MS-DOS)
where the user provides the input by typing a
Start an application
OPERATING SYSTEM
HARDWARE
DIRECTORY MANAGEMENT
A disk can hold hundreds of different files and
program ,but if you want to load a particular
program , only that program will do , and if the
program needs data from a particular file , only
that file will do .
File operations
1. creating file
2. writing file
3. reading a file
5. deleting a file.
6. truncating a file
1. creating file
steps necessary to create file
space in file system must be found for the file
entry for the new file must be be made in the directory
2. writing file
Need system call to specify name and information to be
written to the file
System searches the directory to find the file location
through the file name.
System must keep write pointer to the location in the file
where the next write is to take place.
The write pointer must be updated whenever the write
occurs.
3. reading a file
Use system call to specifies the name of a file and
where (in memory) the next block of the file
should be put.
The directory is searched for the associated entry,
and the system needs to keep the read pointer to
the location in the file.
Once the read has taken place, the read pointer is
updated.
Both read write operations use the same pointer,
saving space and reduce complexity.
4. repositioning within a file
The directory is search for the appropriate entry.
Current-file-position pointer is repositioned to a
given value
Need not involve any actual I/O.
Also known as a file seek.
5. Deleting file.
Search the directory for file name first.
Then, release all file space – so it can be reused
by other files, and erase the directory entry.
6. Truncating a file
Erase the content of file, but keep the attribute.
Attribute remain unchanged except for file length.
LOGICAL AND PHYSICAL I/O
Logical I/O
It is similar to process of reading and writing
data record.
Request a for a specific logical unit of data.
Does not indicate where or how data are
physically stored.
Physical I/O
Act of physically transferring data between
peripheral and memory.
Responsibility for a lower operating system
layer.
Accept a logical request from application
program layer.
LOGICAL AND PHYSICAL
RECORD
Physical record (unit of data that is transferred btw
peripheral device and memory)
Sector
Record
Sector-512 bytes
Unused
Record 1 Record 2 Record 3 Record 5 Record 6 space
Sector 0
Sector 1
IOCS layer
Operating system
Hardware