File System Management in Operating SystemOne of the major responsibilities of the Operating System (OS) is file management. A file canbe "free formed", indexed or structuredcollection of related bytes/informationhaving meaningonly to the one who created it. Or in other words an entry in a directory is the file. The file mayhave attributes like name, creator, type, date, permissions etc.File StructureA file has various kinds of structure; anda defined structure should be according to arequired format that the operating system can understand.Some of them can be:Simple Record Structure:which is made up of lines of fixed or variable lengths?Complex Structures:these are like formatted documents or reloadable load files.No Definite Structure: this lookslike sequence of words and bytes etc.Attributes of a FileAttributes are factors used in keeping track of files in an operating system. A file hasattributes, which vary from one operating system to another, but typically consist of thefollowing attributes of a file:File’s Name:It is the only information which is in human-readable form. It’s essentiallythe name of a fileIdentifier:The file is usually identified by a unique tag (ID number usually infigures— 123..) within the file system.Type: It is needed for systems that support different types (.doc, .txt etc) of files.Location: It is a pointer to a device and the location (stored) of the file on the device.Size. It is the current size of the file ex. 2048 Kb.Protection: This controls (access control information) and assigns the power of reading,writing, executing i.e. a file can be “READ ONLY”, R/W or W.Time and date:This gives information about the time and dates when operationslike creation, last access time, modification , deletion etc. of the file took place.User identification (ID). This is the identification given to the creator or user of the fileOperations on a FileThe following include the operations performed on files
a)Creating a file: to create a file, there should be space in the system then you enter thenew fileb)Writing a file: is writing a content or information to a file systemc)Reading a file: In this case the system gives information of just reading a filed)Reposition of a file: Is searching for a filee)Delete File: It is the deletion of a file from a file systemf)Truncating a File: It is the deletion of the contents of a file but keeping the attributes ofthat fileOpen FileTo perform file operation, we first have to open the file. Many OS maintain a datastructure kind of property called open file table which contains information (properties)about the currently opened file. Several pieces of information associated with an openfile may include:File pointer:Records the current position of file, which enables the accessibilityof the next block for the next read/write process.
Upload your study docs or become a
Course Hero member to access this document
Upload your study docs or become a
Course Hero member to access this document
End of preview. Want to read all 7 pages?
Upload your study docs or become a
Course Hero member to access this document
Term
Spring
Professor
N/A
Tags
File system management