1. Preliminary
In a computer operating system
recognizes a file management system. This file management system needs to be
implemented to be used in computer operating systems. In implementing it often
cause some problems, therefore the problem must be solved by computer operating
system. The solution has several ways that each has its own advantages and
disadvantages. The performance of the file management system also has several
ways that can be used.
2. File Implementation
In the implementation of file management system
often cause many problems, among others in terms of file storage, storage space
management, reliability, and performance in the implementation of the file
management system. The following will be explained completely the problems.
2.1. File Storage
Storage and accessing from / to devices within the
unit of information. Blocks contain a set of fixed-size bytes that are moved
from memory storage for processing and vice versa. The same block size on different
devices can lead to waste of storage space, in addition to block size
differences is also very difficult to write the program. For that we need the
selection of block size carefully to minimize waste, as well as facilitate the
writing of the program.
The data block has addressing, serves to refer to the block. The block
address bias is called a block pointer, which contains the address to access
the block. Block addressing can be done in three ways, ie physical addressing
disk, relative addressing, as well as symbolic addressing.
Physical disk addressing refers to a unit of data on the disk physically. The relative addressing is the use of a number from zero to the maximum number of blocks which is then converted to a physical address with a count which is performed by the operating system. Symbolic addressing is the naming of each block, the use of the address table, containing the physical address or relative block and the search procedure to obtain the block address.
The next block can be achieved with a short time if the block is adjacent to the previous block. Such proximity is called locality. The stronger the locality, the faster the data access is done. The weak localities show slow access so that the system has to destroy the closeness of the most frequently accessed data blocks.
Physical disk addressing refers to a unit of data on the disk physically. The relative addressing is the use of a number from zero to the maximum number of blocks which is then converted to a physical address with a count which is performed by the operating system. Symbolic addressing is the naming of each block, the use of the address table, containing the physical address or relative block and the search procedure to obtain the block address.
The next block can be achieved with a short time if the block is adjacent to the previous block. Such proximity is called locality. The stronger the locality, the faster the data access is done. The weak localities show slow access so that the system has to destroy the closeness of the most frequently accessed data blocks.
2.2 File System ImplementationThe file contains a set of blocks. The file management system is responsible for allocating disk blocks to files. Two
important things to be addressed are the recording of the space
allocated to the file, the recording of the free space available on the
disk. The file system includes file allocation, disk space recording,
shared files, file system reliability, and file system performance.
The main problem in file allocation is the recording of blocks used by the file. Various methods can be used, including contiguous allocation. This technique is the simplest allocation scheme, which stores files as consecutive data blocks (contigu) on the disk.
The advantage is simple in implementation because of the recording where the file blocks are reduced to only remember the initial address of the file and the length of the file, ie the number of blocks of the file. Its performance is unbelievably good Because the entire file can be read from disk with one operation. No other allocation method can match the access performance. This advantage is obtained because logically sequential records are also physically close together.
The disadvantage is Only when the maximum size is known when the file is created. Worth using unless the maximum size is known when the file is created. Without that information, the operating system does not know how much disk space is used for a file. Another drawback is Disk fragmentation. Disk fragmentation can be generated by this allocation method, the space provided should be usable.
The main problem in file allocation is the recording of blocks used by the file. Various methods can be used, including contiguous allocation. This technique is the simplest allocation scheme, which stores files as consecutive data blocks (contigu) on the disk.
The advantage is simple in implementation because of the recording where the file blocks are reduced to only remember the initial address of the file and the length of the file, ie the number of blocks of the file. Its performance is unbelievably good Because the entire file can be read from disk with one operation. No other allocation method can match the access performance. This advantage is obtained because logically sequential records are also physically close together.
The disadvantage is Only when the maximum size is known when the file is created. Worth using unless the maximum size is known when the file is created. Without that information, the operating system does not know how much disk space is used for a file. Another drawback is Disk fragmentation. Disk fragmentation can be generated by this allocation method, the space provided should be usable.
The second method is the allocation of file blocks as a linked list that records the file blocks with a list of linked blocks. The first Word in the data block as a pointer to the next block, the rest to save the data. This
scheme is called block chaining because the first block chains the
second block, the second block chains the third block, and so on. The previous block chains the next block. Directory records the first block of files.
The advantage of this method is that every block on the disk can be used. No space is lost due to external fragmentation. The directory element / element simply stores the address of the first block of the file.
The disadvantage is that sequence readings are quite troublesome because they have to trace the blocks one by one. The data block is no longer 2k in size, because pointers require multiple bytes. This problem is not fatal. The odd size (not 2k in size) is less efficient because the read and write programs of the blocks can not take advantage of the properties of binary numbers.
The third method is the allocation of blocks as linked using the index (FAT). The disadvantages of linked list allocations are eliminated by removing the pointer in the block and putting it as a separate table in memory. All blocks are available for data. This scheme is called block oriented file mapping. The table that records the data block number is called FAT (File Allocation Table).
The advantage of this method is random access is easier. While still having to trace the linked chain to find the location of the file block, the entire block chain is in memory so it can be done quickly without making access to the disk. The directory simply stores the integer number of the initial block. This initial block is used to find the entire block, regardless of the number of the file blocks. The directory points to the first block of files and FAT shows the next file blocks.
The disadvantage is that all tables (FAT) must be stored in memory. If large storage results in large tables and should be placed in main memory even if only one file is opened. MS-DOS uses this method.
The advantage of this method is that every block on the disk can be used. No space is lost due to external fragmentation. The directory element / element simply stores the address of the first block of the file.
The disadvantage is that sequence readings are quite troublesome because they have to trace the blocks one by one. The data block is no longer 2k in size, because pointers require multiple bytes. This problem is not fatal. The odd size (not 2k in size) is less efficient because the read and write programs of the blocks can not take advantage of the properties of binary numbers.
The third method is the allocation of blocks as linked using the index (FAT). The disadvantages of linked list allocations are eliminated by removing the pointer in the block and putting it as a separate table in memory. All blocks are available for data. This scheme is called block oriented file mapping. The table that records the data block number is called FAT (File Allocation Table).
The advantage of this method is random access is easier. While still having to trace the linked chain to find the location of the file block, the entire block chain is in memory so it can be done quickly without making access to the disk. The directory simply stores the integer number of the initial block. This initial block is used to find the entire block, regardless of the number of the file blocks. The directory points to the first block of files and FAT shows the next file blocks.
The disadvantage is that all tables (FAT) must be stored in memory. If large storage results in large tables and should be placed in main memory even if only one file is opened. MS-DOS uses this method.
2.3 Directory Implementation
The directory entry provides information for finding disk blocks. The directory entry information depends on the recording system of the blocks used. This information can be a disk address of all files, first block number or i-node.
2.4. Free Disk Space Recording
Can be done in sequential, fixed block. Bit map and linked list The sequential way has problems when the file develops and the next space has been occupied by another file. Fixed block is the development of the file can be resolved but determine the size of the block is a difficult thing. Unused free blocks on the disk should be recorded so that blocks can be allocated to the requiring files. The technique of recording free blocks can be done with bit maps, requiring a smaller recording space because each block is presented only one bit, while the corresponding list requires 16 bits per block. The hooked list is smaller than the bit map only if the disk is almost full.
2.5 Shared File
Is a file that is not only referenced one directory, also by other directories. The file management system is no longer a tree but a non-circular directed graph (DAG = directed acyclic graph). Shared files can be implemented with three techniques, namely making copy, i-nodeserta symbolic link.
The file management system should provide tools to allow file sharing with users, providing a number of shared file access control techniques. Usually, the user or group of users is authorized to access certain rights to the file. Access rights vary greatly. Here are user access rights to files, consisting of none, knowledge, execution. Reading. Appending. Updating. Changing protection, and deletion.
The directory entry provides information for finding disk blocks. The directory entry information depends on the recording system of the blocks used. This information can be a disk address of all files, first block number or i-node.
2.4. Free Disk Space Recording
Can be done in sequential, fixed block. Bit map and linked list The sequential way has problems when the file develops and the next space has been occupied by another file. Fixed block is the development of the file can be resolved but determine the size of the block is a difficult thing. Unused free blocks on the disk should be recorded so that blocks can be allocated to the requiring files. The technique of recording free blocks can be done with bit maps, requiring a smaller recording space because each block is presented only one bit, while the corresponding list requires 16 bits per block. The hooked list is smaller than the bit map only if the disk is almost full.
2.5 Shared File
Is a file that is not only referenced one directory, also by other directories. The file management system is no longer a tree but a non-circular directed graph (DAG = directed acyclic graph). Shared files can be implemented with three techniques, namely making copy, i-nodeserta symbolic link.
The file management system should provide tools to allow file sharing with users, providing a number of shared file access control techniques. Usually, the user or group of users is authorized to access certain rights to the file. Access rights vary greatly. Here are user access rights to files, consisting of none, knowledge, execution. Reading. Appending. Updating. Changing protection, and deletion.
2.6 File System ReliabilityData damage is more expensive than hardware damage because it is an irreplaceable loss if you do not have a copy. Disks usually have bad blocks, which have defects that are not perfect in storing data. Most hard drive manufacturers give a list of bad blocks found during testing.
There are two solutions to the bad blocks, ie hardware and software. The hardware is to provide a replacement track. By hardware dedicated sector to record bad blocks. A bad block list specifies a replacement block on the track provided for the replacement. All requests to the bad block will be redirected using replacement blocks. Software ie ie File management system keeps a record of all bad blocks, getting rid of the free block list. These blocks are never used to store data. As long as the recording of bad blocks is not disturbed there will be no problems.
2.7 File System Performance.The main objective of improving the performance of the file management system is to reduce the amount of access to the disk. Ways that can be used, is the cache buffer, which is accessing data from / to disk rather than accessing from / to main memory (RAM) more slowly 100,000 times. Therefore it should be attempted to reduce the number of accesses to the disk. The technique for reducing is block cache or cache or cache buffer. Chace is a collection of blocks that logically have disks but are stored in main memory. The workings of chace are as follows Always check all read requests to determine if the necessary blocks are already in the chace. If the block is already in the chace, then the read request can be met from the cache without accessing the disk. If the data block is not in the chace, then the reading from the disk as much as one block and copy first to the chace. After that copy to the requesting process. Subsequent requests for the same block can be met from the chace without the need for disk access. If the chace is full, a block in the chace is moved and if the block has been modified it must be written to disk.
Placement of data, ie Placement of data cultivated so as to minimize the number of seek times and rotation. Interleave is used to minimize rotation. In the i-node system there is a bottleneck caused by two accesses, i-node Access and Access data blocks.
2.8 File Access SystemRecord and blockingOn the access system, the record is the smallest unit of data storage at the logical or file level. The length of the record can be fixed or varied. Three
methods for marking the beginning and end of the record are variation
sizes, ie End of record mark, Long indicator, Record position table. Records should be placed in blocks. One block may consist of one or more records. The placement of records into blocks is called blocking. Blocking factor (Bfr) is a parameter that shows the number of expected records (maximum) is accommodated in 1 block.
Placement of records on blocksThe combination of record placements on blocks can be Fixed blocking and Variable length spanned blocking. The advantage is Flexible for the user, The size of the record is not limited by block size, Reducing the joy of storage space because internal fragmentation is reduced. The disadvantage is Difficult to implement. Expensive in its quest, Difficult in update (update).
Variable length unspanned blocking.Records, although variables of length must be intactly placed on a block, should not be split into other blocks. Weakness Occurs waste of place because the record that will be placed too long for the rest of the block will be placed in the next block. Records length should not be longer than block size.
Operations in the file access systemThe access system should be able to provide the following operations to the selected access organization, which is Search for a specific record, Move to the next record, Rename records in the form of deletion of records or modifications of a record, Record of records with certain criteria, Record of all records in file, Reorganization , Each access organization has its own advantages and disadvantages that it is impossible to implement an organization of access for all computer system application needs.
Placement of records on blocksThe combination of record placements on blocks can be Fixed blocking and Variable length spanned blocking. The advantage is Flexible for the user, The size of the record is not limited by block size, Reducing the joy of storage space because internal fragmentation is reduced. The disadvantage is Difficult to implement. Expensive in its quest, Difficult in update (update).
Variable length unspanned blocking.Records, although variables of length must be intactly placed on a block, should not be split into other blocks. Weakness Occurs waste of place because the record that will be placed too long for the rest of the block will be placed in the next block. Records length should not be longer than block size.
Operations in the file access systemThe access system should be able to provide the following operations to the selected access organization, which is Search for a specific record, Move to the next record, Rename records in the form of deletion of records or modifications of a record, Record of records with certain criteria, Record of all records in file, Reorganization , Each access organization has its own advantages and disadvantages that it is impossible to implement an organization of access for all computer system application needs.
Reference :
1. Hariyanto, Bambang, Ir., Sistem Operasi,
Penerbit Informatika, Bandung, 1999
2. Tanenbaum, Andrew S., Modern Operating Systems,
Prentice Hall Inc., 1992
No comments:
Post a Comment