A Case Study On The Linux System: Dipika Upadhaya ROLLNO:04/076
A Case Study On The Linux System: Dipika Upadhaya ROLLNO:04/076
System
DIPIKA UPADHAYA
ROLLNO:04/076
Linux History
The first Linux kernel(Version 0.01, may 1991) had no networking, ran only on 80386-
compatible Intel processors and PC hardware, and had extremely limited device-driver support
and supported only the Minix file system.
Linux 1.0(March 1994) support for UNIX’s standard TCP/IP networking protocols, device
driver support, BSD compatible socket interface, enhanced file system , extra hardware support.
Version 1.2(March 1995) was the final PC- only Linux Kernel.
Linux2.0(June 1996) support for multiprocessor architecture, memory management code,
improved TCP/IP, standardized configuration interface.
2.4 and 2.6 increased SMP support, added journaling file system, preemptive kernel, 64-bit
memory support.
The Linux System
Linux uses many tools developed as part of Berkeley’s BSD operating system, MIT’s X
Window system and the Free Software Foundation’s GNU project.
The min system libraries were started by the GNU project, with improvements provided
by the Linux community.
Linux networking tools were derived from 4.3 BSD code.
Linux System is maintained by a loose network of developers collaborating over the
internet.
Linux Distributions
The basic Linux System include standard, precompiled set of packages or distributions,
system installation and management utilities and ready-to-install packages of common
UNIX tools.
Early distributions include SLS and Slackware
Red Hat and Debian are popular distributions
The RPM package file format permits compatibility among th various Linux distributions.
Linux Licensing
The Linux kernel is distributed under the GNU General Public License , the terms of
which are set out by the Free Software Foundation.
Anyone using Linux, or creating their own derivative of Linux, may not make the derived
product proprietary.
Software released under the GPL may not be redistributed as a binary –only product.
Design Principles
The kernel is responsible for maintaining the important abstractions of the operating
system
Kernel code executes in kernel model with full access to all the physical resources of the
computer
All kernel code and data structures are kept in the same single address space.
The system libraries define a standard set of functions through which applications
interact with the kernel
The system utilities perform individual specialized management tasks.
Kernel Modules
The Linux kernel has the ability to load and unload arbitrary sections of kernel code on
demand.
A kernel module may typically implement a device driver, a file system or a networking
protocol.
The module interface allows third parties to write and distribute, on their own terms,
device drivers or file system that could not be distributed under the GPL.
Kernel modules allow a Linux system to be set up with a standard, minimal kernel ,
without any extra device drivers built in
Components of Module support
Module Management system: allows modules to be loaded into memory and communicate with the
rest of the kernel
Module loader and unloader: User mode utilities, work with the module management system to load
and unload modules
Driver registration system: Allows the modules to tell the rest of the kernel that a new driver is
available
Conflict-resolution mechanisms: Reserving hardware resources and protecting them from accidental
use by another driver.
Process management
Process management separates the creation of process and running of a new program into two operations:
The fork() system call creates a new process
A new program is run after a call to exec()
Under Linux, process properties fall into three groups: the process’s identity, environment and context.
Process Identity
PID: Unique identifier used to specify processes to the operating system when an application makes a system call to
signal, modify or wait for another process.
Credentials: User Id that determine the process’s rights to access system resources and files
Personality: Personality identifier that can slightly modify the semantics of certain system calls.
Process Management
Linux uses the same internal representation for processes and threads
A distinction is only made when a new thread is created by the clone system call
Fork creates a new process with its own entirely new process context
Clone creates a new process with its own identity, but allowed to share data structures of
its parent.
Using clone gives an application fine grained control over exactly what is shared between
two threads.
Scheduling
Memory management system of Linux deals with allocating and freeing pages, groups of
pages and small blocks of memory
Additional mechanisms for handling virtual memory, memory mapped into the address
space of running processes.
Splits memory into 3 different zones due to hardware characteristics.
Managing Physical Memory
The kernel hides the implementation details and manages the multiple different file system via an abstraction layer i.e.
the virtual file system
The Linux VFS is designed around object-oriented principles and is composed of two components:
1. A set of definitions that define what a file object is allowed to look like
2. A layer of software to manipulate those objects
The Linux Ext2fs file system uses allocation policies designed to place logically adjacent blocks of a file into
physically adjacent blocks on disk, so that it can submit an I/O request for several disk blocks as a single operation.
The Linux Proc File system does not store data, rather, its contents are computed on demand according to the user file
I/O requests.
Proc must implement a directory structure and define a unique & persistent inode number for each directory and file it
contains.
File System
The I/O system in Linux looks much like that in any UNIX system.
Users can open an access channel to a device in the same way they open any other file—devices can appear as
objects within the file system.
Linux splits all devices into three classes:
1. Block devices allow random access to completely independent, fixed size blocks of data.
2. Character devices include most other devices; they don’t need to support the functionality of regular files.
3. Network devices are interfaced via the kernel's networking subsystem.
Input and Output
The most important set of protocols in the Linux networking system is internet protocol suite
It implements routing between different hosts anywhere on the network
Networking in the Linux is implemented by three layers of software:
1. The socket interface
2. Protocol drivers
3. Network device drivers
Security