| File systems are an integral part of any operating | | | | open the same file simultaneously and have to decide |
| systems with the capacity for long term storage. | | | | whether users have permission to write a file back to |
| There are two distinct parts of a file system, the | | | | the disk if other users currently have it open. If two |
| mechanism for storing files and the directory | | | | users have read and write permission to file should |
| structure into which they are organised. In modern | | | | one be allowed to overwrite it while the other still |
| operating systems where it is possible for several | | | | has it open? Or if one user has read-write permission |
| user to access the same files simultaneously it has | | | | and another only has read permission on a file should |
| also become necessary for such features as access | | | | the user with write permission be allowed to |
| control and different forms of file protection to be | | | | overwrite it if theres no chance of the other user |
| implemented. | | | | also trying to do so? |
| A file is a collection of binary data. A file could | | | | Different file systems also support different access |
| represent a program, a document or in some cases | | | | methods. The simplest method of accessing |
| part of the file system itself. In modern computing it | | | | information in a file is sequential access. This is where |
| is quite common for their to be several different | | | | the information in a file is accessed from the |
| storage devices attached to the same computer. A | | | | beginning one record at a time. To change the |
| common data structure such as a file system allows | | | | position in a file it can be rewound or forwarded a |
| the computer to access many different storage | | | | number of records or reset to the beginning of the |
| devices in the same way, for example, when you | | | | file. This access method is based on file storage |
| look at the contents of a hard drive or a cd you | | | | systems for tape drive but works as well on |
| view it through the same interface even though they | | | | sequential access devices (like mordern DAT tape |
| are completely different mediums with data mapped | | | | drives) as it does on random-access ones (like hard |
| on them in completely different ways. Files can have | | | | drives). Although this method is very simple in its |
| very different data structures within them but can all | | | | operation and ideally suited for certain tasks such as |
| be accessed by the same methods built into the file | | | | playing media it is very inefficient for more complex |
| system. The arrangement of data within the file is | | | | tasks such as database management. A more |
| then decided by the program creating it. The file | | | | modern approach that better facilitates reading tasks |
| systems also stores a number of attributes for the | | | | that aren't likely to be sequential is direct access. |
| files within it. | | | | direct access allows records to be read or written |
| All files have a name by which they can be accessed | | | | over in any order the application requires. This |
| by the user. In most modern file systems the name | | | | method of allowing any part of the file to be read in |
| consists of of three parts, its unique name, a period | | | | any order is better suited to modern hard drives as |
| and an extension. For example the file 'bob.jpg' is | | | | they too allow any part of the drive to be read in |
| uniquely identified by the first word 'bob', the | | | | any order with little reduction in transfer rate. Direct |
| extension jpg indicates that it is a jpeg image file. | | | | access is better suited to to most applications than |
| The file extension allows the operating system to | | | | sequential access as it is designed around the most |
| decide what to do with the file if someone tries to | | | | common storage medium in use today as opposed |
| open it. The operating system maintains a list of file | | | | to one that isn't used very much anymore except |
| extension associations. Should a user try to access | | | | for large offline back-ups. Given the way direct |
| 'bob.jpg' then it would most likely be opened in | | | | access works it is also possible to build other access |
| whatever the systems default image viewer is. | | | | methods on top of direct access such as sequential |
| The system also stores the location of a file. In some | | | | access or creating an index of all the records of the |
| file systems files can only be stored as one | | | | file speeding to speed up finding data in a file. |
| contiguous block. This has simplifies storage and | | | | On top of storing and managing files on a drive the |
| access to the file as the system then only needs to | | | | file system also maintains a system of directories in |
| know where the file begins on the disk and how | | | | which the files are referenced. Modern hard drives |
| large it is. It does however lead to complications if | | | | store hundreds of gigabytes. The file system helps |
| the file is to be extended or removed as there may | | | | organise this data by dividing it up into directories. A |
| not be enough space available to fit the larger | | | | directory can contain files or more directories. Like |
| version of the file. Most modern file systems | | | | files there are several basic operation that a file |
| overcome this problem by using linked file allocation. | | | | system needs to a be able to perform on its |
| This allows the file to be stored in any number of | | | | directory structure to function properly. |
| segments. The file system then has to store where | | | | It needs to be able to create a file. This is also |
| every block of the file is and how large they are. | | | | covered by the overview of peration on a file but as |
| This greatly simplifies file space allocation but is | | | | well as creating the file it needs to be added to the |
| slower than contiguous allocation as it is possible for | | | | directory structure. |
| the file to be spread out all over the disk. Modern | | | | When a file is deleted the space taken up by the file |
| operating systems overome this flaw by providing a | | | | needs to be marked as free space. The file itself also |
| disk defragmenter. This is a utility that rearranges all | | | | needs to be removed from the directory structure. |
| the files on the disk so that they are all in contiguous | | | | Files may need to be renamed. This requires an |
| blocks. | | | | alteration to the directory structure but the file itself |
| Information about the files protection is also | | | | remains un-changed. |
| integrated into the file system. Protection can range | | | | List a directory. In order to use the disk properly the |
| from the simple systems implemented in the FAT | | | | user will require to know whats in all the directories |
| system of early windows where files could be | | | | stored on it. On top of this the user needs to be able |
| marked as read-only or hidden to the more secure | | | | to browse through the directories on the hard drive. |
| systems implemented in NTFS where the file system | | | | Since the first directory structures were designed |
| administrator can set up separate read and write | | | | they have gone through several large evolutions. |
| access rights for different users or user groups. | | | | Before directory structures were applied to file |
| Although file protection adds a great deal of | | | | systems all files were stored on the same level. This |
| complexity and potential difficulties it is essential in an | | | | is basically a system with one directory in which all |
| enviroment where many different computers or user | | | | the files are kept. The next advancement on this |
| can have access to the same drives via a network | | | | which would be considered the first directory |
| or time shared system such as raptor. | | | | structure is the two level directory. In this There is a |
| Some file systems also store data about which user | | | | singe list of directories which are all on the same level. |
| created a file and at what time they created it. | | | | The files are then stored in these directories. This |
| Although this is not essential to the running of the file | | | | allows different users and applications to store there |
| system it is useful to the users of the system. | | | | files separately. After this came the first directory |
| In order for a file system to function properly they | | | | structures as we know them today, directory trees. |
| need a number of defined operations for creating, | | | | Tree structure directories improves on two level |
| opening and editing a file. Almost all file systems | | | | directories by allowing directories as well as files to |
| provide the same basic set of methods for | | | | be stored in directories. All modern file systems use |
| manipulating files. | | | | tree structure directories, but many have additional |
| A file system must be able to create a file. To do | | | | features such as security built on top of them. |
| this there must be enough space left on the drive to | | | | Protection can be implemented in many ways. Some |
| fit the file. There must also be no other file in the | | | | file systems allow you to have password protected |
| directory it is to be placed with the same name. | | | | directories. In this system. The file system wont |
| Once the file is created the system will make a | | | | allow you to access a directory before it is given a |
| record of all the attributes noted above. | | | | username and password for it. Others extend this |
| Once a file has been created we may need to edit it. | | | | system by given different users or groups access |
| This may be simply appending some data to the end | | | | permissions. The operating system requires the user |
| of it or removing or replacing data already stored | | | | to log in before using the computer and then restrict |
| within it. When doing this the system keeps a write | | | | their access to areas they dont have permission for. |
| pointer marking where the next write operation to | | | | The system used by the computer science |
| the file should take place. | | | | department for storage space and coursework |
| In order for a file to be useful it must of course be | | | | submission on raptor is a good example of this. In a |
| readable. To do this all you need to know the name | | | | file system like NTFS all type of storage space, |
| and path of the file. From this the file system can | | | | network access and use of device such as printers |
| ascertain where on the drive the file is stored. While | | | | can be controlled in this way. Other types of access |
| reading a file the system keeps a read pointer. This | | | | control can also be implemented outside of the file |
| stores which part of the drive is to be read next. | | | | system. For example applications such as win zip |
| In some cases it is not possible to simply read all of | | | | allow you to password protect files. |
| the file into memory. File systems also allow you to | | | | There are many different file systems currently |
| reposition the read pointer within a file. To perform | | | | available to us on many different platforms and |
| this operation the system needs to know how far | | | | depending on the type of application and size of |
| into the file you want the read pointer to jump. An | | | | drive different situations suit different file system. If |
| example of where this would be useful is a database | | | | you were to design a file system for a tape backup |
| system. When a query is made on the database it is | | | | system then a sequential access method would be |
| obviously inefficient to read the whole file up to the | | | | better suited than a direct access method given the |
| point where the required data is, instead the | | | | constraints of the hardware. Also if you had a small |
| application managing the database would determine | | | | hard drive on a home computer then there would be |
| where in the file the required bit of data is and jump | | | | no real advantage of using a more complex file |
| to it. This operation is often known as a file seek. | | | | system with features such as protection as it isn't |
| File systems also allow you to delete files. To do this | | | | likely to be needed. If i were to design a file system |
| it needs to know the name and path of the file. To | | | | for a 10 gigabyte drive i would use linked allocation |
| delete a file the systems simply removes its entry | | | | over contiguous to make the most efficient use the |
| from the directory structure and adds all the space it | | | | drive space and limit the time needed to maintain the |
| previously occupied to the free space list (or | | | | drive. I would also design a direct access method |
| whatever other free space management system it | | | | over a sequential access one to make the most use |
| uses). | | | | of the strengths of the hardware. The directory |
| These are the most basic operations required by a | | | | structure would be tree based to allow better |
| file system to function properly. They are present in | | | | organisation of information on the drive and would |
| all modern computer file systems but the way they | | | | allow for acyclic directories to make it easier for |
| function may vary. For example, to perform the | | | | several users to work on the same project. It would |
| delete file operation in a modern file system like | | | | also have a file protection system that allowed for |
| NTFS that has file protection built into it would be | | | | different access rights for different groups of users |
| more complicated than the same operation in an | | | | and password protection on directories and individual |
| older file system like FAT. Both systems would first | | | | files.Several file systems that already implement the |
| check to see whether the file was in use before | | | | features I've described above as ideal for a 10gig |
| continuing, NTFS would then have to check whether | | | | hard drive are currently available, these include NTFS |
| the user currently deleting the file has permission to | | | | for the Windows NT and XP operating systems and |
| do so. Some file systems also allow multiple people to | | | | ext2 which is used in linux. |