Documente Academic
Documente Profesional
Documente Cultură
BS Information Technology 3A
File Management
File(s)
1. Filename - Each file has a unique, symbolic filename which allows users to differentiate
one file from another.
2. File ID – The operating system actually uses file identifiers or file ID’s to distinguish files from
one another. A file ID is a unique number assigned to a file. It is used by the OS in
manipulating files.
3. File Size – This indicates the actual size of the file commonly expressed in bytes or
kilobytes. The size of a file may also be given in terms of the number block or sectors it
occupies when stored in a secondary device like the hard disk.
4. File Type – this indicates what kind of file it is (whether it is an executable file, a text file, a
library file, etc.)
5. File Date/Time – this includes information such as the date and time the file was created,
last modified, last accessed, last backed-up, etc.
6. File Location – this contains information on which storage device and the exact location
within that device the file is stored.
7. File Protected – this contains access-control information about the file. It indicates which
user or process has read-write access or read-only access. If the file is a program, this
information indicates if a user executes it or not.
8. File Attribute Flags – these are flags or bits that contain additional information about a
file. Common attribute flags are:
a. Hidden Flag – this flag is a 1 if the file is hidden file. Hidden files are not shown
when a list of files is requested by a user.
b. System Flag – this flag or bit is a 1 if a file is an operating system file. It is a 0 for
normal or ordinary files. Like hidden files, system files are usually not shown when a
list of file is requested by a user. In addition, system files cannot be simply copied
and deleted by the users.
d. Read-Only Flag – this flag or bit is a 1 if the file is for read-only access
File Operations
2. Delete – this operation allows the deletion of files that are no longer needed in order to
free up more space in secondary storage.
3. Open – before the file can be read or modified, it has to be open first.
4. Close – once a file is closed, the attributes and disk location of the file that were loaded
into the main memory when it was opened are deleted.
6. Copy – this operation copies the contents of one file into another, thereby creating a
duplicate of that file.
7. Get Attribute – this operation allows a user or a process to read the attributes of a file.
8. Set Attribute - this operation allows a user to modify the attribute of a file.
10. Read – this operation copies the contents of the file to the main memory. The data
copied can then be processed by the requesting user or process.
11. Modify or Write – this operation copies the data stored in main memory to a file.
12. Append – this is a special kind of write operation wherein data can only be added at the
end of a file.
Directories/Folders
1. Search – the operation allows a user or a process to search a directory for a specific file.
2. Create a file – when a file is created, the operation allows that file to be included or
added in a directory.
3. Delete a file – when a file is deleted, the operation removes the file in a directory.
4. Rename a file – when a file is renamed, this operation will also renames its entry in a
directory.
6. Traverse a File System – this system allows a user to move to different directories within
the file system.
Directory Structure
✓ Entire file system has only one directory and all files are stored in that directory.
✓ Aside from files, a directory may also contain subdirectories and subdirectories
may contain other subdirectories.
1. Contiguous Allocation
Operating system stores a file using contiguous or consecutive blocks in the hard
disk.
2. Linked Allocation
3. Clustering
4. Indexed Allocation
Pointers for the blocks of a particular file are stored in a single block called the
index block
There are basically two methods that are widely used in the implementation of the free-space
list:
A. Grouping Method
A string of bits is used to indicate whether a particular disk block is free or not.