Os Module 1
Os Module 1
MODULE 1
INTRODUCTION TO SYSTEM SOFTWARE
SYLLABUS: MODULE I
Introduction to systems software – assembler, loader, compilers, interpreters and their
functions. Operating system – definition - goals of OS - different types of Operating
Systems - batch systems - multiprogramming systems - time sharing - multiprocessor
systems - real time systems. Comparison of DOS, Unix, Windows, and Linux operating
systems - Operating System components
SYSTEM SOFTWARE
Assembly language:
Programmers use mnemonics(symbols) for each machine instruction such
mnemonic is called assembly language
COMPILER
The language processor that reads the complete source program written in high level
language as a whole in one go and translates it into an equivalent program in machine
language is called as a Compiler.
Example: C, C++, C#, Java
In a compiler, the source code is translated to object code successfully if it is free of
errors. The compiler specifies the errors at the end of compilation with line numbers
when there are any errors in the source code. The errors must be removed before the
compiler can successfully recompile the source code again.
INTERPRETER
The translation of single statement of source program into machine code is done by
language processor and executes it immediately before moving on to the next line is
called an interpreter. If there is an error in the statement, the interpreter terminates
its translating process at that statement and displays an error message. The
interpreter moves on to the next line for execution only after removal of the error.
3
LOADER
A loader is a system program which take the object code of a program as input and
prepares its for execution.
Functions:
o Allocation:
The loader determines and allocates the required memory space for the
program to execute properly.
o Linking:
The loader analyses and resolve the symbolic references made in the
object modules.
o Relocation
The loader maps and relocates the address references to correspond to
the newly allocated memory space during execution.
o Loading
The loader actually loads the machine code corresponding to the object
modules into the allocated memory space and makes the program ready to
execute.
4
OPERATING SYTEM
An operating system is a program that acts as an interface between the user and the
computer hardware and controls the execution of all kinds of programs like file
management, memory management, process management, handling input and
output, and controlling peripheral devices such as disk drives and printers.
5
Memory Management
Processor Management
Device Management
File Management
Security
Control over system performance
Job accounting
Error detecting aids
Coordination between other software and users
Memory Management
Keeps tracks of primary memory, i.e., what part of it are in use by whom,
what part are not in use.
In multiprogramming, the OS decides which process will get memory when
and how much.
Allocates the memory when a process requests it to do so.
De-allocates the memory when a process no longer needs it or has been
terminated.
Processor Management
Device Management
File Management
A file system is normally organized into directories for easy navigation and usage.
These directories may contain files and other directions.
An Operating System does the following activities for file management −
Keeps track of information, location, uses, status etc. The collective facilities
are often known as file system.
7
Following are some of the important activities that an Operating System performs
This type of operating system does not interact with the computer
directly. There is an operator which takes similar jobs having same
requirement and group them into batches. It is the responsibility of operator
to sort the jobs with similar needs.
Advantages
It is very difficult to guess or know the time required by any job to complete.
Processors of the batch systems know how long the job would be when it is in
queue
Multiple users can share the batch systems
The idle time for batch system is very less
It is easy to manage large work repeatedly in batch systems
Disadvantages
The computer operators should be well known with batch systems
Batch systems are hard to debug
It is sometime costly
The other jobs will have to wait for an unknown time if any job fails
Examples :Payroll System, Bank Statements etc.
9
Each task is given some time to execute, so that all the tasks work
smoothly. Each user gets time of CPU as they use single system. These
systems are also known as Multitasking Systems. The task can be from single
user or from different users also. The time that each task gets to execute is
called quantum. After this time interval is over OS switches over to next task.
Advantages
Each task gets an equal opportunity
Less chances of duplication of software
CPU idle time can be reduced
Disadvantages
Reliability problem
One must have to take care of security and integrity of user programs and data
data communication problem
Examples: Multics, Unix etc.
Multiprogramming systems
To overcome the problem of underutilization of CPU and RAM, the
concept of multiprogramming was introduced.
10
In this concept, two or more user programs can be in main memory and can
be executed concurrently. The CPU can give time to various programs despite
sitting idle when one is busy with I/O operations.
When one program is waiting for I/O transfer there is next program ready to
utilize the processor. Therefore, several processes can share the time of the
CPU.
Execution of jobs at the same instance of time is not referred to as
multiprogramming but it is defined as the number of jobs available to the
processor (placed in main memory) and a portion of another process is
executed then a segment of another and so on.
As shown in fig, at the particular situation, job' A' is not utilizing the CPU
time because it is busy in I/ 0 operations. Hence the CPU becomes busy to
execute the job 'B'. Another job C is waiting for the CPU for getting its
execution time. So in this state the CPU will never be idle and utilizes
maximum of its time.
Advantages:
Drawbacks :
User cannot interact with any program while that is in execution. So, we have
to perform offline debugging.
CPU scheduling and memory management are required.
There are mainly two types of multiprocessors i.e. symmetric and asymmetric
multiprocessors. Details about them are as follows:
12
Symmetric Multiprocessors
In these types of systems, each processor contains a similar copy of the operating
system and they all communicate with each other. All the processors are in a peer to
peer relationship i.e. no master - slave relationship exists between them.
An example of the symmetric multiprocessing system is the Encore version of Unix
for the Multimax Computer.
Asymmetric Multiprocessors
In asymmetric systems, each processor is given a predefined task. There is a master
processor that gives instruction to all the other processors. Asymmetric
multiprocessor system contains a master slave relationship.
Asymmetric multiprocessor was the only type of multiprocessor available before
symmetric multiprocessors were created. Now also, this is the cheaper option.
Advantages
Enhanced performance.
Multiple applications.
Multi-tasking inside an application.
High throughput and responsiveness.
Hardware sharing among CPUs.
HardReal-TimeSystems:
These OSs are meant for the applications where time constraints are very strict
and even the shortest possible delay is not acceptable. These systems are built
for saving life like automatic parachutes or air bags which are required to be
readily available in case of any accident. Virtual memory is almost never found
in these systems.
SoftReal-TimeSystems:
These OSs are for applications where for time-constraint is less strict. A critical
real-time task gets priority over other tasks and retains the priority until it
completes. Soft real-time systems have limited utility than hard real-time
systems. For example, multimedia, virtual reality, Advanced Scientific Projects
like undersea exploration and planetary rovers, etc.
Advantages of RTOS:
Maximum Consumption: Maximum utilization of devices and system,thus
more output from all the resources
Task Shifting: Time assigned for shifting tasks in these systems are very less.
For example in older systems it takes about 10 micro seconds in shifting one
task to another and in latest systems it takes 3 micro seconds.
Focus on Application: Focus on running applications and less importance to
applications which are in queue.
Real time operating system in embedded system: Since size of programs are
small, RTOS can also be used in embedded systems like in transport and others.
Error Free: These types of systems are error free.
Memory Allocation: Memory allocation is best managed in these type of
systems.
14
Disadvantages of RTOS:
Limited Tasks: Very few tasks run at the same time and their concentration is
very less on few applications to avoid errors.
Use heavy system resources: Sometimes the system resources are not so good
and they are expensive as well.
Complex Algorithms: The algorithms are very complex and difficult for the
designer to write on.
Device driver and interrupt signals: It needs specific device drivers and
interrupt signals to response earliest to interrupts.
Thread Priority: It is not good to set thread priority as these systems are very
less prone to switching tasks.
Examples Scientific experiments, medical imaging systems, industrial control
systems, weapon systems, robots, air traffic control systems, etc.
With resource sharing facility, a user at one site may be able to use the
resources available at another.
Speedup the exchange of data with one another via electronic mail.
If one site fails in a distributed system, the remaining sites can potentially
continue operating.
Better service to the customers.
Reduction of the load on the host computer.
Reduction of delays in data processing.
15
WINDOWS
Windows is a licensed operating system in which source code is inaccessible. It is
designed for the individuals with the perspective of having no computer
programming knowledge and for business and other commercial users. It is very
simple and straightforward to use.
Windows 10 (1709) is the latest release of Microsoft Windows operating system. Its
default user interface is Windows shell (Graphical). It uses hybrid kernel in older
versions micro kernel is mostly used.
LINUX
Linux is a free and open source operating system based on Unix standards. It
provides programming interface as well as user interface compatible with Unix
based systems and provides large variety applications. A Linux system also contains
many separately developed elements, resulting in Unix system which is fully
compatible and free from proprietary code.
An abstract layer is used in Linux to govern the different file systems, but to users,
the file system looks like a hierarchical directory tree. It also supports networked,
device-oriented and virtual file systems. Disk storage is accessed through a page
cache which is unified with the virtual memory systems. To minimize the
duplication of shared data among different processes the memory management
system uses page sharing and copy-on-write.
16
Ubuntu 17.10 is the latest release of linux family operating system. The default user
interface of the given version is GNOME, Ubuntu Unity (in older versions).
LINUX WINDOWS
Linux is a open source operating While windows are the not the open
system. source operating system.
Linux is free of cost. While it is costly.
It’s file name case-sensitive. While it’s file name is case-insensitive.
In linux, monolithic kernel is used. While in this, micro kernel is used.
Linux is more efficient in comparison of While windows are less efficient.
windows.
There is forward slash is used for While there is back slash is used for
Separating the directories. Separating the directories.
Linux provides more security than While it provides less security than
windows. linux.
DOS
Any operating system which runs from the hard disk drive is termed as Disk
Operating System ( D.O.S ). This also refers to the specific family of disk operating
system which is also known as MS-DOS or Microsoft disk operating system.
Anything which commands and controls the computer’s hardware and its peripheral
devices with control over the program and its functionality is known as the operating
system. This operating system which runs through the hard disk is known as a disk
operating system.
17
movies,songs etc.
OS.
UNIX
Unix is an Operating System which is truly the base of all Operating Systems like
Ubuntu, Solaris, POSIX, etc. It was developed in the 1970s by Ken Thompson,
Dennis Ritchie, and others in the AT&T Laboratories. It was originally meant for
programmers developing software rather than non-programmers.
Unix and the C were found by AT&T and distributed to government and academic
institutions, which led to both being ported to a wider variety of machine families
than any other operating system. The main focus that was brought by the developers
in this operating system was the Kernel. Unix was considered to be the heart of the
operating System. System Structure of Unix OS are as follows:
Layer-4:ApplicationLayer
It is the outermost layer that executes the given external applications.
LINUX UNIX
The source code of Linux is freely The source code of Unix is not freely
available to its users available general public
It has graphical user interface along It only has command line interface
with command line interface
Different version of Linux are Ubuntu, Different version of Unix are AIS, HP-
Linux Mint, RedHot, Solaries, etc. UX, BSD, Iris, etc.
The file systems supported by Linux are The file systems supported by Unix are
as follows: xfs, ramfs, vfat, cramfsm, as follows: zfs, js, hfx, gps, xfs, vxfs
ext3, ext4, ext2, ext1, ufs, autofs,
devpts, ntfs
Interrupt
Interrupts are primary to operating systems, as they offer a reliable method for the
operating system to interact with and respond to its environment. An interrupt is a
signal from a device connected to a computer system or from a program within the
computer system that needs the operating system to quit and determine exactly what
to do next. When an interrupt is received, the computer’s hardware automatically
puts on hold whatever program is presently running, saves its status, and runs
computer system code formerly associated with the interrupt.
Memory management
This makes sure that a program does not conflict with memory currently being used
by an additional program. Since programs time share, each program has to have
independent access to memory. To puts it simply, the MMU is in charge of all
aspects of memory management. It is normally integrated right into the cpu, although
in some systems it takes up a separate IC (integrated circuit) chip.
We can divide the work of Memory Management into 3 significant groups:
Hardware memory management.
OS (operating system) memory management.
Application memory management.
Multitasking
Multitasking describes the operating of multiple independent computer programs on
the same computer system. The operating system has the ability to keep an eye on
where you are in these jobs and go from one to the various other without losing
information. Since a lot of computers can do at most one or two things at once, this
is usually done using time-sharing, which means that each program utilizes a share
of the computer’s time to perform.
Networking
The processors interact with each other via communication lines called network. The
communication-network design should consider routing and connection techniques,
and the troubles of opinion and safety and security. Presently most operating
21
systems sustain a range of networking methods, hardware, and applications for using
them. This implies that computers running different operating systems could take
part in a common network for sharing resources such as computing, data, printers,
and scanners making use of either wired or wireless connections.
Security
If a computer systems has several individuals and enables the simultaneous
operation of multiple processes, then the numerous processes have to be secured
from each other’s activities. A computer system being safe and secure depends upon
a variety of technologies working effectively. A modern-day operating system offers
access to a number of resources, which are readily available to software working on
the system, and to external devices like networks by means of the kernel. The
operating system should be capable of differentiating between demands which ought
to be allowed to be processed, and others which need to not be processed. In addition
to allow or disallow version of security, a system with a high level of protection
likewise gives auditing options. These would permit monitoring of requests for
accessibility to resources (such as, “who has read this file?”).
User interface
It is everything created into an information device with which an individual might
interact. The user interface is generally described as a shell and is vital if human
communication is to be supported. The user interface checks out the directory
framework and requests services from the operating system that will obtain
information from input hardware devices and demands operating system services to
display prompts, status messages and such on output hardware devices. The
expanding dependancy of lots of companies on web applications and mobile
applications has actually led numerous companies to place enhanced concern on UI
in an effort to improve the individual’s entire experience.