Sie sind auf Seite 1von 8

Familiarization of

Operating System

By Shashank Tyagi
07020410
IDD Part – III
(Electrical)
Operating system

Description of the operating system

The operating system (sometimes referred to by its abbreviation OS), is responsible for creating the link between
the material resources, the user and the applications (word processor, video game, etc.). When a programme wants
to access a material resource, it does not need to send specific information to the peripheral device but it simply
sends the information to the operating system, which conveys it to the relevant peripheral via its driver. If there are
no drivers, each programme has to recognise and take into account the communication with each type of peripheral!

The operating system thus allows the "dissociation" of programmes and hardware, mainly to simplify resource
management and offer the user a simplified Man-machine interface (MMI) to overcome the complexity of the actual
machine.

Roles of the operating system

The operating system has various roles:

 Management of the processor: the operating system is responsible for managing allocation of the
processor between the different programmes using a scheduling algorithm. The type of scheduler is totally
dependent on the operating system, according to the desired objective.
 Management of the random access memory: the operating system is responsible for managing the
memory space allocated to each application and, where relevant, to each user. If there is insufficient
physical memory, the operating system can create a memory zone on the hard drive, known as "virtual
memory". The virtual memory lets you run applications requiring more memory than there is available
RAM on the system. However, this memory is a great deal slower.
 Management of input/output: the operating system allows unification and control of access of
programmes to material resources via drivers (also known as peripheral administrators or input/output
administrators).
 Management of execution of applications: the operating system is responsible for smooth execution of
applications by allocating the resources required for them to operate. This means an application that is not
responding correctly can be "killed".
 Management of authorisations: the operating system is responsible for security relating to execution of
programmes by guaranteeing that the resources are used only by programmes and users with the relevant
authorisations.
 File management: the operating system manages reading and writing in the file system and the user and
application file access authorisations.
 Information management: the operating system provides a certain number of indicators that can be used
to diagnose the correct operation of the machine.

Components of the operating system

The operating system comprises a set of software packages that can be used to manage interactions with the
hardware. The following elements are generally included in this set of software:

 The kernel, which represents the operating system's basic functions such as management of memory,
processes, files, main inputs/outputs and communication functionalities.
 The shell, allowing communication with the operating system via a control language, letting the user
control the peripherals without knowing the characteristics of the hardware used, management of physical
addresses, etc.
 The file system, allowing files to be recorded in a tree structure.
Types of operating system

There are several types of operating system, defined according to whether they can simultaneously manage
information measuring 16 bits, 32 bits, 64 bits or more.

System Programming Single user Multi-user Single task Multi-task

DOS 16 bits X X
Windows3.1 16/32 bits X not pre-emptive
Windows95/98/Me 32 bits X cooperative

WindowsNT/2000 32 bits X pre-emptive


WindowsXP 32/64 bits X pre-emptive
Unix / Linux 32/64 bits X pre-emptive
MAC/OS X 32 bits X pre-emptive

Linux

History and genesis of Linux

This entirely free operating system is the brainchild of Linus B.Torvalds. At the beginning of the 90s, Torvalds
wanted to create his own operating system for his graduate project. Linus Torvalds intended to develop a version of
UNIX which could be used on 80386 type architecture. The first UNIX clone which worked on a PC was Minix,
written by Andrew Tanenbaum, a minimal operating system which could be used on a PC. Linus Torvalds then
decided to expand the possibilities of Minix by developing what would become Linux. Amused by this initiative, a
number of persons contributed to help Linus Torvalds turn this system into reality, and in 1991, a first version of the
system was published. In March 1992, the first version containing almost no bug was distributed.

The originality of this system resides in the fact that Linux was not developed for commercial purposes. As a matter
of fact, not a single line of code has been copied from the original UNIX systems (as a matter of fact, Linux takes its
inspiration from numerous commercial versions of UNIX: BSD UNIX, System V.). Therefore, once created,
everyone is free to use Linux, but also to improve it.

Concepts of kernel and distribution

Linux is structured around a kernel (in English kernel) which is responsible for managing the hardware. The term
distribution refers to the assembly of a set of software around a Linux kernel to provide a ready-to-use system. The
kernel of a distribution can be updated to make it possible to include recent hardware. However, this step, which
involves recompiling the kernel, is delicate since it requires a certain level of knowledge of the system and
hardware. Recompiling the kernel must be reserved for specialists or users that are ready to make their system
unusable for learning purposes.

Most distributions also propose their own graphical installation as well as a packet management system which
makes it possible to automatically install software by managing dependencies (software under Linux is sometimes
linked to external libraries or based on other software).

Each distribution has its advantages and disadvantages: As a matter of fact, some or more suitable for beginners and
provide sophisticated graphical interfaces, while others emphasize security and developability. The best known
distributions are:
 The RedHat distribution;
 The Debian distribution;
 The Knoppix distribution;
 The Slackware distribution;

System characteristics

Linux is an operating system similar to UNIX systems that can be run on different hardware platforms: x86 (i.e.
platforms based on Intel, AMD, etc. platforms), Sparc, PowerPC, Alpha, ARM, etc. The Linux system therefore also
works on personal computers as well as on gaming consoles or personal assistants!

Linux is therefore a multi-platform system. It is also multi-user (several persons can work on the same computer at
the same time), but also multi-task (several applications can be launched at the same time without interference
between them) and multi-processor.
Linux is considered a reliable, solid, and powerful system. It is furthermore able to run with very little resources on
very low-performance computers.

In particular, the Linux system has the following advantages:

 Supports Internet standards, i.e. TCP/IP protocols, the family of protocols used on the Internet. Linux is a
free tool to create local networks, connect to the Internet, and set up servers.
 Increased security due to the transparency of its source code and the responsiveness of the community as
soon as vulnerabilities are announced.
 Separation of the memory and disk spaces in combination with specific management of the rights which
allow the management of a large number of users with a minimal level of risk.
 A kernel that is fully configurable depending on the machine hardware on which the system is installed to
maximize performance.

System X

X is a graphical interface which was developed at MIT and which makes it possible to create graphical applications
which run on different platforms.

X-Window is the graphical interface of UNIX stations. In some way, X-Window is for the Unix systems what
Windows is for DOS. The most significant advantage of this system is that it uses a graphical interface in addition to
certain commands.

Under Linux, there is a free implementation of the X-Window system called XFree86. XFree86 supports a very
significant number of video cards, but some video cards are not supported.

The shell

The command interpreter is the interface between the user and the operating system, hence the name "shell".

The shell therefore acts as an intermediary between the operating system and the user thanks to command lines that
are entered by the latter. Its role consists in reading the command line, interpreting its meaning, carry out the
command, and then return the result via the outputs.

The shell is an executable file responsible for interpreting the commands, transmitting them to the system, and
returning the result. There are several shells, the most common being sh (called "Bourne shell"), bash ("Bourne
again shell"), csh ("C Shell"), Tcsh ("Tenex C shell"), ksh ("Korn shell"),and zsh ("Zero shell"). Their name
generally matches the name of the executable.
Each user has a default shell, which will be launched upon opening of a command prompt. The default shell is
specified in the dans configuration file /etc/passwd in the last field of the line corresponding to the user. It is possible
to change the shell during a session by simply executing the corresponding executable file, for example:

/bin/bash

Communication pipes

The pipes are a special communication mechanism of all UNIX systems. A pipe, symbolised by a vertical bar
(character "|"), makes it possible to assign the standard output of a command to the standard input of another, like a
pipe allow communication between the standard input of a command with the standard output of another one.

In the following example, the standard output of the command ls -al is sent to the program sort, which is responsible
for sorting the result in alphabetical order:

ls -al | sort

File hierarchy under Linux

To ensure compatibility and portability, Linux systems comply with the sole FHS (File Hierarchy Standard)
standard. The basic hierarchy is as follows:

Directory Description
/ The / character represents the root directory of the Linux system. All directories are below the / (root
directory) of the system.
/bin The /bin directory contains binary commands that are available to all users.
/boot The /boot directory contains the kernel and boot loader files.
/dev The /dev directory contains device files.
/etc The /etc directory contains configuration files specific to the system.
/home The /home directory contains by default the user home directories.
/initrd The /initrd directory is used during the boot process to hold the initial RAM drive image.
/lib The /lib directory contains shared program libraries and kernel modules.
/media The /media directory contains the /cdrom and /floppy directories. It is the point where CD-ROM and
floppy drives can be mounted according to the FHS (Filesystem Hierarchy Standard) v2.3.
/mnt The /mnt directory is an empty directory. This was the mount point for CD-ROM and floppy drives
prior to FHS v2.3.
/opt The /opt directory contains the additional programs.
/proc The /proc directory contains information about the system state and processes.
/root The /root directory is the root user's home directory. Do not confuse /root with the root of the system
(/).
/sbin The /sbin directory contains system binary commands.
/srv The /srv directory contains files for services like the FTP and Web servers.
/sys The /sys directory is new with release 2.6. It takes some of the system state date that was previously
contained in /proc.
/tmp The /tmp directory contains temporary files created by programs during system use.
/usr The /usr directory contains system commands and utilities. /usr holds the following directories:

 /usr/bin
 /usr/lib
 /usr/local
 /usr/sbin
 /usr/X11R6 (for the X Window system)

/var The /var directory contains data files that change constantly. Standard subdirectories include:
 /var/mail (holds e-mail in boxes)
 /var/spool (holds files waiting for processing, such as print jobs or scheduled jobs)
 /var/www (holds www or proxy cache files)

Init and Runlevels

A system's runlevel depends on its ability to perform the boot up process successfully. The boot process occurs in
the order of the steps listed below.

1. POST
2. Bootstrap
3. Boot loader
4. Kernel
5. Init

The init (initialize) daemon is responsible for loading all the other daemons that bring the system to a useable state.
(A daemon is a system service.) To load the other daemons, init uses the /etc/inittab (init table) configuration file.

Linux lets you define multiple runlevels. A runlevel identifies a collection of services that defines a specific system
state. For example, Microsoft Windows has Safe Mode and regular mode which are somewhat equivalent to Linux
runlevels. In Linux, however, you can define multiple runlevels and customize the runlevels to meet your own
needs.

The runlevel is determined by the number and type of daemons that a system has loaded into memory and is
executing. The table below describes each of the seven runlevels. (This system of seven runlevels comes from
System V Unix which first implemented this initialization procedure.)

Runlevel Description Directory


0 This is the halt state. In runlevel 0, the system has no daemons in memory and is ready /etc/rc.d/rc0.d
to be turned off.
1 This is single user mode. In single user mode, the system uses only enough daemons to /etc/rc.d/rc1.d
s allow a single user to log in. The user is automatically logged in as the root user.
S
single
2 This is multi-user mode. In multi-user mode, the system allows multiple users to log in. /etc/rc.d/rc2.d
It also provides networking services with the exception of the Network File System.
3 This is extended multi-user mode. In extended multi-user mode, the system provides /etc/rc.d/rc3.d
multi-user mode support in addition to all network services, including Network File
System.
4 This runlevel is not used. However, you can manually define it, if you wish. /etc/rc.d/rc4.d
5 This is graphical mode. In graphical mode, the system provides the same capabilities as /etc/rc.d/rc5.d
in extended user mode. However, the system also supports graphical log ins.
6 This is the reboot runlevel. In this runlevel, the system re-starts itself. Do not set the /etc/rc.d/rc6.d
runlevel to 6.
Comparison of Linux and Windows

GUI: Both Linux and Windows provide a GUI and a command line interface. The Windows GUI has changed from
Windows 3.1 to Windows 95 (drastically) to Windows 2000 (slightly) to Windows XP (fairly large) and is slated to
change again with the next version of Windows, the one that will replace XP. Windows XP has a themes feature that
offers some customization of the look and feel of the GUI. Linux typically provides two GUIs, KDE and Gnome
speed; efficiency and reliability are all increased by running a server instance of Linux without a GUI, something
that server versions of Windows cannot do.

Text Mode Interface: This is also known as a command interpreter. Windows users sometimes call it a DOS
prompt. Linux users refer to it as a shell. Each version of Windows has a single command interpreter, but the
different flavours of Windows have different interpreters. In general, the command interpreters in the Windows 9x
series are very similar to each other and the NT class versions of Windows (NT, 2000, XP) also have similar
command interpreters. There are however differences between a Windows 9x command interpreter and one in an
NT class flavour of Windows. Linux, like all versions of UNIX, supports multiple command interpreters, but it
usually uses one called BASH (Bourne Again Shell). Others are the Korn shell, the Bourne shell, ash and the C
shell.

Cost: For desktop or home use, Linux is very cheap or free, Windows is expensive. For server use, Linux is very
cheap compared to Windows. Microsoft allows a single copy of Windows to be used on only one computer. Starting
with Windows XP, they use software to enforce this rule (Windows Product Activation at first, later Genuine
Windows). In contrast, once you have purchased Linux, you can run it on any number of computers for no
additional charge.

Installing the OS: There are three ways to install Windows XP: a clean install, an upgrade install and a repair
install. Then, there is a "recovery" install, which is not an install in the true sense of the word but rather the
restoration of a disk image backup. There is a huge variation in the Linux installation procedure. Different
distributions of Linux have their own installation programs (which may even change with different versions of the
same distribution). Installing Linux on a computer without an existing operating system is much easier than
installing it on a machine with an existing OS that you want to preserve.

Running Linux Without Installing It: One thing that Linux can do that Windows cannot, is run from a CD. To
run Windows, it has to first be installed to your hard disk. Normally Linux also runs from a hard disk, but there are
quite a few versions of Linux that run completely from a CD without having to be installed to a hard disk. The term
for this is a "Live" CD.

Security: The vast majority of malicious software (of all types) runs on Windows. Windows users are burdened
with the need for anti-virus and anti-spyware software. Linux users are not.

Supported Hardware Device: While Linux itself runs on many more computers than Windows, when it comes to
hardware peripherals, many work with Windows but not with Linux. The hardware vendors write drivers for
Windows more often than they do for Linux. Some hardware vendors will release technical specs so that someone in
the Linux community can write a driver for the device, but other vendors aren't so open minded.

Multiple Users: Linux is a multi-user system, Windows is not. That is, Windows is designed to be used by one
person at a time. Databases running under Windows allow concurrent access by multiple users, but the Operating
System itself is designed to deal with a single human being at a time. Linux, like all Unix variants, is designed to
handle multiple concurrent users.

Hard Disk Partition: Windows must be installed to and boot from a primary partition. Linux is better in this regard
as it can be installed to and boot from either a primary partition or a logical partition. Logical partitions reside inside
a special type of primary partition called an extended partition. There is no practical limit to the number of logical
partitions that can exist on a single hard disk. Thus you can easily experiment with a dozen different Linux
distributions by installing each one in a different logical partition. Windows must boot from the first hard disk.
Here too Linux is better, it can boot from any hard disk in the computer.

File System: Windows uses FAT12, FAT16, FAT32 and/or NTFS with NTFS almost always being the best choice.
The FATx file systems are older and have assorted limitations on file and partition size that make them
problematical in the current environment. Linux also has a number of its own native file systems. The default file
system for Linux used to be ext2, now it is typically ext3. Other supported file systems includes XFS, JFS, JFFS and
Reiser3. Reiser4 is in development.

File Hierarchy: Windows and Linux use different concepts for their file hierarchy. Windows uses a volume-based
file hierarchy, Linux uses a unified scheme. Windows uses letters of the alphabet to represent different devices and
different hard disk partitions. Under Windows, you need to know what volume (C: , D :,...) a file resides on to select
it, the file's physical location is part of its name. In Linux all directories are attached to the root directory, which is
identified by a forward-slash, "/".

Hidden Files: Both support the concept of hidden files, which are files that, by default, are not shown to the user
when listing files in a directory. Linux implements this with a filename that starts with a period. Windows tracks this
as a file attribute in the file metadata (along with things like the last update date). In both OSs the user can over-ride
the default behaviour and force the system to list hidden files.

Scripting: Windows started with BAT files (a combination of OS commands and optionally its own language) and
then progressed to Windows Scripting Host (WSH) which supports two languages, JavaScript and VB Script.
Windows also has WMI, the Windows Management Interface which makes many functions available to scripts.
Linux, like all UNIX variants, provides multiple scripting languages, referred to as shell scripts. Among them are the
Bourne shell, the C shell, Perl, Python and Ruby. I have used the first three, but not Python and Ruby.

References

1>Wikipedia

2> http://en.kioskea.net/contents/linux/

3>Test Out Linux+ tutorials.

4> Modern.Operating.Systems.2nd.Edition by Andrew S. Tanenbaum

Das könnte Ihnen auch gefallen