Semester : SEMESTER 6
Subject : Embedded System
Year : 2018
Term : MARCH
Scheme : 2015 Full Time
Course Code : EC 308
Page:52
ves the physical and virtual devices of the
: 41 System,
| devices. Device driver functions may be s
The device manager initializes, controls and dri |
कर IMilar to 7
iain classes of devices are char devices and bloc
functions, open, read, Iseek, write and close.
8.6.2 File System Organization and implementation
A file is anamed entity on a magnetic disk, optical disk or system memory. Afi le னை the data, char acter
and texts. It may also have a mix of these. Each OS may have differing abstractions of a file. (i) A file May be
a named entity that is a structured record as on a disk having random access in the system. (ii) A file may ما
a structured record on a RAM analogous to a disk and may also be either separately called RAM disk ج
simply, a ‘file’ (virtual device). (111) A file may be an unstructured record of bits or bytes. (iy) A file 0०४७
may be a pipe-like device. ۱
It is necessary to organize the files in a systematic way and to have a set of command functions. Table 83
gives these functions for POSIX file system.
Table 8.8 Set of Command Functions in the Portable Operating System Interface (POsix)
File System
SS I PAA ا اا ند یہ مز بے ری EE SEE
Command in POSIX Action(s)
Function for creating the file
Writing the file
Reading the file
Iseek (List seek) or set the file pointer Setting the pointer for the appropriate place in the file for the next read
or write
close Closing the file
Notes: 1. File devices are block devices in Unix. Linux permits the use of a block device as a char device also. This is 0208
between block device and char device, Linux has an additional interface. In other words, the kernel interface ا
identical for the char and block devices in Linux but not in Unix,
2. The file on the RAM that is hierarchically Organized is known as RAM disk. RAM memory storage is analogous ®
Should a file having integers differ from a file having bytes? Should a file having bytes differ from ४
“ning approaches to device and file management interfaces, the 0९06 st
IX stands - Only then can Systems be portable. A standard set of inter
भ for portable Operating system interface standard for coding ہیں itis