File Systems and Management Module 2 Computer Science Engineering (CSE) Notes | EduRev

Computer Science Engineering (CSE) : File Systems and Management Module 2 Computer Science Engineering (CSE) Notes | EduRev

 Page 1


Operating Systems/ File Systems and Management                                    Lecture Notes 
PCP Bhatt/IISc,Bangalore                                                                                    M2/V1/June 04/1 
Module 2: File Systems and Management 
In the previous module, we emphasized that a computer system processes and stores 
information. Usually, during processing computers need to frequently access primary 
memory for instructions and data. However, the primary memory can be used only for 
only temporary storage of information. This is so because the primary memory of a 
computer system is volatile. The volatility is evinced by the fact that when we switch off 
the power the information stored in the primary memory is lost. The secondary memory, 
on the other hand, is non-volatile. This means that once the user has finished his current 
activity on a computer and shut down his system, the information on disks (or any other 
form of secondary memory) is still available for a later access. The non-volatility of the 
memory enables the disks to store information indefinitely. Note that this information can 
also be made available online all the time. Users think of all such information as files. As 
a matter of fact, while working on a computer system a user is continually engaged in 
managing or using his files in one way or another. OS provides support for such 
management through a file system. File system is the software which empowers users and 
applications to organize and manage their files. The organization and management of 
files may involve access, updates and several other file operations. In this chapter our 
focus shall be on organization and management of files. 
2.1 What Are Files? 
Suppose we are developing an application program. A program, which we prepare, is a 
file. Later we may compile this program file and get an object code or an executable. The 
executable is also a file. In other words, the output from a compiler may be an object 
code file or an executable file. When we store images from a web page we get an image 
file. If we store some music in digital format it is an audio file. So, in almost every 
situation we are engaged in using a file. In addition, we saw in the previous module that 
files are central to our view of communication with IO devices. So let us now ask again:  
What is a file? 
Irrespective of the content any organized information is a file. 
So be it a telephone numbers list or a program or an executable code or a web image or a 
data logged from an instrument we think of it always as a file. This formlessness and 
disassociation from content was emphasized first in Unix. The formlessness essentially 
Page 2


Operating Systems/ File Systems and Management                                    Lecture Notes 
PCP Bhatt/IISc,Bangalore                                                                                    M2/V1/June 04/1 
Module 2: File Systems and Management 
In the previous module, we emphasized that a computer system processes and stores 
information. Usually, during processing computers need to frequently access primary 
memory for instructions and data. However, the primary memory can be used only for 
only temporary storage of information. This is so because the primary memory of a 
computer system is volatile. The volatility is evinced by the fact that when we switch off 
the power the information stored in the primary memory is lost. The secondary memory, 
on the other hand, is non-volatile. This means that once the user has finished his current 
activity on a computer and shut down his system, the information on disks (or any other 
form of secondary memory) is still available for a later access. The non-volatility of the 
memory enables the disks to store information indefinitely. Note that this information can 
also be made available online all the time. Users think of all such information as files. As 
a matter of fact, while working on a computer system a user is continually engaged in 
managing or using his files in one way or another. OS provides support for such 
management through a file system. File system is the software which empowers users and 
applications to organize and manage their files. The organization and management of 
files may involve access, updates and several other file operations. In this chapter our 
focus shall be on organization and management of files. 
2.1 What Are Files? 
Suppose we are developing an application program. A program, which we prepare, is a 
file. Later we may compile this program file and get an object code or an executable. The 
executable is also a file. In other words, the output from a compiler may be an object 
code file or an executable file. When we store images from a web page we get an image 
file. If we store some music in digital format it is an audio file. So, in almost every 
situation we are engaged in using a file. In addition, we saw in the previous module that 
files are central to our view of communication with IO devices. So let us now ask again:  
What is a file? 
Irrespective of the content any organized information is a file. 
So be it a telephone numbers list or a program or an executable code or a web image or a 
data logged from an instrument we think of it always as a file. This formlessness and 
disassociation from content was emphasized first in Unix. The formlessness essentially 
Operating Systems/ File Systems and Management                                    Lecture Notes 
PCP Bhatt/IISc,Bangalore                                                                                    M2/V1/June 04/2 
means that files are arbitrary bit (or byte) streams. Formlessness in Unix follows from the 
basic design principle: keep it simple. The main advantage to a user is flexibility in 
organizing files. In addition, it also makes it easy to design a file system. A file system is 
that software which allows users and applications to organize their files. The organization 
of information may involve access, updates and movement of information between 
devices. Later in this module we shall examine the user view of organizing files and the 
system view of managing the files of users and applications. We shall first look at the 
user view of files. 
User's view of files: The very first need of a user is to be able to access some file he has 
stored in a non-volatile memory for an on-line access. Also, the file system should be 
able to locate the file sought by the user. This is achieved by associating an identification  
for a file i.e. a file must have a name. The name helps the user to identify the file. The file 
name also helps the file system to locate the file being sought by the user. 
Let us consider the organization of my files for the Compilers course and the Operating 
Systems course on the web. Clearly, all files in compilers course have a set of pages that 
are related. Also, the pages of the OS system course are related. It is, therefore, natural to 
think of organizing the files of individual courses together. In other words, we would like 
to see that a file system supports grouping of related files. In addition, we would like that 
all such groups be put together under some general category (like COURSES). 
This is essentially like making one file folder for the compilers course pages and other 
one for the OS course pages. Both these folders could be placed within another folder, 
say COURSES. This is precisely how MAC OS defines its folders. In Unix, each such 
group, with related files in it, is called a directory. So the COURSES directory may have 
subdirectories OS and COMPILERS to get a hierarchical file organization. All modern 
OSs support such a hierarchical file organization. In Figure 2.1 we show a hierarchy of 
files. It must be noted that within a directory each file must have a distinct name. For 
instance, I tend to have ReadMe file in directories to give me the information on what is 
in each directory. At most there can be only one file with the name “ReadMe" in a 
directory. However, every subdirectory under this directory may also have its own 
ReadMe file. Unix emphasizes disassociation with content and form. So file names can 
be assigned any way. 
Page 3


Operating Systems/ File Systems and Management                                    Lecture Notes 
PCP Bhatt/IISc,Bangalore                                                                                    M2/V1/June 04/1 
Module 2: File Systems and Management 
In the previous module, we emphasized that a computer system processes and stores 
information. Usually, during processing computers need to frequently access primary 
memory for instructions and data. However, the primary memory can be used only for 
only temporary storage of information. This is so because the primary memory of a 
computer system is volatile. The volatility is evinced by the fact that when we switch off 
the power the information stored in the primary memory is lost. The secondary memory, 
on the other hand, is non-volatile. This means that once the user has finished his current 
activity on a computer and shut down his system, the information on disks (or any other 
form of secondary memory) is still available for a later access. The non-volatility of the 
memory enables the disks to store information indefinitely. Note that this information can 
also be made available online all the time. Users think of all such information as files. As 
a matter of fact, while working on a computer system a user is continually engaged in 
managing or using his files in one way or another. OS provides support for such 
management through a file system. File system is the software which empowers users and 
applications to organize and manage their files. The organization and management of 
files may involve access, updates and several other file operations. In this chapter our 
focus shall be on organization and management of files. 
2.1 What Are Files? 
Suppose we are developing an application program. A program, which we prepare, is a 
file. Later we may compile this program file and get an object code or an executable. The 
executable is also a file. In other words, the output from a compiler may be an object 
code file or an executable file. When we store images from a web page we get an image 
file. If we store some music in digital format it is an audio file. So, in almost every 
situation we are engaged in using a file. In addition, we saw in the previous module that 
files are central to our view of communication with IO devices. So let us now ask again:  
What is a file? 
Irrespective of the content any organized information is a file. 
So be it a telephone numbers list or a program or an executable code or a web image or a 
data logged from an instrument we think of it always as a file. This formlessness and 
disassociation from content was emphasized first in Unix. The formlessness essentially 
Operating Systems/ File Systems and Management                                    Lecture Notes 
PCP Bhatt/IISc,Bangalore                                                                                    M2/V1/June 04/2 
means that files are arbitrary bit (or byte) streams. Formlessness in Unix follows from the 
basic design principle: keep it simple. The main advantage to a user is flexibility in 
organizing files. In addition, it also makes it easy to design a file system. A file system is 
that software which allows users and applications to organize their files. The organization 
of information may involve access, updates and movement of information between 
devices. Later in this module we shall examine the user view of organizing files and the 
system view of managing the files of users and applications. We shall first look at the 
user view of files. 
User's view of files: The very first need of a user is to be able to access some file he has 
stored in a non-volatile memory for an on-line access. Also, the file system should be 
able to locate the file sought by the user. This is achieved by associating an identification  
for a file i.e. a file must have a name. The name helps the user to identify the file. The file 
name also helps the file system to locate the file being sought by the user. 
Let us consider the organization of my files for the Compilers course and the Operating 
Systems course on the web. Clearly, all files in compilers course have a set of pages that 
are related. Also, the pages of the OS system course are related. It is, therefore, natural to 
think of organizing the files of individual courses together. In other words, we would like 
to see that a file system supports grouping of related files. In addition, we would like that 
all such groups be put together under some general category (like COURSES). 
This is essentially like making one file folder for the compilers course pages and other 
one for the OS course pages. Both these folders could be placed within another folder, 
say COURSES. This is precisely how MAC OS defines its folders. In Unix, each such 
group, with related files in it, is called a directory. So the COURSES directory may have 
subdirectories OS and COMPILERS to get a hierarchical file organization. All modern 
OSs support such a hierarchical file organization. In Figure 2.1 we show a hierarchy of 
files. It must be noted that within a directory each file must have a distinct name. For 
instance, I tend to have ReadMe file in directories to give me the information on what is 
in each directory. At most there can be only one file with the name “ReadMe" in a 
directory. However, every subdirectory under this directory may also have its own 
ReadMe file. Unix emphasizes disassociation with content and form. So file names can 
be assigned any way. 
Operating Systems/ File Systems and Management                                    Lecture Notes 
PCP Bhatt/IISc,Bangalore                                                                                    M2/V1/June 04/3 
Some systems, however, require specific name extensions to identify file type. MSDOS 
identifies executable files with a .COM or .EXE file name extension. Software systems 
like C or Pascal compilers expect file name extensions of .c or .p (or .pas) respectively. In 
 
Section 2.1.1 and others we see some common considerations in associating a file name 
extension to define a file type. 
2.1.1 File Types and Operations 
Many OSs, particularly those used in personal computers, tend to use a file type 
information within a name. Even Unix software support systems use standard file 
extension names, even though Unix as an OS does not require this. Most PC-based OSs 
associate file types with specific applications that generate them. For instance, a database 
generating program will leave explicit information with a file descriptor that it has been 
generated by a certain database program. A file descriptor is kept within the file structure 
and is often used by the file system software to help OS provide file management 
services. MAC OS usually stores this information in its resource fork which is a part of 
its file descriptors. 
This is done to let OS display the icons of the application environment in which this file 
was created. These icons are important for PC users. The icons offer the operational clues 
as well. In Windows, for instance, if a file has been created using notepad or word or has 
been stored from the browser, a corresponding give away icon appears. In fact, the OS 
assigns it a file type. If the icon has an Adobe sign on it and we double click on it the 
acrobat reader opens it right away. Of course, if we choose to open any of the files 
differently, the OS provides us that as a choice (often using the right button). 
Page 4


Operating Systems/ File Systems and Management                                    Lecture Notes 
PCP Bhatt/IISc,Bangalore                                                                                    M2/V1/June 04/1 
Module 2: File Systems and Management 
In the previous module, we emphasized that a computer system processes and stores 
information. Usually, during processing computers need to frequently access primary 
memory for instructions and data. However, the primary memory can be used only for 
only temporary storage of information. This is so because the primary memory of a 
computer system is volatile. The volatility is evinced by the fact that when we switch off 
the power the information stored in the primary memory is lost. The secondary memory, 
on the other hand, is non-volatile. This means that once the user has finished his current 
activity on a computer and shut down his system, the information on disks (or any other 
form of secondary memory) is still available for a later access. The non-volatility of the 
memory enables the disks to store information indefinitely. Note that this information can 
also be made available online all the time. Users think of all such information as files. As 
a matter of fact, while working on a computer system a user is continually engaged in 
managing or using his files in one way or another. OS provides support for such 
management through a file system. File system is the software which empowers users and 
applications to organize and manage their files. The organization and management of 
files may involve access, updates and several other file operations. In this chapter our 
focus shall be on organization and management of files. 
2.1 What Are Files? 
Suppose we are developing an application program. A program, which we prepare, is a 
file. Later we may compile this program file and get an object code or an executable. The 
executable is also a file. In other words, the output from a compiler may be an object 
code file or an executable file. When we store images from a web page we get an image 
file. If we store some music in digital format it is an audio file. So, in almost every 
situation we are engaged in using a file. In addition, we saw in the previous module that 
files are central to our view of communication with IO devices. So let us now ask again:  
What is a file? 
Irrespective of the content any organized information is a file. 
So be it a telephone numbers list or a program or an executable code or a web image or a 
data logged from an instrument we think of it always as a file. This formlessness and 
disassociation from content was emphasized first in Unix. The formlessness essentially 
Operating Systems/ File Systems and Management                                    Lecture Notes 
PCP Bhatt/IISc,Bangalore                                                                                    M2/V1/June 04/2 
means that files are arbitrary bit (or byte) streams. Formlessness in Unix follows from the 
basic design principle: keep it simple. The main advantage to a user is flexibility in 
organizing files. In addition, it also makes it easy to design a file system. A file system is 
that software which allows users and applications to organize their files. The organization 
of information may involve access, updates and movement of information between 
devices. Later in this module we shall examine the user view of organizing files and the 
system view of managing the files of users and applications. We shall first look at the 
user view of files. 
User's view of files: The very first need of a user is to be able to access some file he has 
stored in a non-volatile memory for an on-line access. Also, the file system should be 
able to locate the file sought by the user. This is achieved by associating an identification  
for a file i.e. a file must have a name. The name helps the user to identify the file. The file 
name also helps the file system to locate the file being sought by the user. 
Let us consider the organization of my files for the Compilers course and the Operating 
Systems course on the web. Clearly, all files in compilers course have a set of pages that 
are related. Also, the pages of the OS system course are related. It is, therefore, natural to 
think of organizing the files of individual courses together. In other words, we would like 
to see that a file system supports grouping of related files. In addition, we would like that 
all such groups be put together under some general category (like COURSES). 
This is essentially like making one file folder for the compilers course pages and other 
one for the OS course pages. Both these folders could be placed within another folder, 
say COURSES. This is precisely how MAC OS defines its folders. In Unix, each such 
group, with related files in it, is called a directory. So the COURSES directory may have 
subdirectories OS and COMPILERS to get a hierarchical file organization. All modern 
OSs support such a hierarchical file organization. In Figure 2.1 we show a hierarchy of 
files. It must be noted that within a directory each file must have a distinct name. For 
instance, I tend to have ReadMe file in directories to give me the information on what is 
in each directory. At most there can be only one file with the name “ReadMe" in a 
directory. However, every subdirectory under this directory may also have its own 
ReadMe file. Unix emphasizes disassociation with content and form. So file names can 
be assigned any way. 
Operating Systems/ File Systems and Management                                    Lecture Notes 
PCP Bhatt/IISc,Bangalore                                                                                    M2/V1/June 04/3 
Some systems, however, require specific name extensions to identify file type. MSDOS 
identifies executable files with a .COM or .EXE file name extension. Software systems 
like C or Pascal compilers expect file name extensions of .c or .p (or .pas) respectively. In 
 
Section 2.1.1 and others we see some common considerations in associating a file name 
extension to define a file type. 
2.1.1 File Types and Operations 
Many OSs, particularly those used in personal computers, tend to use a file type 
information within a name. Even Unix software support systems use standard file 
extension names, even though Unix as an OS does not require this. Most PC-based OSs 
associate file types with specific applications that generate them. For instance, a database 
generating program will leave explicit information with a file descriptor that it has been 
generated by a certain database program. A file descriptor is kept within the file structure 
and is often used by the file system software to help OS provide file management 
services. MAC OS usually stores this information in its resource fork which is a part of 
its file descriptors. 
This is done to let OS display the icons of the application environment in which this file 
was created. These icons are important for PC users. The icons offer the operational clues 
as well. In Windows, for instance, if a file has been created using notepad or word or has 
been stored from the browser, a corresponding give away icon appears. In fact, the OS 
assigns it a file type. If the icon has an Adobe sign on it and we double click on it the 
acrobat reader opens it right away. Of course, if we choose to open any of the files 
differently, the OS provides us that as a choice (often using the right button). 
Operating Systems/ File Systems and Management                                    Lecture Notes 
PCP Bhatt/IISc,Bangalore                                                                                    M2/V1/June 04/4 
For a user the extension in the name of a file helps to identify the file type. When a user 
has a very large number of files, it is very helpful to know the type of a file from its name 
extensions. In Table 2.1, we have many commonly used file name extensions. PDP-11 
machines, on which Unix was originally designed, used an octal 0407 as a magic number 
to identify its executable files. This number actually was a machine executable jump 
instruction which would simply set the program counter to fetch the first executable 
 
instruction in the file. Modern systems use many magic numbers to identify which 
application created or will execute a certain file. 
In addition to the file types, a file system must have many other pieces of information 
that are important. For instance, a file system must know at which location a file is placed 
in the disk, it should know its size, when was it created, i.e. date and time of creation. 
In addition, it should know who owns the files and who else may be permitted access to 
read, write or execute. We shall next dwell upon these operational issues. 
File operations: As we observed earlier, a file is any organized information. So at that 
level of abstraction it should be possible for us to have some logical view of files, no 
matter how these may be stored. Note that the files are stored within the secondary 
storage. This is a physical view of a file. A file system (as a layer of software) provides a 
logical view of files to a user or to an application. Yet, at another level the file system 
offers the physical view to the OS. This means that the OS gets all the information it 
needs to physically locate, access, and do other file based operations whenever needed. 
Purely from an operational point of view, a user should be able to create a file. We will 
also assume that the creator owns the file. In that case he may wish to save or store this 
file. He should be able to read the contents of the file or even write into this file. Note 
that a user needs the write capability to update a file. He may wish to display or rename 
or append this file. He may even wish to make another copy or even delete this file. He 
Page 5


Operating Systems/ File Systems and Management                                    Lecture Notes 
PCP Bhatt/IISc,Bangalore                                                                                    M2/V1/June 04/1 
Module 2: File Systems and Management 
In the previous module, we emphasized that a computer system processes and stores 
information. Usually, during processing computers need to frequently access primary 
memory for instructions and data. However, the primary memory can be used only for 
only temporary storage of information. This is so because the primary memory of a 
computer system is volatile. The volatility is evinced by the fact that when we switch off 
the power the information stored in the primary memory is lost. The secondary memory, 
on the other hand, is non-volatile. This means that once the user has finished his current 
activity on a computer and shut down his system, the information on disks (or any other 
form of secondary memory) is still available for a later access. The non-volatility of the 
memory enables the disks to store information indefinitely. Note that this information can 
also be made available online all the time. Users think of all such information as files. As 
a matter of fact, while working on a computer system a user is continually engaged in 
managing or using his files in one way or another. OS provides support for such 
management through a file system. File system is the software which empowers users and 
applications to organize and manage their files. The organization and management of 
files may involve access, updates and several other file operations. In this chapter our 
focus shall be on organization and management of files. 
2.1 What Are Files? 
Suppose we are developing an application program. A program, which we prepare, is a 
file. Later we may compile this program file and get an object code or an executable. The 
executable is also a file. In other words, the output from a compiler may be an object 
code file or an executable file. When we store images from a web page we get an image 
file. If we store some music in digital format it is an audio file. So, in almost every 
situation we are engaged in using a file. In addition, we saw in the previous module that 
files are central to our view of communication with IO devices. So let us now ask again:  
What is a file? 
Irrespective of the content any organized information is a file. 
So be it a telephone numbers list or a program or an executable code or a web image or a 
data logged from an instrument we think of it always as a file. This formlessness and 
disassociation from content was emphasized first in Unix. The formlessness essentially 
Operating Systems/ File Systems and Management                                    Lecture Notes 
PCP Bhatt/IISc,Bangalore                                                                                    M2/V1/June 04/2 
means that files are arbitrary bit (or byte) streams. Formlessness in Unix follows from the 
basic design principle: keep it simple. The main advantage to a user is flexibility in 
organizing files. In addition, it also makes it easy to design a file system. A file system is 
that software which allows users and applications to organize their files. The organization 
of information may involve access, updates and movement of information between 
devices. Later in this module we shall examine the user view of organizing files and the 
system view of managing the files of users and applications. We shall first look at the 
user view of files. 
User's view of files: The very first need of a user is to be able to access some file he has 
stored in a non-volatile memory for an on-line access. Also, the file system should be 
able to locate the file sought by the user. This is achieved by associating an identification  
for a file i.e. a file must have a name. The name helps the user to identify the file. The file 
name also helps the file system to locate the file being sought by the user. 
Let us consider the organization of my files for the Compilers course and the Operating 
Systems course on the web. Clearly, all files in compilers course have a set of pages that 
are related. Also, the pages of the OS system course are related. It is, therefore, natural to 
think of organizing the files of individual courses together. In other words, we would like 
to see that a file system supports grouping of related files. In addition, we would like that 
all such groups be put together under some general category (like COURSES). 
This is essentially like making one file folder for the compilers course pages and other 
one for the OS course pages. Both these folders could be placed within another folder, 
say COURSES. This is precisely how MAC OS defines its folders. In Unix, each such 
group, with related files in it, is called a directory. So the COURSES directory may have 
subdirectories OS and COMPILERS to get a hierarchical file organization. All modern 
OSs support such a hierarchical file organization. In Figure 2.1 we show a hierarchy of 
files. It must be noted that within a directory each file must have a distinct name. For 
instance, I tend to have ReadMe file in directories to give me the information on what is 
in each directory. At most there can be only one file with the name “ReadMe" in a 
directory. However, every subdirectory under this directory may also have its own 
ReadMe file. Unix emphasizes disassociation with content and form. So file names can 
be assigned any way. 
Operating Systems/ File Systems and Management                                    Lecture Notes 
PCP Bhatt/IISc,Bangalore                                                                                    M2/V1/June 04/3 
Some systems, however, require specific name extensions to identify file type. MSDOS 
identifies executable files with a .COM or .EXE file name extension. Software systems 
like C or Pascal compilers expect file name extensions of .c or .p (or .pas) respectively. In 
 
Section 2.1.1 and others we see some common considerations in associating a file name 
extension to define a file type. 
2.1.1 File Types and Operations 
Many OSs, particularly those used in personal computers, tend to use a file type 
information within a name. Even Unix software support systems use standard file 
extension names, even though Unix as an OS does not require this. Most PC-based OSs 
associate file types with specific applications that generate them. For instance, a database 
generating program will leave explicit information with a file descriptor that it has been 
generated by a certain database program. A file descriptor is kept within the file structure 
and is often used by the file system software to help OS provide file management 
services. MAC OS usually stores this information in its resource fork which is a part of 
its file descriptors. 
This is done to let OS display the icons of the application environment in which this file 
was created. These icons are important for PC users. The icons offer the operational clues 
as well. In Windows, for instance, if a file has been created using notepad or word or has 
been stored from the browser, a corresponding give away icon appears. In fact, the OS 
assigns it a file type. If the icon has an Adobe sign on it and we double click on it the 
acrobat reader opens it right away. Of course, if we choose to open any of the files 
differently, the OS provides us that as a choice (often using the right button). 
Operating Systems/ File Systems and Management                                    Lecture Notes 
PCP Bhatt/IISc,Bangalore                                                                                    M2/V1/June 04/4 
For a user the extension in the name of a file helps to identify the file type. When a user 
has a very large number of files, it is very helpful to know the type of a file from its name 
extensions. In Table 2.1, we have many commonly used file name extensions. PDP-11 
machines, on which Unix was originally designed, used an octal 0407 as a magic number 
to identify its executable files. This number actually was a machine executable jump 
instruction which would simply set the program counter to fetch the first executable 
 
instruction in the file. Modern systems use many magic numbers to identify which 
application created or will execute a certain file. 
In addition to the file types, a file system must have many other pieces of information 
that are important. For instance, a file system must know at which location a file is placed 
in the disk, it should know its size, when was it created, i.e. date and time of creation. 
In addition, it should know who owns the files and who else may be permitted access to 
read, write or execute. We shall next dwell upon these operational issues. 
File operations: As we observed earlier, a file is any organized information. So at that 
level of abstraction it should be possible for us to have some logical view of files, no 
matter how these may be stored. Note that the files are stored within the secondary 
storage. This is a physical view of a file. A file system (as a layer of software) provides a 
logical view of files to a user or to an application. Yet, at another level the file system 
offers the physical view to the OS. This means that the OS gets all the information it 
needs to physically locate, access, and do other file based operations whenever needed. 
Purely from an operational point of view, a user should be able to create a file. We will 
also assume that the creator owns the file. In that case he may wish to save or store this 
file. He should be able to read the contents of the file or even write into this file. Note 
that a user needs the write capability to update a file. He may wish to display or rename 
or append this file. He may even wish to make another copy or even delete this file. He 
Operating Systems/ File Systems and Management                                    Lecture Notes 
PCP Bhatt/IISc,Bangalore                                                                                    M2/V1/June 04/5 
may even wish to operate with two or more files. This may entail cut or copy from one 
file and paste information on the other. 
Other management operations are like indicating who else has an authorization of an 
access to read or write or execute this file. In addition, a user should be able to move this 
file between his directories. For all of these operations the OS provides the services. 
These services may even be obtained from within an application like mail or a utility 
such as an editor. Unix provides a visual editor vi for ASCII file editing. It also provides 
another editor sed for stream editing. MAC OS and PCs provide a range of editors like 
SimpleText. 
 
With multimedia capabilities now with PCs we have editors for audio and video files too. 
These often employ MIDI capabilities. MAC OS has Claris works (or Apple works) and 
MSDOS-based systems have Office 2000 suite of packaged applications which provide 
the needed file oriented services. See Table 2.2 for a summary of common file 
operations. 
For illustration of many of the basic operations and introduction of shell commands we 
shall assume that we are dealing with ASCII text files. One may need information on file 
sizes. More particularly, one may wish to determine the number of lines, words or 
characters in a file. For such requirements, a shell may have a suite of word counting 
programs. When there are many files, one often needs longer file names. Often file names 
may bear a common stem to help us categorize them. For instance, I tend to use “prog” as 
a prefix to identify my program text files. A programmer derives considerable support 
through use of regular expressions within file names. Use of regular expressions 
Read More
Offer running on EduRev: Apply code STAYHOME200 to get INR 200 off on our premium plan EduRev Infinity!

Related Searches

ppt

,

Free

,

Viva Questions

,

past year papers

,

MCQs

,

study material

,

Important questions

,

video lectures

,

pdf

,

File Systems and Management Module 2 Computer Science Engineering (CSE) Notes | EduRev

,

Objective type Questions

,

Exam

,

practice quizzes

,

Semester Notes

,

Summary

,

shortcuts and tricks

,

Sample Paper

,

mock tests for examination

,

File Systems and Management Module 2 Computer Science Engineering (CSE) Notes | EduRev

,

File Systems and Management Module 2 Computer Science Engineering (CSE) Notes | EduRev

,

Previous Year Questions with Solutions

,

Extra Questions

;