An operating system (OS) is software that acts as an intermediary ("broker role") between the user and the hardware. The OS is responsible for managing all the computer's resources, including its memory, processes, software, and hardware.
1. File
Management
The Operating System (OS) provides a structured way of storing, organizing, and retrieving data on storage devices. The different operating systems structure data in different ways. The file-related activities include creating, deleting, and modifying files. A file is the smallest unit of logical secondary storage. It keeps track of file attributes, which may include name, size, and permissions, among other details.
File: A file is a collection of related information stored on a secondary storage medium. These can be images, text, or executables.
File Attributes / Metadata: This is information associated with a file, such as name, size, or date of creation. Information about data may help when controlling file access and usage.
Directory/Folder: Depending on the type of OS, they have been referred to as a directory or folder. It is a collection of files of the same type. A hierarchical structure has been employed by several OSs because it makes it easier to navigate and locate files.
File Operations
The OS provides operations for handling files. These operations include:
Creation: File creation is the process of using a computer program to set up a new file. File creation can be carried out by the user using the help of the OS or automatically by the OS, or by an unauthorized program.
Read: Reading a file is the process of accessing and retrieving data that has been stored in a file on a storage medium and bringing that data into the program's memory.
Write: Writing is to store data in a file. Data obtained from the OS is saved in a persistent storage such as the hard disk.
Delete: To remove a file from storage and free up space. The process removes the file from the file system.
Rename: To change a file's name.
2. File
Allocation and Access Control
The operating system also manages how files are physically stored and accessed from a storage medium.
a) File Allocation:
File allocation is how the OS assigns and manages disk space for files. The primary methods of file allocation are contiguous and linked allocation methods.
i) Contiguous Allocation: A file is assigned a single, continuous block of storage. The method is fast because of the sequential nature of access. It is, however, susceptible to fragmentation, where free space is broken into small, unusable chunks.
ii) Linked Allocation: Each block of a file contains a pointer to the next block.
iii) Indexed Allocation: In indexed allocation, an index block is used to store pointers to all the blocks that make up a file. One strength is its support for fast random access, but it has overhead because an entire block is needed to store the indices.
Many modern file systems use hybrid approaches to leverage the benefits of these methods.
b) Access Control:
The OS ensures data security by controlling who can access a file and what they can do with it. It is typically managed through file permissions (read, write, and execute) or access control lists.
CLASS ACTIVITY
Navigating the Desktop
A desktop refers to the main screen seen when a computer starts up. It typically includes the taskbar or dock in case of macOS at the bottom, to simplify its use. The desktop provides an environment that allows users to place frequently used files and program shortcuts.
How to create a folder
As defined above, a folder is a collection of multiple files (both similar and dissimilar). To create a folder in windows OS, follow the following steps:
·
Right-click the area where you want to place the folder
·
Select
New from the menu, and choose Folder.
·
Type a name for the folder next to the new folder that appears, and press Enter.
Good Practices in File
Naming ️
- Be Specific and descriptive: E.g., Lecture_Notes, Semester_exams, etc
- Avoid Special Characters because they have special meanings to the system: E.g.,
?,/,\,*,<,>, and|, - Be Consistent:
Use a consistent naming structure. For example, if your folder contains lecture notes (e.g., Computer_skills
_Module_1,2025, Development_studies_Module_1,2025).
Finding Files
Most OSs provide tools to allow searching for files. To search for a file, do the following.
For windows:
Click the Start button or the search icon on the taskbar and type the file's name.
For macOS:
Click the search (Spotlight) and type the file's name.
Shortcuts
A shortcut is a small file that points to another file,
folder, or application. shortcuts save time to navigate to the original
files whenever we want to access them.
To create a shortcut, follow the following steps:
For Windows:
Right-click on a file or program, select Create shortcut, and then drag the new shortcut to your desired location.
For macOS:
Right-click a file or program, select Make Alias, and then drag the alias to your desired location
No comments:
Post a Comment