0% found this document useful (0 votes)
8 views22 pages

Unit 5

The document provides an overview of file concepts and management within operating systems, detailing the structure and types of file systems, attributes, and operations associated with files. It discusses the importance of file management, its functions, objectives, advantages, and disadvantages, along with various access methods and space allocation strategies. The document emphasizes the role of the operating system in managing files and ensuring efficient data storage and retrieval.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views22 pages

Unit 5

The document provides an overview of file concepts and management within operating systems, detailing the structure and types of file systems, attributes, and operations associated with files. It discusses the importance of file management, its functions, objectives, advantages, and disadvantages, along with various access methods and space allocation strategies. The document emphasizes the role of the operating system in managing files and ensuring efficient data storage and retrieval.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Tulsiramji Gaikwad-Patil College of Engineering and Technology

Wardha Road, Nagpur - 441 108


Approved by AICTE, New Delhi, Govt. of Maharashtra
(An Autonomous Institution Affiliated to RTM Nagpur University with NAAC A+ Grade)
Session 2023-24 (Even Semester)

III semester Unit-5 Sub: Operating System

 FILE CONCEPT
A computer file is defined as a medium used for saving and managing data in the computer
system. The data stored in the computer system is completely in digital format, although there
can be various types of files that help us to store the data.
File systems are a crucial part of any operating system, providing a structured way to store,
organize, and manage data on storage devices such as hard drives, SSDs, and USB drives.
Essentially, a file system acts as a bridge between the operating system and the physical
storage hardware, allowing users and applications to create, read, update, and delete files in an
organized and efficient manner.

What is a File System?


A file system is a method an operating system uses to store, organize, and manage files and
directories on a storage device. Some common types of file systems include:
 FAT (File Allocation Table): An older file system used by older versions of Windows
and other operating systems.

 NTFS (New Technology File System): A modern file system used by Windows. It
supports features such as file and folder permissions, compression, and encryption.

 ext (Extended File System): A file system commonly used on Linux and Unix-based
operating systems.

 HFS (Hierarchical File System): A file system used by mac OS.

 APFS (Apple File System): A new file system introduced by Apple for their Macs and
iOS devices.

A file is a collection of related information that is recorded on secondary storage. Or file is


a collection of logically related entities. From the user’s perspective, a file is the smallest
allotment of logical secondary storage.

The name of the file is divided into two parts as shown below:
 Name
 Extension, separated by a period.
 Issues Handled By File System

We’ve seen a variety of data structures where the file could be kept. The file system’s job is
to keep the files organized in the best way possible.
A free space is created on the hard drive whenever a file is deleted from it. To reallocate them
to other files, many of these spaces may need to be recovered. Choosing where to store the
files on the hard disc is the main issue with files one block may or may not be used to store a
file. It may be kept in the disk’s non-contiguous blocks. We must keep track of all the blocks
where the files are partially located.

 Files Attributes and Their Operations

Attributes Types Operations

Name Doc Create

Type Exe Open

Size Jpg Read

Creation Data Xis Write

Author C Append

Last Modified Java Truncate

protection class Delete

File type Usual extension Function

Read to run machine


Executable exe, com, bin
language program
File type Usual extension Function

Compiled, machine
Object obj, o
language not linked

Source code in various


Source Code C, java, pas, asm, a
languages

Commands to the command


Batch bat, sh
interpreter

Text txt, doc Textual data, documents

Various word processor


Word Processor wp, tex, rrf, doc
formats

Related files grouped into


Archive arc, zip, tar
one compressed file

For containing audio/video


Multimedia mpeg, mov, rm
information

It is the textual data and


Markup xml, html, tex
documents

It contains libraries of
Library lib, a ,so, dll
routines for programmers

It is a format for printing or


Print or View gif, pdf, jpg viewing an ASCII or binary
file.

 File Directories
The collection of files is a file directory. The directory contains information about the files,
including attributes, location, and ownership. Much of this information especially that is
concerned with storage is managed by the operating system. The directory is itself a file,
accessible by various file management routines.
Below are information contained in a device directory.
 Name
 Type
 Address
 Current length
 Maximum length
 Date last accessed
 Date last updated
 Owner id
 Protection information

The operations performed on the directory are:

 Search for a file


 Create a file
 Delete a file
 List a directory
 Rename a file
 Traverse the file system

 File Management

File management is one of the basic but important features provided by the operating system.
File management in the operating system is nothing but software that handles or manages the
files (binary, text, pdf, docs, audio, video, etc.) present in computer software.

The file system in the operating system is capable of managing individual as well as groups of
files present in the computer system. The file system in the operating system tells us about the
location, owner, time of creation and modification, type, and state of a file present on the
computer system.

 What is File Management in an Operating System?

Before learning about the file system in the operating system, let us first get a good grasp of
operating systems and files.

Files is a collection of co-related information that is recorded in some format (such as text, pdf,
docs, etc.) and is stored on various storage mediums such as flash drives, hard disk drives
(HDD), magnetic tapes, optical disks, and tapes, etc. Files can be read-only or read-write. Files
are simply used as a medium for providing input(s) and getting output(s).
Now, an Operating System is nothing but a software program that acts as an interface between
the hardware, the application software, and the users. The main aim of an operating system is to
manage all the computer resources. So, we can simply say that the operating system gives a
platform to the application software and other system software to perform their task.

So, file management is one of the basic but important features provided by the operating system.
The file management in the operating system is nothing but software that handles or manages
the files (binary, text, pdf, docs, audio, video, etc.) present in computer software. The file system
in the operating system is capable of managing individual as well as groups of files present in the
computer system.

The file management in the operating system manages all the files present in the computer
system with various extensions (such as .exe, .pdf, .txt, .docx, etc.)

We can also use the file system in the operating system to get details of any file(s) present on our
system. The details can be:

 location of the file (the logical location where the file is stored in the computer system)
 the owner of the file (who can read or write on the particular file)
 when was the file created (time of file creation and modification time)
 a type of file (format of the file for example text, pdfs, docs, etc.)
 state of completion of the file, etc.

For file management in the operating system or to make the operating system understand a file,
the file must be in a predefined structure or format. There are three types of file structures
present in the operating systems:

1. Text file: A text file is a non-executable file containing a sequence of numbers, symbols,
and letters organized in the form of lines.
2. Source file: A source file is an executable file that contains a series of functions and
processes. In simple terms, we can say that a source file is a file that contains the
instructions of a program.
3. Object file: An object file is a file that contains object codes in the form of assembling
language code or machine language code. In simple terms, we can say that object files
contain program instructions in the form of a series of bytes and are organized in the form
of blocks.

 Functions of File Management in Operating System

Now let us talk about some of the most important functions of file management in operating
systems.

 Allows users to create, modify, and delete files on the computer system.
 Manages the locations of files present on the secondary memory or primary memory.
 Manages and handles the permissions of a particular file for various users and groups.
 Organizes the files in a tree-like structure for better visualization.
 Provides interface to I/O operations.
 Secures files from unauthorized access and hackers.

 Objectives of File Management in Operating System

 The file management in the operating system allows users to create a new file, and
modify and delete the old files present at different locations of the computer system.
 The operating system file management software manages the locations of the file store so
that files can be extracted easily.
 As we know, process shares files so, one of the most important features of file
management in operating systems is to make files sharable between processes. It helps
the various processes to securely access the required information from a file.
 The operating system file management software also manages the files so that there is
very little chance of data loss or data destruction.
 The file management in the operating system provides input-output operation support to
the files so that the data can be written, read, or extracted from the file(s).
 It also provides a standard input-output interface for the user and system processes. The
simple interface allows the easy and fast modification of data.
 The file management in the operating system also manages the various user permissions
present on a file. There is three user permission provided by the operating system, they
are: read, write, and execute.
 The file management in the operating system supports various types of storage devices
such as flash drives, hard disk drives (HDD), magnetic tapes, optical disks, tapes, etc.,
and it also allows the user(s) to store and extract them conveniently.
 It also organizes the files in a hierarchal manner in the form of files and folders
(directories) so that management of these files can be easier from the user's perspective as
well.
 Advantages of File Management in OS

Some of the main advantages that the file system in the operating system provides are:

 Protection of the files from unauthorized access.


 Recovers the free space created when files are removed or deleted from the hard disk.
 Assigns the disk space to various files with the help of disk management software of the
operating system.
 As we know, a file may be stored at various locations in the form of segments so the file
management in the operating system also keeps track of all the blocks or segments of a
particular file.
 Helps to manage the various user permissions so that only authorized persons can
perform the file modifications.

 Disadvantages of File Management in OS

Some of the main advantages that the file system in the operating system provides are:

 If the size of the files becomes large then the management takes a good amount of time
due to hierarchical order.
 To get more advanced management features, we need an advanced version of the file
management system. One of the advanced features is the document management feature
(DMS) which can organize important documents.
 The file system in the operating system can only manage the local files present in the
computer system.
 Security can be an issue sometimes as a virus in a file can spread across the various other
files due to tree-like (hierarchal) structure.
 Due to the hierarchal structure, file accessing can be slow sometimes.

Examples of File Management in Operating System

Some of the most common operations provided by the file browser of almost every operating
system are:

1. File creation.
2. File modification.
3. File deletion.
4. File transfer.
5. File renaming.
6. File copying and moving.
7. Changing file creation.
Examples of file browsers are:

1. Windows file manager (This PC).


2. Finder.
3. Dolphin.
4. One Drive.
5. GNOME Files, etc.

 Access Methods
 Sequential Access

Most of the operating systems access the file sequentially. In other words, we can say that most
of the files need to be accessed sequentially by the operating system.

In sequential access, the OS read the file word by word. A pointer is maintained which initially
points to the base address of the file. If the user wants to read first word of the file then the
pointer provides that word to the user and increases its value by 1 word. This process continues
till the end of the file.

Modern word systems do provide the concept of direct access and indexed access but the most
used method is sequential access due to the fact that most of the files such as text files, audio
files, video files, etc need to be sequentially accessed.

 Direct Access

The Direct Access is mostly required in the case of database systems. In most of the cases, we
need filtered information from the database. The sequential access can be very slow and
inefficient in such cases.
Suppose every block of the storage stores 4 records and we know that the record we needed is
stored in 10th block. In that case, the sequential access will not be implemented because it will
traverse all the blocks in order to access the needed record.

Direct access will give the required result despite of the fact that the operating system has to
perform some complex tasks such as determining the desired block number. However, that is
generally implemented in database applications.

 Indexed Access
 If a file can be sorted on any of the filed then an index can be assigned to a group of
certain records. However, A particular record can be accessed by its index. The index
is nothing but the address of a record in the file.
 In index accessing, searching in a large database became very quick and easy but we
need to have some extra space in the memory to store the index value.

 SPACE ALLOCATION STRATEGIES

In operating systems (OS), space allocation strategies refer to the methods used for managing
how files and data are stored on disk. The goal is to efficiently utilize available storage while
maintaining fast access to data. There are several common space allocation strategies, each with
advantages and trade-offs depending on the use case. The primary strategies include:

1. Contiguous Allocation

In contiguous allocation, each file occupies a continuous block of disk space. The OS needs to
allocate a single contiguous set of blocks for the file when it's created.

 Advantages:
o Simple and fast to access since a file's data is located in a single, contiguous area.
o Ideal for sequential access, as all data can be read in a single pass.
 Disadvantages:
o External fragmentation: Over time, as files are deleted and created, free space is
scattered into small non-contiguous areas.
o Hard to grow files: Expanding a file's size may require moving it to a different
location if there’s not enough contiguous space.
 Use case: Older file systems like early versions of FAT (File Allocation Table).

2. Linked Allocation

In linked allocation, each file is composed of linked blocks scattered around the disk. Each block
contains a pointer to the next block.

 Advantages:
o No external fragmentation since any free block can be used.
o Files can easily grow without needing to move them.
 Disadvantages:
o Slow sequential access since it involves following pointers.
o Reliability concerns: If one pointer is corrupted, the rest of the file may become
inaccessible.
o Wasted space due to the storage overhead of pointers in each block.
 Use case: Suitable for systems that favor dynamic and random file size changes, such as
early implementations of UNIX.

3. Indexed Allocation

In indexed allocation, each file has an index block, which contains pointers to the actual data
blocks. The index block can either be stored in a single block or use multiple blocks (multi-level
indexing).

 Advantages:
o Provides direct access to any block in the file, making it faster for random access.
o Avoids fragmentation problems, as any free block can be used.
 Disadvantages:
o Requires additional storage for the index, which can be significant, especially for
small files.
o Depending on the level of indexing, it can add complexity to manage large files.
 Use case: Widely used in modern file systems like ext2/ext3 in Linux.

4. Extent-Based Allocation

In extent-based allocation, each file is allocated one or more extents (continuous chunks of
blocks). If more space is needed, additional extents are allocated.

 Advantages:
o Efficient use of space, with reduced overhead for managing block pointers
compared to linked or indexed allocation.
o Combines the benefits of contiguous allocation (fast access for small files) with
flexibility for growing files.
 Disadvantages:
o Can still suffer from external fragmentation over time.
o Managing extents can be more complex compared to simpler allocation strategies.
 Use case: Extents are widely used in modern file systems, such as NTFS and ext4.

5. File Allocation Table (FAT)

The FAT strategy uses a table at the beginning of the disk to maintain information about which
blocks are allocated to which files. Each entry in the FAT corresponds to a block on the disk, and
it points to the next block of the file (similar to linked allocation).

 Advantages:
o Efficient for small storage devices.
o Simple implementation and easy to manage.
 Disadvantages:
o Poor scalability for large disks or systems with many files, as the FAT grows in
size.
o Sequential access can be slow, especially for large files, since each lookup
requires traversing the FAT.
 Use case: Still widely used in memory cards, USB flash drives, and older operating
systems.

6. B+ Tree Allocation

In B+ tree allocation, the file system uses a B+ tree structure to manage file data. Each file's
blocks are stored as tree nodes, with the leaf nodes containing the actual block addresses.

 Advantages:
o Excellent performance for both random and sequential access.
o Efficient management of large files and directories.
 Disadvantages:
o Complexity of the B+ tree structure can introduce overhead in terms of processing
and storage management.
 Use case: Common in advanced file systems such as ReiserFS and XFS.

Summary:

 Performance: Contiguous and extent-based allocations are faster for sequential access,
while indexed allocation is better for random access.
 Fragmentation: Linked and indexed allocations are less prone to external fragmentation
but may incur overhead due to pointer storage.
 Complexity: Simpler strategies like contiguous or linked allocation are easier to
implement but have limitations in scalability, while more complex strategies (extent-
based, B+ tree) offer better performance and flexibility.

Choosing the right space allocation strategy depends on the specific needs of the system, such as
whether it prioritizes speed, file growth, or minimizing fragmentation.

 Disk Arm Scheduling Strategies


Disk scheduling is a technique operating systems use to manage the order in which disk I/O
(input/output) requests are processed. Disk scheduling is also known as I/O Scheduling. The
main goals of disk scheduling are to optimize the performance of disk operations, reduce the
time it takes to access data and improve overall system efficiency.

What are Disk Scheduling Algorithms?


Disk scheduling algorithms are crucial in managing how data is read from and written to a
computer’s hard disk. These algorithms help determine the order in which disk read and write
requests are processed, significantly impacting the speed and efficiency of data access.
Common disk scheduling methods include First-Come, First-Served (FCFS), Shortest Seek
Time First (SSTF), SCAN, C-SCAN, LOOK, and C-LOOK. By understanding and
implementing these algorithms, we can optimize system performance and ensure faster data
retrieval.

Importance of Disk Scheduling in Operating System


 Multiple I/O requests may arrive by different processes and only one I/O request can be
served at a time by the disk controller. Thus other I/O requests need to wait in the waiting
queue and need to be scheduled.
 Two or more requests may be far from each other so this can result in greater disk arm
movement.
 Hard drives are one of the slowest parts of the computer system and thus need to be
accessed in an efficient manner.

 Disk Scheduling Algorithms


There are several Disk Several Algorithms. We will discuss in detail each one of them.
 FCFS (First Come First Serve)
 SSTF (Shortest Seek Time First)
 SCAN
 C-SCAN
 LOOK
 C-LOOK
 RSS (Random Scheduling)
 LIFO (Last-In First-Out)
 N-STEP SCAN
 F-SCAN
1. FCFS (First Come First Serve)
FCFS is the simplest of all Disk Scheduling Algorithms. In FCFS, the requests are addressed
in the order they arrive in the disk queue. Let us understand this with the help of an example.

Example:
Suppose the order of request is- (82,170,43,140,24,16,190)
And current position of Read/Write head is: 50

So, total overhead movement (total distance covered by the disk arm) =
(82-50)+(170-82)+(170-43)+(140-43)+(140-24)+(24-16)+(190-16) =642

Advantages of FCFS
Here are some of the advantages of First Come First Serve.
 Every request gets a fair chance
 No indefinite postponement

Disadvantages of FCFS
Here are some of the disadvantages of First Come First Serve.
 Does not try to optimize seek time
 May not provide the best possible service

2. SSTF (Shortest Seek Time First)


In SSTF (Shortest Seek Time First), requests having the shortest seek time are executed first.
So, the seek time of every request is calculated in advance in the queue and then they are
scheduled according to their calculated seek time. As a result, the request near the disk arm
will get executed first. SSTF is certainly an improvement over FCFS as it decreases the
average response time and increases the throughput of the system. Let us understand this with
the help of an example.
Suppose the order of request is- (82,170,43,140,24,16,190)
And current position of Read/Write head is: 50
So,
total overhead movement (total distance covered by the disk arm) =
(50-43)+(43-24)+(24-16)+(82-16)+(140-82)+(170-140)+(190-170) =208

Advantages of Shortest Seek Time First


Here are some of the advantages of Shortest Seek Time First.
 The average Response Time decreases
 Throughput increases
Disadvantages of Shortest Seek Time First
Here are some of the disadvantages of Shortest Seek Time First.
 Overhead to calculate seek time in advance
 Can cause Starvation for a request if it has a higher seek time as compared to incoming
requests
 The high variance of response time as SSTF favors only some requests

3. SCAN
In the SCAN algorithm the disk arm moves in a particular direction and services the requests
coming in its path and after reaching the end of the disk, it reverses its direction and again
services the request arriving in its path. So, this algorithm works as an elevator and is hence
also known as an elevator algorithm. As a result, the requests at the midrange are serviced
more and those arriving behind the disk arm will have to wait.
Suppose the requests to be addressed are-82, 170,43,140,24,16,190. And the Read/Write arm
is at 50, and it is also given that the disk arm should move “towards the larger value”.
Therefore, the total overhead movement (total distance covered by the disk arm) is calculated
as
= (199-50) + (199-16) = 332

Advantages of SCAN Algorithm


Here are some of the advantages of the SCAN Algorithm.
 High throughput
 Low variance of response time
 Average response time

Disadvantages of SCAN Algorithm


Here are some of the disadvantages of the SCAN Algorithm.
 Long waiting time for requests for locations just visited by disk arm

4. C-SCAN
In the SCAN algorithm, the disk arm again scans the path that has been scanned, after
reversing its direction. So, it may be possible that too many requests are waiting at the other
end or there may be zero or few requests pending at the scanned area.
These situations are avoided in the CSCAN algorithm in which the disk arm instead of
reversing its direction goes to the other end of the disk and starts servicing the requests from
there. So, the disk arm moves in a circular fashion and this algorithm is also similar to the
SCAN algorithm hence it is known as C-SCAN (Circular SCAN).
Suppose the requests to be addressed are-82,170,43,140,24,16,190. And the Read/Write arm
is at 50, and it is also given that the disk arm should move “towards the larger value”.
So, the total overhead movement (total distance covered by the disk arm) is calculated as:
=(199-50) + (199-0) + (43-0) = 391

Advantages of C-SCAN Algorithm


Here are some of the advantages of C-SCAN.
 Provides more uniform wait time compared to SCAN.

5. LOOK
LOOK Algorithm is similar to the SCAN disk scheduling algorithm except for the difference
that the disk arm in spite of going to the end of the disk goes only to the last request to be
serviced in front of the head and then reverses its direction from there only. Thus it prevents
the extra delay which occurred due to unnecessary traversal to the end of the disk.
Suppose the requests to be addressed are-82, 170,43,140,24,16,190. And the Read/Write arm
is at 50, and it is also given that the disk arm should move “towards the larger value”.
So, the total overhead movement (total distance covered by the disk arm) is calculated as:
= (190-50) + (190-16) = 314

6. LIFO (Last-In First-Out)


In LIFO (Last In, First Out) algorithm, the newest jobs are serviced before the existing ones
i.e. in order of requests that get serviced the job that is newest or last entered is serviced first,
and then the rest in the same order.

Advantages of LIFO (Last-In First-Out)


Here are some of the advantages of the Last In First Out Algorithm.
 Maximizes locality and resource utilization
 Can seem a little unfair to other requests and if new requests keep coming in, it cause
starvation to the old and existing ones.

 FILE ATTRIBUTES

Storing data is an essential component of using computers. We all store data in files.
Whatever the type of files may be, we use files daily. While using files you also may have
come across the ‘file attributes’. They are nothing but the characteristics of the file itself.

Each file has characteristics like file name, file type, date (on which file was created), etc.
These characteristics are referred to as ‘File Attributes’. The operating system associates
these attributes with files. In different operating systems files may have different attributes.
Some people call attributes metadata also.
Following are some common file attributes:
1. Name: File name is the name given to the file. A name is usually a string of characters.
2. Identifier: Identifier is a unique number for a file. It identifies files within the file
system. It is not readable to us, unlike file names.
3. Type: Type is another attribute of a file which specifies the type of file such as archive
file (.zip), source code file (.c, .java), .docx file, .txt file, etc.
4. Location: Specifies the location of the file on the device (The directory path). This
attribute is a pointer to a device.
5. Size: Specifies the current size of the file (in Kb, Mb, Gb, etc.) and possibly the
maximum allowed size of the file.
6. Protection: Specifies information about Access control (Permissions about Who can
read, edit, write, and execute the file.) It provides security to sensitive and private
information.
7. Time, date, and user identification: This information tells us about the date and time on
which the file was created, last modified, created and modified by which user, etc.
Some Other Attributes May Include:
Attributes related to flags. These Flags control or enable some specific property:
1. Read-only flag: 0 for read/write; 1 for read-only.
2. Hidden flag: 0 for normal; 1 for do not display in listings of all files.
3. System flag: 0 for normal files; 1 for system files.
4. Archive flag: 0 for has been backed up; 1 for needs to be backed up.
5. ASCII/binary flag: 0 for ASCII file; 1 for binary file.
6. Random access flag: 0 for sequential access only; 1 for random access.
7. Temporary flag: 0 for normal; 1 for deleted file on process exit.
8. Lock flags: 0 for unlocked; nonzero for locked.
Attribute related to keys. These are present in files which can be accessed using key:
1. Record length: Number of bytes in a record.
2. Key position: Offset of the key within each record.
3. Key length: Number of bytes in the key field.
Some file systems also support extended file attributes, such as character encoding of the
file and security features such as a file checksum.
All above attributes are not present in all files. Files may possess different attributes as per the
requirement. The attributes also varies from system to system. Attributes are also stored in
secondary storage (File name and identifier are stored in directory structure. Identifier in turn
locates other attributes). Attributes are important because they provide that extra information
about the files which can be useful.

 FILE OPERATIONS

File operations within an operating system (OS) encompass a set of essential tasks and actions
directed at files and directories residing within a computer’s file system. These operations are
fundamental for the effective management and manipulation of data stored on various storage
devices. In this article, we will learn different file operations and what are the system
calls and APIs used to perform them in a Linux / Windows-based OS.
 File Creation and Manipulation
File Creation and Manipulation encompasses essential operations within an operating system
that involve creating, modifying, and organizing files and directories. These actions are vital
for managing data efficiently and are integral to the functioning of computer systems.

File Operation Description System Calls / APIs

 open() (Linux-like
Create a new file for data
Creating Files systems)
storage.
 CreateFile() (Windows)

 mkdir() (Linux systems)


Creating Create a new directory for
 CreateDirectory()
Directories organizing files.
(Windows)

Open a file that you already


 open() (Linux systems)
Opening Files have open to read or write
 CreateFile() (Windows)
from.
File Operation Description System Calls / APIs

Retrieve data from an open  read() (Linux systems)


Reading Files
file.  ReadFile() (Windows)

 write() (Linux systems)


Writing Files Store data in an open file.
 WriteFile() (Windows)

 rename() (Linux
Renaming Files If you want to rename a file or
systems)
and Directories directory,.
 MoveFile() (Windows)

 unlink() (Linux
systems)
 remove() (Linux
Deleting Files and
Remove files or directories. systems)
Directories
 DeleteFile() (Windows)
 RemoveDirectory()
(Windows)

 File Organization and Search

File organization and search are key OS operations for arranging files systematically and
swiftly locating specific data, optimizing file management and user efficiency.

File Operation Description System Calls / APIs

Create duplicates of files in  cp (Linux systems)


Copying Files
another location.  CopyFile() (Windows)

Relocate files from one  mv (Linux systems)


Moving Files
location to another.  MoveFile() (Windows)

 find (Linux systems)


Searching for Locate files based on specific
 FindFirstFile() and
Files criteria.
FindNextFile() (Windows)
 File Security and Metadata

File Security and Metadata are vital components of file management, encompassing access
control and crucial file information preservation within an operating system. They are
essential for data security and efficient organization.

File Operation Description System Calls / APIs

 chmod (Linux systems)


File Control access rights to files and
 SetFileSecurity
Permissions directories.
(Windows)

 chown (Linux systems)


Assign specific users or groups as file
File Ownership  SetFileSecurity
owners.
(Windows)

 stat (Linux systems)


Retrieve and manipulate file
File Metadata  Get File Attributes
information.
 Ex (Windows)

 File Compression and Encryption


File Compression and Encryption are essential for optimizing storage and enhancing data
security. Compression reduces file sizes, while encryption safeguards data privacy by making
it unreadable without the correct decryption key.

File Operation Description System Calls / APIs

File Reduce file sizes to save  gzip, zip, tar (Linux systems),
Compression storage space.  Compress-Archive (Windows)
File Operation Description System Calls / APIs

 openssl, gpg (Linux systems)


Protect data by converting
File  Windows provides encryption
it into an unreadable
Encryption libraries and APIs for encryption
format.
operations.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy