Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Chapter 5: Linux Operating System (Continue)

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

48 OPERATING SYSTEM

CHAPTER 5: LINUX OPERATING SYSTEM (CONTINUE)

A. History of Linux

 In June 1971, Richard Matthew Stallman joined MIT Artificial Intelligence Laboratory as a
programmer where he gained popularity with the hacker community and came to be known by
his now popular name RMS. At that time, all the programmers used to share their code freely
among each other cutting across various institutions.
 In 1980, with the advent of portable software - ie software that can be compiled to run on
different computers, a business model emerged where in, the companies developing the code
refused to share the code with their clients and began restricting copying and redistribution of
their software by copyrighting it.
 In response to this trend, Stallman, who believed in the principle that software has to be free
always, founded the Free Software Foundation and in 1985, published the GNU Manifesto. This
manifesto outlined his motivation for creating a free OS called GNU, which would be compatible
with Unix. By the way, GNU is a recursive acronym for GNU is Not Unix. He along with a group of
like minded programmers started work in developing the tools needed to make a complete OS -
like an editor (Emacs), a C compiler (GCC), libraries and all associated generic Unix tools like
cat,ls, chmod etc.
 In the same year (1985), a professor by name Andy Tanenbaum wrote a Unix like Operating
system from scratch based on System V standards POSIX and IEEE for the Intel i386 platform. He
named it Minix.
 In 1989, Stallman released the first program independent GNU General Public Licence now
popularly known as GPL or copyleft. Not only that, he published all his work under this licence.
Now the only thing that GNU lacked was a completely free OS kernel. Even though work was
going on in developing HURD which was to fill that gap, the progress was slow.
 In 1990, A finnish student by name Linus Torvalds studying in the University of Helsinki came
into contact with Andy Tanenbaum's OS, Minix. Linus wanted to upgrade Minix by putting in
more features and improvements. But he was prohibited by Tanenbaum to do so. Then Linus
decided to write his own kernel and released it under GPL. This kernel is now popularly known
as Linux.
 After 1997, a programming model other than the GPLed model emerged which is now popularly
known as the Open Source Initiative. Bruce Perens is credited for creating the Open Source
definition - the manifesto of the Open Source movement in software. Eric.S.Raymond another
hacker became one of the prominent voice in this movement. But he is more known for his very
popular essay "The Cathedral and the Bazaar" which has since been published as a hard cover
book by O'Reilly.
49 OPERATING SYSTEM

B. What is Linux?

Linux is a freely distributed operating system that behaves like the Unix operating system. Linux was
designed specifically for the PC platform and takes advantage of its design to give users comparable
performance to high-end UNIX workstations. Many big-name companies have joined the Linux
bandwagon such as IBM and Compaq, offering systems pre-installed with Linux. Also, many companies
have started Linux packages, such as Red Hat, Corel, and Samba. However, they can only charge for
services and documentation packaged with the Linux software. More and more businesses are using
Linux as an efficient and more economical way to run their networks.

Linux is a complete multitasking, multi-user operating system that behaves like UNIX in terms of kernel
behavior and peripheral support. Linux has all the features of UNIX and boasts of its open source code
and mainly free utilities.

The Linux kernel was originally developed for the Intel 80386, which was developed with multitasking as
one of its features. The kernel is the lowest-level core factor of the operating system. The kernel is the
code that controls the interface between user programs and hardware devices, the scheduling of
processes to achieve multitasking, and many other aspects of the system. The Linux kernel is a
monolithic kernel; all the device drivers are part of the kernel proper. Despite the fact that most of
Intel's CPUs are used with single-tasking MS-DOS, Linux makes good use of the advanced multitasking
features built into the CPU's instruction set. Linux supports demand paging, which means that only the
sections of a program that are necessary are read into RAM.

Linux also offers support for copy-on-write, a process that if more than one copy of a particular
application is loaded, all tasks can share the same memory. When large memory requirements are
needed and only small amounts of physical RAM are available, Linux has another feature called swap
space. Swap space allows pages of memory to be written to a reserved area of a disk and treated as an
extension of physical memory. By moving pages between the swap space and RAM, Linux can, in effect,
act as if it had much more physical RAM than it does, with the cost of some speed due to the hard
drive's slower access. Linux also supports diverse file systems, as well as those compatible with DOS and
OS/2. Linux's file system, ext2fs, is intended for best possible use of the disk.
50 OPERATING SYSTEM

C. GNU General Public License (GPL)

Short for General Public License, the license that accompanies some open source software that
details how the software and its accompany source code can be freely copied, distributed and
modified. The most widespread use of GPL is in reference to the GNU GPL, which is commonly
abbreviated simply as GPL when it is understood that the term refers to the GNU GPL. One of the
basic tenets of the GPL is that anyone who acquires the material must make it available to anyone
else under the same licensing agreement.

The GPL does not cover activities other than the copying, distributing and modifying of the source
code.

A GPL is also referred to as a copyleft, in contrast to a copyright that identifies the proprietary rights
of material.

D. List of companies that using Linux today

List some of the companies using Linux today:

a. IBM
b. HP
c. Cisco
d. Sun Microsystems
e. Hitachi
f. Fujitsu
g. Sony
h. Home Depot
i. Amazon.com

E. Linux Applications

Linux is extremely valuable and is used in many ways. Whether it is deployed as a server,
development or workstation platform, companies are finding many uses for this emerging
technology, to include:

• Web Hosting
• Software Development
• Embedded Devices
• High-end graphics
• File and Print Services
• Documents Publishing
51 OPERATING SYSTEM

• E-mail Servers
• Network Routers

F. Advantages of Linux/Open Source

 Reliability
Linux is known for reliability often referred to as “uptime” and can easily manage the necessary
workloads in today’s business environment. In addition to enterprise focused applications, the
stability and relative low cost of Linux has prompted companies to integrate Linux technology
into consumer devices such as Sony’s PlayStation 2 and the Tivo digital recorder.

 Scalability
If you think Linux isn't ready for mission critical applications, you'd be wrong. The release of the
2.4 kernel means the fastest growing OS can handle large business workloads that once could
only be addressed by closed, proprietary platforms and solutions. Some examples:
 16-way symmetrical multi-processing
 Network stack and file system modifications to enhance performance and scalability
 Support for up 64Gb of RAM on Intel-- RAM now limits the number of run-time processes
 Support for S/390 and Itanium technologies

 Security
Security is one of the largest problems facing the IT sector today. All Operating systems are
vulnerable; however, Linux provides a level of security that some say transcends other
mainstream Operating Systems. The Open Source model allows for expert auditing and “self”
policing of code prior to release. If problems do occur, fixes are normally developed and tested
by the “group” of worldwide programmers. In addition, viruses and “worms” are often of little
concern if you are running a Linux machine. Tools such as Open SSH, Kerberos, Ipchains etc. are
just a few examples of programs dedicated toward system security.

 Open Source Licensing Model (ROI)


As IT managers continue to wrestle with budgetary concerns, the provisions associated with the
Open Source Licensing Model are attracting attention. The Open Source Licensing Model allows
for no per unit fees or licensing charges. This will significantly reduce IT infrastructure expense
as companies look to perform company-wide software migrations and enable legacy system
integration.
52 OPERATING SYSTEM

G. List some of the available applications on Linux platform


 StarOffice (word processing, spreadsheets, graphics and presentation software)
 Applixware (word processing, spreadsheets, graphics, presentation software, and data
component)
 Database managers (ADABAS, DB2, Informix, Ingres, Oracle, and Sybase)
 Desktop managers (K Desktop Environment (KDE) and GNU Object
 Model Environment (GNOME) — both freely available)
 Software Emulators (MS-DOS: dosemu, MS-Windows: WINE, and VMware virtual machine)
 Games (Tribes 2, Rune, Descent 3, Unreal Toumament, and more!)
 MP3 players (xmms) and MP3 rippers (grip)
 Graphics programs (GIMP)
 Netscape web browser
 E-Mail systems, such as sendmail (which routes the majority of E Mail on the Internet) and
other smaller E-Mail systems such as smail, qmail or exim. They are free to use even in a
commercial environment.
 X-CD Roast (free CD Burning application)
 SAP enterprise resource planning software and Lotus Domino Enterprise Server software for
messaging, collaboration, and Internet and intranet applications

H. Programming languages supported by Linux


 C++
 FORTRAN
 Java
 C++
 FORTRAN
 Java
 Pascal
 Perl
 Python
 Tcl/Tk

53 OPERATING SYSTEM

DICTIONARY

KERNEL
The central module of an operating system. It is the part of the operating system that loads first, and it
remains in main memory. Because it stays in memory, it is important for the kernel to be as small as
possible while still providing all the essential services required by other parts of the operating system
and applications. Typically, the kernel is responsible for memory management, process and task
management, and disk management.

A kernel connects the application software to the hardware of a computer.

In computer science, the kernel is the central component of most computer operating systems (OS). Its
responsibilities include managing the system's resources (the communication between hardware and
software components). As a basic component of an operating system, a kernel provides the lowest-level
abstraction layer for the resources (especially memory, processors and I/O devices) that application
software must control to perform its function. It typically makes these facilities available to application
processes through inter-process communication mechanisms and system calls.

These tasks are done differently by different kernels, depending on their design and implementation.
While monolithic kernels will try to achieve these goals by executing all the code in the same address
space to increase the performance of the system, microkernels run most of their services in user space,
aiming to improve maintainability and modularity of the codebase. [2] A range of possibilities exists
between these two extremes.
54 OPERATING SYSTEM

FILE SYSTEM IN LINUX


Since Linux appeared on the scene in the early 90's, ext2 has been the default file system. Though Linux
systems are extremely robust and less prone to crashes, you never can tell when a power outage is
going to bring your system down suddenly. Though ext2 is a hardy file system, there is a risk of data loss
when these sudden crashes occur. For this reason, two projects have come up with alternatives known
as 'journaling' file systems. These are ext3 and ReiserFs.

EXT2

ext2 is the "traditional" file system on Linux.By traditional, I mean that it has the longest run as
being the most popular file system. From 1992, when it was developed by Remy Card, until 2002
or so, it was considered the 'default' Linux file system.

ext2 stands for 'second extended file system'. It replaced the original 'extended file system',
which was in itself, a replacement for the Minix file system, which was Linux's first 'default' file
system. Minix only allowed 14 character file names and had a maximum of 64 megabytes for file
size. The first ext file system overcame these limitations (255 char. file names and 2 GB file size),
but still suffered from other problems related to file access. ext2 corrected these problems and
raised the file size bar to 4 gigabytes.

The main advantage to the ext2 file system is its speed. It's considered fast and other file
systems use its speed as a base for doing benchmarks. It's also extremely robust. However, the
main problem is when your system crashes. ext2 need integrity checks that, depending on your
hard disk size, may take an extremely long time. You may also end up with some corrupt files.
An attempt to take advantage of the positive points of ext2 and add some data loss protection
and recovery speed led to the development of journaling file system. Let's have a look at those.

EXT3
ext3 was developed by Dr.Stephen Tweedie in 1999. ext3 is essentially ext2 with a journal. The
real objective in EXT3 was this simple thing: availability. When something goes down in EXT3 it
can be able to reboot the machine instantly and have everything nice and consistent.

With ext3, the user gets just this. A robust and fast file system with a minimum of downtime.
There is one disadvantage with the ext3 file system as compared with ext2. With ext3, deleted
files are, for all intents and purposes, unrecoverable.

REISERFS
As we mentioned, the other popular journaling file system is the ReiserFS. It was originally
developed by Hans Reiser with the help of SuSE. Now, development is carried on under the
auspices of Namesys with the sponsorship of Linspire. DARPA has also provided grants to help
with its development. At present, there are essentially two versions of the ReiserFS: version 3,
55 OPERATING SYSTEM

which is in most widespread use and version 4, which is a complete re-write of version 3, is, at
the time of this writing, in development and not considered stable.

ext3 and ReiserFS are similar in that they both use a journal. However, the ReiserFS journal
concept is a bit different. ReiserFS stores both the file names and the file itself in a database
where ext3 stores the file name but only its location. On the downside, ReiserFS needs a clean
install to use whereas an ext2 file system can be converted to an ext3 fairly easily on a working
system.

XFS

XFS is another journaling file system for use on Linux systems. It was initially developed by
Silicon Graphics for use on their high-end Irix Unix systems. One of the most notable features of
XFS is that it is designed to handle a file system as large as a million terabytes. A file system on a
32 bit Linux system needs to be much smaller, but weighs in at a still considerable maximum size
of 16 terabytes.

Though less popular than ext3 and ReiserFS, it's in the same league as JFS. It's somewhat of a
minority file system, but is considered popular enough to be offered as an option by major Linux
distribution developers like RedHat, the Debian project and Mandriva.

SWAP PARTITION
To replace pages or segments of data in memory. Swapping is a useful technique that enables a
computer to execute programs and manipulate data files larger than main memory. The operating
system copies as much data as possible into main memory, and leaves the rest on the disk. When the
operating system needs data from the disk, it exchanges a portion of data (called a page or segment) in
main memory with a portion of data on the disk.

DOS does not perform swapping, but most other operating systems, including OS/2, Windows, and
UNIX, do.

Swapping is often called paging.

In UNIX systems, swapping refers to moving entire processes in and out of main memory.
56 OPERATING SYSTEM

BOOT FILES IN LINUX

What BIOS does for us


The BIOS is the firmware in the ROM of a PC. When the PC is powered up, the BIOS is the first program
that runs. All other programs must be loaded into RAM first. The BIOS contains the following parts:
POST (Power On Self Test). The running counter that counts the kilobytes of main memory is the most
visible part of the POST.
The Setup Menu, that lets you set some parameters and lets you adjust the real time clock. Most
modern BIOS versions let you set the boot order, the devices that BIOS checks for booting. These can be
A (the first floppy disk), C (the first hard disk), CD-ROM and possibly other disks as well. The first device
in the list will be tried first. Older BIOS-es have only one boot order: A, C. So the BIOS will try to boot
from A first and if there is no diskette in the drive it tries to boot from C.
The boot sector loader. This loads the first 512-byte sector from the boot disk into RAM and jumps to it.
This is where the boot loaders described in this paper start.
The BIOS interrupts. These are simple device drivers that programs can use to access the screen, the
keyboard and disks. Boot loaders rely on them, most operating systems do not (the Linux kernel does
not use BIOS interrupts once it has been started). MSDOS does use BIOS interrupts.

Briefly, a boot loader is the first software program that runs when a computer starts. It is responsible for
loading and transferring control to an operating system kernel software (such as Linux or GNU Mach).
The kernel, in turn, initializes the rest of the operating system (e.g. a GNU system).
GRUB
GNU GRUB is a very powerful boot loader, which can load a wide variety of free operating systems, as
well as proprietary operating systems with chain-loading 1. GRUB is designed to address the complexity
of booting a personal computer; both the program and this manual are tightly bound to that computer
platform, although porting to other platforms may be addressed in the future.
One of the important features in GRUB is flexibility; GRUB understands filesystems and kernel
executable formats, so you can load an arbitrary operating system the way you like, without recording
the physical position of your kernel on the disk. Thus you can load the kernel just by specifying its file
name and the drive and partition where the kernel resides.
When booting with GRUB, you can use either a command-line interface (see Command-line interface),
or a menu interface (see Menu interface). Using the command-line interface, you type the drive
specification and file name of the kernel manually. In the menu interface, you just select an OS using the
arrow keys. The menu is based on a configuration file which you prepare beforehand (see
Configuration). While in the menu, you can switch to the command-line mode, and vice-versa. You can
even edit menu entries before using them.
In the following chapters, you will learn how to specify a drive, a partition, and a file name (see Naming
convention) to GRUB, how to install GRUB on your drive (see Installation), and how to boot your OSes
(see Booting), step by step.
57 OPERATING SYSTEM

Besides the GRUB boot loader itself, there is a grub shell grub (see Invoking the grub shell) which can be
run when you are in your operating system. It emulates the boot loader and can be used for installing
the boot loader.

LILO
LILO does not depend on a specific file system, and can boot an operating system (e.g., Linux kernel
images) from floppy disks and hard disks. One of up to sixteen different images can be selected at boot
time. Various parameters, such as the root device, can be set independently for each kernel. LILO can be
placed either in the master boot record (MBR) or the boot sector of a partition. In the latter case
something else must be placed in the MBR to load LILO.
At system start, only the BIOS drivers are available for LILO to access hard disks. For this reason, with
very old BIOS, the accessible area is limited to cylinders 0 to 1023 of the first two hard disks. For later
BIOS, LILO can use 32-bit "logical block addressing" (LBA) to access practically the entire storage of all
the hard disks that the BIOS allows access to.
LILO was the default boot loader for most Linux distributions in the years after the popularity of loadlin.
Today, most distributions use GRUB as the default boot loader.
SYSLINUX

SYSLINUX is a boot loader specially suited for diskettes. It boots only from DOS formatted disks (could be
hard disk partitions as well). It supports custom help screens to introduce the user into using the
diskette. DOS diskettes have the advantage that they are not considered defective by most PC users and
therefore they less likely thrown away or reformatted. Like GRUB, SYSLINUX reads its configuration file
at boot time.
In theory SYSLINUX can be installed in a FAT partition on the hard disk and it can boot Linux kernels from
there and it can chain load MSDOS and similar operating systems. However, SYSLINUX is not the natural
choice for booting Linux from the hard disk.
LOADLIN
LOADLIN is a program that can boot Linux from DOS. Since the advent of Windows ME and Windows XP,
it is no longer natural that PC users have DOS installed on their PCs. Windows versions up to and
including Windows 98 came with a DOS version that was usable for LOADLIN. In my opinion LOADLIN is
primarily of historical interest for this reason. The primary reasons to use LOADLIN were the following:
Getting devices working under Linux after loading their DOS device drivers. Some PC devices (mostly
sound cards) were supposed to be fully compatible with a standard product (that Linux had a device
driver for), but only after they were initialized by their DOS device drivers. So you needed to run a DOS
device driver first before Linux would be able to access that device. Therefore it made sense to boot
Linux from DOS.
Booting from a Linux CD without the need to create boot floppies. Bootable CDs are a comparatively
recent invention and most BIOS-es did not support it before 1998. Without the ability to boot directly
from the CD you either needed boot floppies or you could start Linux on the CD from DOS using
LOADLIN.
58 OPERATING SYSTEM

Installing Linux without the need to tamper with the hard disk. With LOADLIN it is not necessary to
install anything into the MBR in order to get Linux booted from the hard disk. A loadlin entry could easily
be added to the DOS boot menu in CONFIG.SYS.
Linux could even be installed without repartitioning the disk. For this very purpose the UMSDOS file
system was added to the Linux kernel. It still exists, though it sees very little usage today. The Linux file
systems lived in the LINUX directory on the DOS partition and it contained special files to translate long
file names into DOS 8+3 file names and to specify attributes such as users, groups, permissions and
device files. Linux could be installed just by unpacking a bunch of ZIP files, just as one would install a
large DOS application. LOADLIN made booting Linux just as easy as running a DOS application, hence it
fit nicely into the DOS mindset.

You might also like