Assignment of Linux
Operation System
Question No.1 Draw
and explain different layers of Linux Operating System.
|
Answer.
Operating System
Layers-
Conceptually, the
Linux operating system is similar to an onion. It consists of many
layers, one on top of the other. At the very core is the interface with the
hardware. The operating system must know how to communicate with the hardware
or nothing can get done. This is the most privileged aspect of the operating
system.
Because it needs to access the hardware
directly, this part of the operating system is the most powerful as
well as the most dangerous. What accesses the hardware is a set of functions
within the operating system itself (the kernel) called device drivers.
If it does not behave correctly, a device driver has the potential of
wiping out data on your hard disk or "crashing" your system. Because
a device driver needs to be sure that it has properly completed its task (such
as accurately writing or reading from the hard disk), it cannot quit until it
has finished. For this reason, once a driver has started, very little can get
it to stop. We'll talk about what can stop it in the section on
the kernel.
Above the device
driver level is what is commonly thought of when talking about the operating system, the management functions. This
is where the decision is made about what gets run and when, what resources are
given to what process, and so on.
In our previous discussion
on processes, we talked about having several different processes all in memory
at the same time. Each gets a turn to run and may or may not get to use up
its time slice. It is at this level that the operating system determines who gets to run
next when your time slice runs out, what should be done when an interrupt comes in, and where it
keeps track of the events on which a sleeping process may be waiting. It's even
the alarm clock to wake you up when you're sleeping.
The actual processes that
the operating system is managing are at levels
above the operating system itself. Generally, the first of these levels is for
programs that interact directly with the operating system, such as the various
shells. These interpret the commands and pass them along to the operating
system for execution. It is from the shell that you usually
start application programs such as word
processors, databases, or compilers. Because these often rely on other programs
that interact directly with the operating system, these are often considered a
separate level. This is how the different levels (or layers) might look like
graphically
Image - Operating system layers.
(Interactive)
If you are running Linux with a
graphical interface (e.g. the X Windowing System), you have an additional layer.
Your shell might start the graphical
interface, which then starts the other programs and applications as we
discussed.
Under Linux, there are many sets of
programs that serve common functions. This includes things like mail or
printing. These groups of related programs are referred to as "System
Services", whereas individual programs such as vi or fdisk are referred to
as utilities. Programs that perform a single function such as ls or date are
typically referred to as commands.
Question No 2. What are run
levels? Explain in detail.
|
Answer:-
Run levels-
Run levels come into picture when a user wants to
run some or all installed
services. Run levels are used to define different
configurations of running
services.
A run level is a state of init and the whole system
that specifies what system
services are running. Run levels are represented
using numbers. Linux
supports seven different run levels. The lists all
these seven
Seven
Different Run levels
Run level
|
Comment
|
0
|
Halt the system
|
1
|
Single user mode
|
2
|
Single user mode with
networking
|
3
|
Full multiuser with
networking
|
4
|
Not yet Defined
|
5
|
Multi-User with networking
and X Windows
|
6
|
Shutdown and Reboot
|
At any given time, a system runs in only one of
these runlevels. In general,
these runlevels are used for various functions. The
runlevels 0, 1, and 6 are
reserved. But, you can modify runlevels 2 through
5.
Services that begin at a particular runtime can be
identified by the contents
of the various rcN.d directories. These directories
are saved either at
/etc/init.d/rcN.d or /etc/rcN.d (N represents the
runlevel number.)
Each runlevel includes a series of 'if' links
pointing to start-up scripts stored
in /etc/init.d. The names of these links begin with
either ‘K’ or ‘S’, followed by
a number. ‘S’ at the beginning of the link's name
shows that the service will
be started when it enters that runlevel. ‘K’ at the
beginning of the link's name
shows that the service will be killed (if running).
Inittab file-
The '/etc/inittab' file specifies init that
indicates which runlevel to start the
system at and specifies the processes to be run at
each runlevel. An entry in
the init tab file follows the following syntax:
id:runlevels:action:process
Where:
id – A
unique sequence of one-four characters which denotes an entry in
inittab.
runlevels – List
of runlevels for which the defined action should be taken. In
this field, there may exist many characters for
various runlevels and a
particular process to run at multiple runlevels.
action – This
field specifies the action that should be taken in different
runlevels. Some of the valid
actions are listed
Question No
3. Describe the following:
a) File
encryption
b) Email
encryption
Answer
|
File encryption –Files can be encrypted using
the following two approaches:
o EncFS – ncFS is an encrypted
pass-through file system implemented
in user-space. It performs encryption on a
file-by-file basis and is
modeled after CFS - the original Cryptographic File
system
introduced by Matt Blaze, published in 1993. No
special permissions
are required to run EncFS. It uses the FUSE library
and Linux kernel
module to create the file system interface. It is
an open source
service licensed by the GPL. The website
http://arg0.net/wiki/encfs
provides more information on this.
Gnu Privacy Guard (GnuPG) – GnuPG is a tool for secure
data
transaction and storage. The website
http://www.gnupg.org/
documentation provides more information on this
tool. The website
http://www.gnupg.org/documentation/manpage.en.html
rovides man
page of this tool. This tool is used to encrypt and
sign data on Linux
or UNIX like operating system such as FreeBSD or
Solaris. You can
use gpg command to encrypt and decrypt files using
a password.
The gpg command for encrypting a single file is:
prompt$ gpg -c filename
E-mail encryption – E-mails can be protected from
hacking by encrypting them. This allows only the recipient to view them. On Linux, the
most commonly used public key encryption tool is the GnuPG. It was introduced as the open source descendant
of Open Pretty Good Privacy
(OpenPGP). GnuPG is now a popular encryption tool
entirely compatible with PGP. Basically, GnuPG is a text-only command-line
application, but
various frontends like kGpg can also be used for
it. Once GPG isinstalled, you must manipulate a key pair (CTRL+N in kGpg) to
createLinux Operating System.your own public and private key. A strong password
with a combination
of uppercase and lowercase letters, numbers,
special characters, and 4096 bit key can ensure maximum security. Once the key
pair has been
manipulated, you should upload your public key to
the various key servers around the world, so that people and email services
will be ableto find it. kGpg involves a built-in list of the most popular
servers which makes the process easier.
------------------------------------------------------------------------------------------------------------
No comments:
Post a Comment