The newly chosen cylinder group is selected from those cylinder groups that have a greater than average number of free blocks left. Also, the system keeps a certain percentage of a logical disk free to reduce the scattering of data. The free space may be managed by keeping either a linked list of free blocks or a bit map containing a bit for each block which indicates if the bit is allocated or not. A bit map wastes space, but allows clustering. So far we have assumed that files can grow dynamically.
Some systems force a user to specify the size of the file when it is specified.
Thus a file may be allocated a contiguous chunk. The advantage is that it is easy to implement. Caching Some of the information on disk is kept in memory through caching . Thus, when a process writes data to a file, the operating system may transfer the data to a buffer without writing to the disk. This reduces disk transfers if a process attempts to read or write the buffer before it is flushed to the disk.