LINUX Systems

Get Started. It's Free
or sign up with your email address
LINUX Systems by Mind Map: LINUX Systems

1. File Systems

1.1. Linux retains UNIX's standard file-system model

1.2. Files can be an object stored on disk or fetched over a network from a remote server or can be anything capable of handling the input or output of a stream of data

1.3. Linux handles all these types of files by hiding the implementation details of every single file behind a layer of software, called virtual file system (VFS)

1.4. Virtual File System

1.4.1. Designed around object-oriented principles

1.4.2. It has two components

1.4.2.1. Set of definitions that specify what file-system objects are allowed to look like

1.4.2.2. A layer of software to manipulate the objects

1.4.3. Defines four main object types

1.4.3.1. 1)Inode object-represents an individual file

1.4.3.2. 2)File object-represents an open file

1.4.3.3. 3)Superblock object- represents an entire file system

1.4.3.4. 4)Dentry object-represents an individual directory entry

1.4.4. Abbreviated API for some file object's operations

1.4.4.1. int open(. . .) - Open a file

1.4.4.2. ssize_t read (. . .) - Read from a file

1.4.4.3. ssize_t write(. . .) - Write to a file

1.4.4.4. int mmap (. . .) - Memory-map a file

1.5. Standard LINUX File System (ex2fs)

1.5.1. ex2fs- second extended file system

1.5.2. Previous to the ex2fs file system we had Minix compatible file system, but this file system was severely restricted by 14-character file-name limits and a maximum file-system size of 64 MB.

1.5.3. Minix file system was superseded by a new file system called extended file system(extfs)

1.5.4. A later redesign of this file system to improve scalability and performance and to add a few missing features led to the ex2fs

1.5.5. Has a similar mechanism as BSD Fast File Systems (FFS) for locating data blocks belonging to a specific file

1.5.5.1. It stores the data-block pointers in indirect blocks throughout the file system with up to three levels of indirection

2. Input Output Devices

2.1. LINUX split all devices into three classes

2.1.1. Block Devices

2.1.1.1. Includes all devices that allow random access to completely independent, fixed-sized blocks of data includes hard disks, floppy disks, CD-ROMs and flash memory

2.1.1.2. Block systems are used for storing file systems

2.1.1.3. Direct access is allowed so that the programs can create and repair the file system that the device contains

2.1.1.4. Applications can also access these block devices directly if they wish to

2.1.2. Character Devices

2.1.2.1. Includes most of the other devices such as mouse and keyboard

2.1.2.2. Fundamental difference between block and character devices is random access

2.1.2.3. Character devices can only be accessed serially

2.1.3. Network Devices

2.1.3.1. Dealt differently from block and character devices

2.1.3.2. Users cannot directly transfer data to network devices instead they must communicate indirectly by opening a connection to the kernel's networking subsystem

3. Interprocess Communication

3.1. Synchronisation and Signals

3.1.1. Signal is a standard UNIX mechanism for informing a process that an event has occurred

3.1.2. Signal can be sent from one process to any other process with restrictions on signals sent to processes owned by another user

3.1.3. Signals can also be generated by kernel internally ex: it can send a signal to a server process when data arrives on a network channel

3.1.4. Whenever a process wants to wait for some event to complete, it places itself on a wait queue associated with the event and tells the scheduler that it is no longer eligible for execution

3.2. Passing of Data Among Processes

3.2.1. Standard Unix pipe mechanism allows a child process to inherit a communication channel from its parent

3.2.2. Under Linux pipes appear as just another type of inode to virtual-file-system software

3.2.3. Shared memory offers an extremely fast way to communicate large or small amounts of data

3.2.3.1. Any data written by one process to a shared memory region can be read immediately by other process that has mapped that region into its address space