Chapter - 1 What Is Operating System?
Chapter - 1 What Is Operating System?
The kernel:
An operating system kernel is a computer program that serves as an intermediary layer between the
hardware and application programs. A kernel makes it possible for software to interact with the underlying
hardware of the operating system. Such software (mostly application software) achieve this by issuing service
requests to the kernel. (These requests are called system calls.) When a service request is received, the kernel
translates it into instructions for the CPU or other electronic components of the computer to execute.
The way operating system kernels handle requests, however, differ from one another. Consider the
following analogy: an application program wants to have a cup of coffee so it makes a request to the kernel.
What should the kernel do at this point? Should it delegate the coffee making activity to somebody else
(microkernels) or should it make it by itself (monolithic kernels)? Delegating the activity can be advantageous,
in that, the kernel would then have less things to worry about. However, that comes at the cost of performance:
finding who to delegate, calling the person, etc. But how about a mixed approach? Say, let the kernel do some
core stuff by itself and delegate other things to other people (hybrid kernels).
In a microkernel operating system design, the kernel itself does not contain any functions—all tasks
are delegated to separate programs called servers. These servers provide services for the operating system,
leaving the kernel to contain only what it needs to operate: a mechanism of mapping requests to servers and
executing them. This greatly reduces the size of the kernel, and also increases its stability since any fault in any
of the servers does not really affect the kernel itself. Nevertheless, the critical overall performance of
microkernels are lower than that of their monolithic counterparts because of their (mostly) large number of
request-to-server mappings. Popular examples of microkernel operating systems are GNU Hurd, MINIX, and
QNX.
A monolithic kernel is a system program that contains all the code required to perform every kernel
related task. It contains all the core operating system functions and device drivers. Since all the various
functions live in the same memory area, it is possible for one function to modify the behavior of another
function. Worse yet, data corruption resulting from the operation of one function can cause the whole system
to crash. However, with these negative side effects come some great gains: the dynamic module loading ability
of some monolithic kernels minimizes the operating system's memory footprint while running faster than
microkernels in most practical cases. Examples of monolithic operating systems are DOS, BSD, Linux, and
OpenVMS.
The architecture of hybrid kernels is similar to that of microkernels, except not every request is
delegated to a server, but some code are loaded into kernel space as in monolithic kernels. The performance
overhead incurred by microkernels when running some services (such as the file system) in user space is
eliminated by moving the code for such services into kernel space. This technique allows the kernel to enjoy
the best of both worlds: modularity and performance. However, there is a compromise: unlike monolithic
kernels, hybrid kernels cannot dynamically load additional modules to extend the capabilities of the kernel.
Examples of hybrid kernel operating systems are Microsoft Windows, Mac OS X, and the discontinued BeOS.
The Device Drivers
A computer system is usually made up of several devices such as disk drives, keyboards, mice, video
adapters, sound cards, etc. When a user attaches such devices to their computer, they expect the operating
system to identify the device and make use of it. Indeed, the operating system may know what the device is but
not how to communicate with it. The latter problem is solved by means of a driver. A device driver is a
computer program that controls a particular device attached to a computer. It provides an interface through
which the operating system can transparently make calls to the device. In fact, device drivers have built-in
functions that are meant to be called by the operating system or other privileged programs.
Devices are generally slower compared with the CPU. This means that whereas the CPU could be doing
other stuff, it many times waits for a busy but slow device to finish whatever job it is doing. This bad behavior,
however, is mitigated by the use of hardware interrupts. Interrupts because control to be transferred to a routine
designed to process the interrupt. For example, when a key is pressed on a computer keyboard, a hardware
interrupt is generated, which invokes the keyboard device driver. After the driver has finished processing the
event, control is returned back to the interrupted program. However, only a few peripherals support interrupts
which means that drivers have to poll the hardware, i.e. ask whether there is an event to process.
Disk Cleanup
Disk Cleanup is a function that comes with all versions of Windows Operating Systems. Disk Cleanup
allows for you to scan your entire hard drive to search for extra room by deleting any unnecessary files such as
temporary files from the Internet and cookies that are downloaded when you visit webpages. Not only does
Disk Cleanup allow you to delete simple files from the Internet, but it also allows for you to delete Restore
Points, uninstall programs, remove Windows components, and compress old files all in the click of a mouse.
You can find Disk Cleanup in Windows XP by going to the Start menu –> All Programs –> Accessories –>
System Tools –> Disk Cleanup.
Disk Defragmenter
The Disk Defragmenter is another tool that comes with Windows and is used for many different
solutions. The main function of the Disk Defragmenter is to reassemble fragmented files. Whenever a file is
modified in any way, the computer stores the file in broken pieces across the hard drive rather than putting the
whole file in one spot. This can lead to system malfunction and poor performance because your computer must
search for all the pieces of a specific file before it can display it. The Disk Defragmenter searches for all pieces
of every file on your hard drive and reassembles the files into a specific location. This increases the speed at
which files are displayed and results in less delays when opening files or programs.
System Restore
System Restore is a function that comes with Windows that allows you to return your computer to an
earlier time in which you had not encountered an error. System Restore is great for fixing problems that a virus
has caused after you use antivirus software to rid your computer of the malware. System Restore allows you to
manually set Restore Points on a calendar and also automatically creates Restore Points on a regular basis as
well as right before your computer goes through any major change such as installing a new program. System
Restore can be found by going to Start –> All Programs –> Accessories –> System Tools –> System Restore.
Registry Cleaners
Registry cleaners are programs that allow for you to scan your computer for any errors in the registry,
which is a collection of the core computer files that are essential to performance and functionality, and repairs
them if needed. Registry cleaners are widely available on the Internet and give you a significant upper hand
when cleaning up the mess that a virus or other malware has left on your computer. Likewise, some otherwise
safe programs can cause errors in the registry without intending to. Registry files can also be corrupted if the
user unknowingly deletes or modifies a file in the registry. This usually occurs when an inexperienced user
tries to fix their computer and inevitably causes more damage than before.
File Splitters
File splitters are programs that allow you to break a file into smaller pieces in order to store or send
files. File splitters often come in handy because many online storage services, including email attachments,
limit you to a specific file size that can be transferred at one time even though files often exceed these limits.
File splitters allow you to break the file into two or more pieces, send them simultaneously, and then piece
them back together when you are ready to use the file again. A good file splitter is File Splits. It allows for you
to break a file of any size into multiple pieces and then rejoin the files together just as easily.
Types of Operating System
There are Many Operating Systems those have be Developed for Performing the Operations those are
requested by the user. There are Many Operating Systems which have the Capability to Perform the Requests
those are received from the System. The Operating system can perform a Single Operation and also Multiple
Operations at a Time. So there are many types of Operating systems those are organized by using their Working
Techniques.
1. Resource Management
Operating System Also Known as the Resource Manager Means Operating System will Manages all
the Resources those are Attached to the System means all the Resource like Memory and Processor and all the
Input output Devices those are Attached to the System are Known as the Resources of the Computer System
and the Operating system will Manage all the Resources of the System. The Operating System will identify at
which Time the CPU will perform which Operation and in which Time the Memory is used by which Programs.
And which Input Device will respond to which Request of the user means When the Input and Output Devices
are used by the which Programs. So this will manage all the Resources those are attached to the Computer
System.
2. Storage Management
Operating System also Controls the all the Storage Operations means how the data or files will be Stored
into the computers and how the Files will be Accessed by the users etc. All the Operations those are
Responsible for Storing and Accessing the Files is determined by the Operating System Operating System also
Allows us Creation of Files, Creation of Directories and Reading and Writing the data of Files and Directories
and also Copy the contents of the Files and the Directories from One Place to Another Place.
3. Process Management:
The Operating System also Treats the Process Management means all the Processes those are given by
the user or the Process those are System‘s own Process are Handled by the Operating System . The Operating
System will create the Priorities foe the user and also start or Stops the Execution of the Process and Also
Makes the Child Process after dividing the Large Processes into the Small Processes.
4. Memory Management:
Operating System also manages the Memory of the Computer System means provide the Memory to
the Process and also deallocate the Memory from the Process. And also defines that if a Process gets completed
then this will deallocate the Memory from the Processes.
5. Extended Machine:
Operating System also behaves like an Extended Machine means Operating system also Provides us
Sharing of Files between Multiple Users, also Provides Some Graphical Environments and also Provides
Various Languages for Communications and also Provides Many Complex Operations like using Many
Hardware’s and Software’s.
6. Mastermind:
Operating System also performs Many Functions and for those Reasons we can say that Operating
System is a Mastermind. It provides Booting without an Operating System and Provides Facility to increase
the Logical Memory of the Computer System by using the Physical Memory of the Computer System and also
provides various Types of Formats like NTFS and FAT File Systems.
Operating System also controls the Errors those have been Occurred into the Program and Also Provides
Recovery of the System when the System gets Damaged Means When due to Some Hardware Failure , if
System Doesn’t Works properly then this Recover the System and also Correct the System and also Provides
us the Backup Facility. And Operating System also breaks the large program into the Smaller Programs those
are also called as the threads. And execute those threads one by one.
About Clustered Operating System
In personal computer storage technology, a cluster is the logical unit of file storage on a hard disk; it's
managed by the computer's operating system. Any file stored on a hard disk takes up one or more clusters of
storage. A file's clusters can be scattered among different locations on the hard disk. The clusters associated
with a file are kept track of in the hard disk's file allocation table (FAT). When you read a file, the entire file is
obtained for you and you aren't aware of the clusters it is stored in.
Since a cluster is a logical rather than a physical unit (it's not built into the hard disk itself), the size of
a cluster can be varied. The maximum number of clusters on a hard disk depends on the size of a FAT table
entry. Beginning with DOS 4.0, the FAT entries were 16 bits in length, allowing for a maximum of 65,536
clusters. Beginning with the Windows 95 OSR2 service release, a 32-bit FAT entry is supported, allowing an
entry to address enough clusters to support up to two terabytes of data (assuming the hard disk is that large!).
The tradeoff in cluster size is that even the smallest file (and even a directory itself) takes up the entire
cluster. Thus, a 10-byte file will take up 2,048 bytes if that's the cluster size. In fact, many operating systems
set the cluster size default at 4,096 or 8,192 bytes. Until the file allocation table support in Windows 95 OSR2,
the largest size hard disk that could be supported in a single partition was 512 megabytes. Larger hard disks
could be divided into up to four partitions, each with a FAT capable of supporting 512 megabytes of clusters.
Chapter – 2