Professional Documents
Culture Documents
Definition
An operating system (OS) is system software that manages computer hardware and
software resources and provides common services for computer programs.
An operating system is a group of computer programs that coordinates all the activities among
computer hardware devices. It is the first program loaded into the computer by a boot program
and remains in memory at all times. Application programs usually require an operating
system to function.
The process of starting or restarting the computer is known as booting. A cold boot is when you
turn on a computer that has been turned off completely. A warm boot is the process of using the
operating system to restart the computer.
The operating system performs basic computer tasks, such as managing the various peripheral
devices such as the mouse, keyboard and printers. For example, most operating systems now are
plug and play which means a device such as a printer will automatically be detected and
configured without any user intervention.
A user interacts with software through the user interface. The two main types of user interfaces
are: command line and a graphical user interface (GUI). With a command line interface, the user
interacts with the operating system by typing commands to perform specific tasks. An example
of a command line interface is DOS (disk operating system). With a graphical user interface, the
user interacts with the operating system by using a mouse to access windows, icons, and menus.
1
An example of a graphical user interface is Windows Vista or Windows 7.
The operating system is responsible for providing a consistent application program interface
(API) which is important as it allows a software developer to write an application on one
computer and know that it will run on another computer of the same type even if the amount of
memory or amount of storage is different on the two machines.
The operating system also handles system resources such as the computer's memory and sharing
of the central processing unit (CPU) time by various applications or peripheral devices. Programs
and input methods are constantly competing for the attention of the CPU and demand memory,
storage and input/output bandwidth. The operating system ensures that each application gets the
necessary resources it needs in order to maximise the functionality of the overall system.
The operating system also handles the organisation and tracking of files and directories (folders)
saved or retrieved from a computer disk. The file management system allows the user to perform
such tasks as creating files and directories, renaming files, coping and moving files, and deleting
files. The operating system keeps track of where files are located on the hard drive through the
type of file system. The type two main types of file system are File Allocation table (FAT) or
New Technology File system (NTFS).
File Allocation table (FAT) uses the file allocation table which records, which clusters are used
and unused and where files are located within the clusters.
NTFS is a file system introduced by Microsoft and it has a number of advantages over the
previous file system, named FAT32 (File Allocation Table).
One major advantage of NTFS is that it includes features to improve reliablity. For example, the
new technology file system includes fault tolerance, which automatically repairs hard drive
errors without displaying error messages. It also keeps detailed transaction logs, which tracks
hard drive errors. This can help prevent hard disk failures and makes it possible to recover files if
the hard drive does fail.
NTFS also allows permissions (such as read, write, and execute) to be set for individual
directories and files.
2
LINUX
What is Linux?
Linux is, in simplest terms, an operating system. It is the software on a computer that enables
applications and the computer operator to access the devices on the computer to perform desired
functions. The operating system (OS) relays instructions from an application to, for instance, the
computer's processor. The processor performs the instructed task, then sends the results back to
the application via the operating system.
Explained in these terms, Linux is very similar to other operating systems, such as Windows and
OS X.
But something sets Linux apart from these operating systems. The Linux operating system
represented a $25 billion ecosystem in 2008. Since its inception in 1991, Linux has grown to
become a force in computing, powering everything from the New York Stock Exchange to
mobile phones to supercomputers to consumer devices.
As an open operating system, Linux is developed collaboratively, meaning no one company is
solely responsible for its development or ongoing support. Companies participating in the Linux
economy share research and development costs with their partners and competitors. This
spreading of development burden amongst individuals and companies has resulted in a large and
efficient ecosystem and unheralded software innovation.
Over 1,000 developers, from at least 100 different companies, contribute to every kernel release.
In the past two years alone, over 3,200 developers from 200 companies have contributed to the
kernel--which is just one small piece of a Linux distribution.
This article will explore the various components of the Linux operating system, how they are
created and work together, the communities of Linux, and Linux's incredible impact on the IT
ecosystem.
Where is Linux?
One of the most noted properties of Linux is where it can be used. Windows and OS X are
predominantly found on personal computing devices such as desktop and laptop computers.
Other operating systems, such as Symbian, are found on small devices such as phones and PDAs,
while mainframes and supercomputers found in major academic and corporate labs use
specialized operating systems such as AS/400 and the Cray OS.
Linux, which began its existence as a server OS and Has become useful as a desktop OS, can
also be used on all of these devices. “From wristwatches to supercomputers,” is the popular
description of Linux' capabilities.
An abbreviated list of some of the popular electronic devices Linux is used on today includes:
3
Lenovo IdeaPad S9
HP Mini 1000
Motorola MotoRokr EM35
Phone
5
GNU/LINUX OPERATING SYSTEM ARCHITECTURE
At the top is the user, or application, space. This is where the user applications are executed.
Below the user space is the kernel space. Here, the Linux kernel exists.
There is also the GNU C Library (glibc). This provides the system call interface that connects
to the kernel and provides the mechanism to transition between the user-space application and
the kernel. This is important because the kernel and user application occupy different protected
address spaces. And while each user-space process occupies its own virtual address space, the
kernel occupies a single address space.
The Linux kernel can be further divided into three gross levels. At the top is the system call
interface, which implements the basic functions such as read and write. Below the system call
interface is the kernel code, which can be more accurately defined as the architecture-
independent kernel code. This code is common to all of the processor architectures supported by
Linux. Below this is the architecture-dependent code, which forms what is more commonly
called a BSP (Board Support Package). This code serves as the processor and platform-specific
code for the given architecture.
In reality, the architecture is not as clean as what is shown in Figure above. For example, the
mechanism by which system calls are handled (transitioning from the user space to the kernel
space) can differ by architecture. Newer x86 central processing units (CPUs) that provide
support for virtualization instructions are more efficient in this process than older x86 processors
that use the traditional int 80h method.
6
The Linux kernel implements a number of important architectural attributes. At a high level, and
at lower levels, the kernel is layered into a number of distinct subsystems. Linux can also be
considered monolithic because it lumps all of the basic services into the kernel. This differs from
a microkernel architecture where the kernel provides basic services such as communication, I/O,
and memory and process management, and more specific services are plugged in to the
microkernel layer. Each has its own advantages, but I'll steer clear of that debate.
Over time, the Linux kernel has become efficient in terms of both memory and CPU usage, as
well as extremely stable. But the most interesting aspect of Linux, given its size and complexity,
is its portability. Linux can be compiled to run on a huge number of processors and platforms
with different architectural constraints and needs. One example is the ability for Linux to run on
a process with a memory management unit (MMU), as well as those that provide no MMU. The
uClinux port of the Linux kernel provides for non-MMU support. See the Resources section for
more details.
7
System call interface Subsystem
The SCI is a thin layer that provides the means to perform function calls from user space into the
kernel. As discussed previously, this interface can be architecture dependent, even within the
same processor family. The SCI is actually an interesting function-call multiplexing and
demultiplexing service. You can find the SCI implementation in ./linux/kernel, as well as
architecture-dependent portions in ./linux/arch.
8
Figure 4. The VFS provides a switching fabric between users and file systems
At the top of the VFS is a common API abstraction of functions such as open, close, read, and
write. At the bottom of the VFS are the file system abstractions that define how the upper-layer
functions are implemented. These are plug-ins for the given file system (of which over 50 exist).
You can find the file system sources in ./linux/fs.
Below the file system layer is the buffer cache, which provides a common set of functions to the
file system layer (independent of any particular file system). This caching layer optimizes access
to the physical devices by keeping data around for a short time (or speculatively read ahead so
that the data is available when needed). Below the buffer cache are the device drivers, which
implement the interface for the particular physical device.
Device drivers
The vast majority of the source code in the Linux kernel exists in device drivers that make a
particular hardware device usable. The Linux source tree provides a drivers subdirectory that is
further divided by the various devices that are supported, such as Bluetooth, I2C, serial, and so
on. You can find the device driver sources in ./linux/drivers.
Architecture-dependent code
While much of Linux is independent of the architecture on which it runs, there are elements that
must consider the architecture for normal operation and for efficiency. The ./linux/arch
9
subdirectory defines the architecture-dependent portion of the kernel source contained in a
number of subdirectories that are specific to the architecture (collectively forming the BSP). For
a typical desktop, the i386 directory is used. Each architecture subdirectory contains a number of
other subdirectories that focus on a particular aspect of the kernel, such as boot, kernel, memory
management, and others. You can find the architecture-dependent code in ./linux/arch.
If the portability and efficiency of the Linux kernel weren't enough, it provides some other
features that could not be classified in the previous decomposition.
Linux, being a production operating system and open source, is a great test bed for new protocols
and advancements of those protocols. Linux supports a large number of networking protocols,
including the typical TCP/IP, and also extension for high-speed networking (greater than 1
Gigabit Ethernet [GbE] and 10 GbE). Linux also supports protocols such as the Stream Control
Transmission Protocol (SCTP), which provides many advanced features above TCP (as a
replacement transport level protocol).
Linux is also a dynamic kernel, supporting the addition and removal of software components on
the fly. These are called dynamically loadable kernel modules, and they can be inserted at boot
when they're needed (when a particular device is found requiring the module) or at any time by
the user.
A recent advancement of Linux is its use as an operating system for other operating systems
(called a hypervisor). Recently, a modification to the kernel was made called the Kernel-based
Virtual Machine (KVM). This modification enabled a new interface to user space that allows
other operating systems to run above the KVM-enabled kernel. In addition to running another
instance of Linux, Microsoft® Windows® can also be virtualized. The only constraint is that the
underlying processor must support the new virtualization instructions.
10