Lab 2 Os
Lab 2 Os
1.Introduction to LINUX/UNIX:
Linux is an operating system that was developed by Linus Torvalds in 1991. The name “Linux”
originates from the Linux kernel. It is an open-source software that is completely free to use. It is
used for computer hardware and software, game development, mainframes, etc. It can run various
client programs.
Unix is a portable, multi-tasking, bug-fixing, multi-user operating system developed by AT&T. It
started as a one-man venture under the initiative of Ken Thompson of Bell Labs. It proceeded to
turn out to become the most widely used operating system. It is used in web servers, workstations,
and PCs. Many business applications are accessible on it.
2.Architecture of LINUX:
A system call is a method for a computer program to request a service from the kernel of
the operating system on which it is running. A system call is a method of interacting with the
operating system via programs. A system call is a request from computer software to an
operating system's kernel.
Under Linux the execution of a system call is invoked by a maskable interrupt or exception class
transfer, caused by the instruction int 0x80. We use vector 0x80 to transfer control to the kernel. This
interrupt vector is initialized during system startup, along with other important vectors like the
system clock vector. As of version 0.00.2 of Linux, there are 116 system calls.
Services provided by System Calls include Process creation and management, Main memory
management, File Access, Directory and File system management, Device handling(I/O),
Protection, Networking, etc.
4.Command Structure:
A command is a program that tells the Unix system to do something. UNIX uses a special
program, called the shell or the command line interpreter, to interpret what you have typed into
what you want to do. The components of the command line are: the command, any options
required by the command and the command's arguments (if required).
The general form of a UNIX command is: command [-option(s)] [argument(s)]
Options must come after the command and before any command arguments. Options should not
appear after the main argument(s). However, some options can have their own arguments!
For most commands you can separate the options, preceding each with a hyphen,
e.g.: command -option1 -option2 -option3
Some commands have options that require parameters. Options requiring parameters are usually
specified separately,
e.g.: lpr -Pprinter3 -# 2 file will send 2 copies of file to printer3.
These are the standard conventions for commands. However, not all Unix commands will follow
the standard. Some don't require the hyphen before options and some won't let you group
options together, i.e. they may require that each option be preceded by a hyphen and separated
by whitespace from other options and arguments.