Page 176 - DCAP602_NETWORK_OPERATING_SYSTEMS_I
P. 176
Network Operating Systems-I
notes A lot of care must be taken to update the file system correctly as data within these caches is
modified as files and directories are created, written to and deleted. If you could see the file
system’s data structures within the running kernel, you would be able to see data blocks being
read and written by the file system. Data structures, describing the files and directories being
accessed would be created and destroyed and all the time the device drivers would be working
away, fetching and saving data.
The most important of these caches is the Buffer Cache, which is integrated into the way that the
individual file systems access their underlying block devices. As blocks are accessed they are put
into the Buffer Cache and kept on various queues depending on their states. The Buffer Cache not
only caches data buffers, it also helps manage the asynchronous interface with the block device
drivers.
Did u know? In how many ways VFS allows Linux to support file system?
10.1.2 adding and partitioning a Disk
Most people have a vague knowledge of what partitions are, since every operating system has
the ability to create or remove them. It may seem strange that Linux uses more than one partition
on the same disk, even when using the standard installation procedure, so some explanation is
called for.
One of the goals of having different partitions is to achieve higher data security in case of disaster.
By dividing the hard disk in partitions, data can be grouped and separated. When an accident
occurs, only the data in the partition that got the hit will be damaged, while the data on the other
partitions will most likely survive.
This principle dates from the days when Linux didn’t have journaled file systems and power
failures might have lead to disaster. The use of partitions remains for security and robustness
reasons, so a breach on one part of the system doesn’t automatically mean that the whole
computer is in danger. This is currently the most important reason for partitioning. A simple
example: a user creates a script, a program or a web application that starts filling up the disk. If
the disk contains only one big partition, the entire system will stop functioning if the disk is full.
If the user stores the data on a separate partition, then only that (data) partition will be affected,
while the system partitions and possible other data partitions keep functioning.
Mind that having a journaled file system only provides data security in case of power failure
and sudden disconnection of storage devices. This does not protect your data against bad blocks
and logical errors in the file system. In those cases, you should use a RAID (Redundant Array of
Inexpensive Disks) solution.
partition Layout and types
There are two kinds of major partitions on a Linux system:
1. Data partition: normal Linux system data, including the root partition containing all the
data to start up and run the system; and
2. Swap partition: expansion of the computer’s physical memory, extra memory on hard
disk.
Most systems contain a root partition, one or more data partitions and one or more swap
partitions. Systems in mixed environments may contain partitions for other system data, such as
a partition with a FAT or VFAT file system for MS Windows data.
170 LoveLy professionaL university