Operating systems perform the vital function of being the bridge between a computer's hardware and software. They provide an environment where software can be written without the need to cater to the specifics of the underlying hardware, which was necessary in the earlier days of computing. There are several widely-used operating systems which differ from each other in many respects. However, they each perform a number of similar functions including executing basic instructions, either compiled or interpreted; and also managing processes, memory, input and output, storage, network operations, and file and folder/directory operations. There are five major file management functions that an operating system controls.
Video of the Day
Creating and Deleting Files
File creation and deletion are fundamental to computer operations. In the former, data can't be stored in an efficient manner unless arranged in some form of file structure. In the latter, permanent storage would quickly fill up if files were not deleted and the space occupied by them reallocated to new files.
Creating and Deleting Directories
As a corollary to the need to store data in files, files themselves need to be arranged in directories or folders in order to allow their efficient storage and retrieval. This is particularly so in the case of personal computers where the user needs to navigate to one or more specific files to access them. Without some form of compartmentalization, this would prove an onerous if not impossible task. Much like file deletion, unnecessary directories or folders need to be removed in order to keep the system uncluttered.
File Manipulation Instructions
Since operating systems allow application software to perform file manipulation using symbolic instructions, the operating system itself needs to have a machine-level instruction set in order to interface with the hardware directly. The application's symbolic instructions need to be translated into the machine-level instructions either by an interpreter or by compiling the application code. The operating system contains provisions to manage this machine-level file manipulation.
Mapping to Permanent Storage
Operating systems need to be able to map files and folders to their physical location on permanent storage in order to be able to store and retrieve them. This will be recorded in some form of disk directory which varies according to the file system or systems that the operating system uses. The operating system will include a mechanism to locate the separate file segments where it has divided a file.
Backing Up Files
Files represent a considerable investment in time, intellectual effort and often money as well, thus their loss can have a severe impact. Computer's permanent storage devices generally contain a number of mechanical devices which can fail, and the storage media itself may degrade. A function of operating systems is to obviate the risk of data loss by backing files up on additional secure and stable media in a redundant system.