Fundamentals of Computer Unit III
Fundamentals of Computer Unit III
Fundamentals of Computer
UNIT – III: Computer Software:
Objectives
Introduction
System software
Assemblers
Compilers
Interpreters
Linkers
Elementary Operating System concepts
Different types of operating systems
Application Software
Summary
Keywords
Self Assessment
Further Reading
Objectives
This unit will teach us about the different types of software. We will be able to understand
about different system, application and utility software. We will also learn about the different
aspect of operating system and its functioning.
Introduction
A computer cannot do anything on its own. It must be instructed to do a desired job. Hence, it
is necessary to specify a sequence of instructions, which a computer must perform to solve a
problem. Such a sequence of instructions written in a language, which can be understood by a
computer, is called a computer program. It is the program which controls the activity of
processing by the computer and the computer performs precisely what the program wants it to
do. When a computer is using a program, we say it is running or executing that program.
The term software refers to the set of computer programs, procedures and associated
documents (flowcharts, manuals etc.), which describe the programs, and how they are to be
used. To be precise software, means is a collection or set of programs designed to carry out
special task such as word processing, database management etc.
Hardware
All the physical components are called hardware. Computer is an assembly of various
computer components such as CPU, Keyboard, VDU, Hard-disk etc. They are all computer
hardware. Computer hardware is itself cannot perform any useful task. They need some set of
instructions. These instructions are provided by comp. software. A set of instruction given to a
computer to perform a particular task is called a program.
Types of Software
By the nature of their functioning, software can be divided into mainly two categories, they
are:
1. System Software
2. Application Software
System Software
System software refers to the files and programs that make up your computer's operating
system. System files include libraries of functions, system services, drivers for printers and
other hardware, system preferences, and other configuration files. The programs that are part
of the system software include assemblers, compilers, file management tools, system utilities,
and debuggers.
The system software is installed on your computer when you install your operating system.
You can update the software by running programs such as "Windows Update" for Windows or
"Software Update" for Mac OS X. Unlike application programs, however, system software is
not meant to be run by the end user. For example, while you might use your Web browser
every day, you probably don't have much use for an assembler program (unless, of course, you
are a computer programmer).
Since system software runs at the most basic level of your computer, it is called "low-level"
software. It generates the user interface and allows the operating system to interact with the
hardware. Fortunately, you don't have to worry about what the system software is doing since
it just runs in the background. E.g. Operating System, Translators, Compiler, Interpreter,
Assembler
Translator:
Translator is defined as a computer program that converts instructions written in one language
to another in terms of computer language.
These are of two types:
Interpreter
Compiler
Interpreter:
A program that executes instructions written in a high-level language. There are two ways to
run programs written in a high-level language. The most common is to compile the program;
the other method is to pass the program through an interpreter.
The advantage of an interpreter, however, is that it does not need to go through the
compilation stage during which machine instructions are generated. This process can be time-
consuming if the program is long. The interpreter, on the other hand, can immediately execute
high-level programs. For this reason, interpreters are sometimes used during the development
of a program, when a programmer wants to add small sections at a time and test them quickly.
In addition, interpreters are often used in education because they allow students to program
interactively.
Both interpreters and compilers are available for most high-level languages. However, BASIC
and LISP are especially designed to be executed by an interpreter. In addition, page
description languages, such as PostScript, use an interpreter. Every PostScript printer, for
example, has a built-in interpreter that executes PostScript instructions.
High level language Input
Interpreter (translates Output
program and executes statement- Result of
by- statement
program execution
Compiler
A compiler is a computer program (or set of programs) that transforms source code written in
a programming language (the source language) into another computer language (the target
language, often having a binary form known as object code). The most common reason for
wanting to transform source code is to create an executable program.
The name "compiler" is primarily used for programs that translate source code from a high-
level programming language to a lower level language (e.g., assembly language or machine
code). If the compiled program can run on a computer whose CPU or operating system is
different from the one on which the compiler runs, the compiler is known as a cross-compiler.
A program that translates from a low level language to a higher level one is a decompile. A
program that translates between high-level languages is usually called a language translator,
source to source translator, or language converter. A language rewriter is usually a program
that translates the form of expressions without a change of language.
A compiler is likely to perform many or all of the following operations: lexical analysis,
preprocessing, parsing, semantic analysis (Syntax-directed translation), code generation, and
code optimization.
Program faults caused by incorrect compiler behavior can be very difficult to track down and
work around; therefore, compiler implementors invest a lot of time ensuring the correctness of
their software.
One-to-many correspondence
(Source Program) (ObjectProgram)
(Translation process of a Compiler)
Assembler
An assembler creates object code by translating assembly instruction mnemonics into
opcodes, and by resolving symbolic names for memory locations and other entities. The use of
symbolic references is a key feature of assemblers, saving tedious calculations and manual
address updates after program modifications. Most assemblers also include macro facilities for
performing textual substitution—e.g., to generate common short sequences of instructions as
inline, instead of called subroutines.
Assemblers are generally simpler to write than compilers for high-level languages, and have
been available since the 1950s. Modern assemblers, especially for RISC architectures, such as
SPARC or POWER, as well as x86 and x86-64, optimize Instruction scheduling to exploit the
CPU pipeline efficiently.
One-to-one correspondence
(Source Program) (Object Program)
(Translation process of an assembler)
Linker
After the compiler creates one or more object files, then another program called
the linker kicks in. The job of the linker is three fold:
First, to take all the object files generated by the compiler and combine them into a single
executable program.
Second, in addition to being able to link object files, the linker also is capable of linking
library files. A library file is a collection of precompiled code that has been “packaged up”
for reuse in other programs.
Operating system
Computer
Hardware
Serial Processing
The early computer systems were run form console, which had a number of switches and
lights on its front panel. These switches were connected to hardware components of the
computer. The user’s programs were written in machine language and punched on the cards.
The user himself had to lad his program in computer memory by operating the computer
through the console or through hexadecimal boards. The program was loaded manually, from
the front switches, one instruction at a time. To start the execution of the program the user
had to push the switches on the front panel. The program’s execution was monitored by
display of lights on the front panel.
Batch System
Monitor Area
User
Current job Area
Of the
batch
Job1:
Job2:
Job n
‘End of batch’ card
To overcome the problems of batch processing, automatic job sequencing was introduced.
One such system was a Resident Batch Monitor that was the first operating system.
Resident monitor
A Monitor is an operating system whose main job is to transfer the control automatically from
one program to another as soon as the execution of a program is completed. The monitor is a
set of simple programs and always resides in the computer memory and for this reason it is
known as a resident monitor.
A monitor had its own problem about knowing which routine to execute and at what time
when and application program is being executed. This problem was solved by development of
another language called Job Control Language.
Line Printer
Card
Reader
CPU
The operating system selects one of the programs and start executing. During the execution
program 1 may need some I/O. If the environment is of sequential execution, the C.P.U.
would sit idle.
PROGRAM 1 PROGRAM 2
Idle IdleIdleIdle
P1 P1P1 P2 P2
(Sequential programming)
Whereas in case of multiprogramming, operating system will switch over to the next program
(PROGRAM 2).
P1 P1 P1
P2 P2
Extended Machine
Operating System
Software
Bare
Machine
Thus operating system can be regarded as a virtual machine standing between our programs
and the bare hardware, thus providing a more convenient extended machine. Thus operating
system seems to be as an extension of the bare machine and hence is an extended machine.
OPERATING SYSTEM AS A RESOURCE MANAGE/ALLOCATOR
An operating system is an essential component of a computer system. The operating system
as a control program controls and co-ordinates the use of hardware among various application
programs of various users.
It allocates the resources on the basis of the user’s need and system capabilities. As a
Resource Manager/Resource allocator, the four major functions of the operating system are
following:-
a) Memory Management.
b) Processor Management.
c) Input/output and Peripheral Management.
d) File and software Management.
As a Resource Manager, the operating system must perform the following functions for each
resource:-
1) Keep track of the resource.
2) Enforce policy that determines who gets what, when and how much.
3) Allocate the resource to the job decided.
4) Reclaim or deallocate the resource.
Major Functions of Operating System as a Resource manager:-
a) Memory Management Function
i. Keep track of main memory; what parts are in use and by whom? What parts are not in
use i.e. free etc?
ii. In multiprogramming, decide which process gets memory, when it gets it, and how
much.
iii. Allocate the memory when the process requests it and the policy in (ii) above allows it
iv. Deallocate the memory space, when the process no longer needs it or has been
terminated.
b) Processor (CPU) Management Function
i. Keep track of processor and the status of processes.
ii. Decide who will have a chance to use the processor; the job scheduler chooses from
all the jobs submitted to the system. In multiprogramming, decided which process
gets the processor, when, and how much.
iii. Allocate the CPU to a process.
iv. Reclaim/Deallocate the processor when process terminates or exceeds allowed
amount of usage.
c) Device Management Function
i. Keep track of all devices/peripherals.
ii. Decide which process gets the device, when and for how much time.
iii. Allocate the device and initiate the I/O operation.
iv. Deallocate the device. In most cases, the I/O terminates automatically.
d) File Management Functions
i. Keep track of the file/information; its location, use, status etc.
ii. Decide who can use the resource; enforce protection requirements, and provide
accessing routines.
iii. Allocate the resource (information/file) e.g. open a file.
iv. Deallocate the resource e.g. close a file.
OPERATING SYSTEMS CLASSIFICATION ORTYPES OF OPERATING SYSTEM
The operating systems are classified as:-
1. Single program operating system.
2. Batch operating system.
3. Multiprogramming operating system.
4. Multiuser or Multi-access operating system.
5. Multiprocessing operating system.
6. Real time operating system.
7. Network operating system.
8. Distributed operating system.
Single program operating system
Single program operating system refers to single program pertaining to single user. e.g. MS-
DOS. Only one program resides in the computer memory and it remains there till it is
executed. It is also called uniprogrammed operating system.
It is the simplest operating system because:-
a. The whole memory space is allocated to one program so memory management is not
very difficult.
b. The C.P.U. has to execute only one program at a time so the C.P.U. management also
does not have any problem.
Limitations
In single program operating system, the C.P.U. remains idle most of the time because as
compared to C.P.U. speed, the speed of I/O devices is quite slow.
This results in low C.P.U. efficiency.
This efficiency could be increased if C.P.U. and I/O devices function simultaneously.
This results in development of Batch operating system.
Batch operating system OR Concurrent operating system
Jobs with similar requirements were batched together and run through the computer as a
group. The operating system handling a batch of programs is known as Batch or Concurrent
operating system. This operating system relieves the user from the difficult task of loading
the next program after the execution of the previous program is completed.
It must be remembered that a batch program operating system is a single program system
because at a time only one program is being executed by the C.P.U. In this operating system:-
a. Memory is usually divided into two parts. One part is fixed for containing operating
system and the other part contains user programs to be executed. When one program is
executed, another program is loaded into the same memory area.
b. The C.P.U. has to execute only one program at a time so the C.P.U. management also
does not have problem.
Batch operating systems are appropriate for executing large jobs that need little interaction.
Programs such as:-
Forecasting
Payroll Statistical analysis.
Disadvantages
i. Non-interactive environment: - Batch operating system allows no interaction between
users and executing programs.
i. High Turnaround time: - The turnaround time taken between job submission and job
completion is very high.
ii. Off-line debugging: - This means that a programmer cannot correct bugs the moment
it occurs.
Multiprogramming operating system
Multiprogramming refers to a form of processing in which computer holds more than one
program in the memory and executes them concurrently. In this, processor time is shared in
such a manner that each program receives some attention for sometime, it seems as though all
the programs are being run at the same time.
Multiprogramming operating systems as compared to Batch operating systems are fairly
better. Such operating systems are fairly sophisticated. Multiprogramming increases CPU
utilization by organizing a number of jobs such that CPU always has one to execute. Different
forms of multiprogramming operating system are:-
a. Multitasking or multiprocessor operating system
b. Time sharing operating system.
Multitasking operating system:-
A running state of a program is called a process or a task. A multitasking operating system
supports more than one active process simultaneously with a single CPU. It is also called
serial multitasking or context switching which implies stopping one temporarily to work on
another.
In these operating systems, CPU switches from one task to another so quickly that it gives the
illusion to the user of executing all the tasks at the same time. E.g. Windows 95/98, Windows
NT etc.
Time-sharing operating system:-
Time-sharing is a special case of multiprogramming operating system with a quick response
time. It allows many users to simultaneously share the computer resources.
It provides each user with a small portion of a time-shared computer.
CPU
Terminal 1
…………………. Terminal 2 Terminal n
In a time-shared system since each action or command take a very small fraction of time, only
a little CPU time is needed for each user. As the CPU switches rapidly from one user to
another user, each user is given impression that he has his own computer, whereas actually
one computer is being shared among many users.
Most time sharing systems use time-slice (round robin) scheduling of CPU. Time sharing
provides the advantages of quick response time. This leads to optimum utilization of
resources. Since in time sharing systems, multiple programs co-exist in memory, hence
memory management in such system provides for the protection and separation of user
program.
Multiuser or multi-access operating system
Multiuser operating system allows simultaneous access to a computer system through two or
more terminals. E.g. Railway Reservation System & Airline Reservation System supports
hundreds of active terminals under control of a single program.
Although it is associated with multiprogramming, multiuser operating system does not imply
multiprogramming or multitasking.
Multiprocessing operating system
OR
Parallel system
In multiprocessing operating system, multiple CPUs perform more than one job at one time.
Its objective is to achieve increased speed or computing power. It differs from the time-
sharing operating system in the manner that it refers to utilization of multiple CPUs.
In it the resources are allocated comfortably to the competing processes in a manner which
results in a high throughput. Examples:- UNIX, MVS etc. Some mainframe and super, mini
computers have multiple CPUs, each of which can handle several jobs.
Real time operating system
A real time operating system is one in which the input data has to be processed and the result
produced within a given time period. Real time system is a special purpose operating system.
It is used in those environments where a large number of events external to computer systems,
are accepted and processed in a short time or within specified time.
E.g.A computerized robot picking up something from a conveyor belt with the object moving.
In cases, the robot is early or late, the object won’t be there and thus resulting in and
unsuccessful attempt though the robot moved to the right place.
Thus, real time operating system are very useful in places where a close watch is to be kept on
the surroundings of the system and some corrective action is to be taken in case one specific
thing happens.
Its main characteristics are:
Fast Response time
Feedback mechanism
Reliability
Predictability
Such applications include:
Scientific experiments.
Flight control
Few Military applications.
Industrial Control.
Intensive Care Monitoring
Network operating system
A network operating system is a collection of software and associated protocols that allow a
set of computers which are interconnected by a computer network to be used together. In a
network operating system the users are aware of existence of multiple computers.
Capabilities of network operating system:-
a. Allowing users to access the various resources of the network nodes such as files,
application programs and printers etc.
b. Allowing the users to copy files from one machine to another machine.
c. Controlling access to ensure that only users in the proper authorization access particular
resources.
d. Making the use of remote resources appears to be identical to the use of local resources.
e. Providing up to the minute information on-line.
Examples of Network Operating System are:
BSD (Berkeley System Distribution), Novell, UNIX, Windows NT etc.
Distributed operating system
A distributed operating system looks like an ordinary centralized operating system that runs
on multiple independent CPUs. It is collection of processors that do not share memory. Each
processor has its own local memory.
A distributed system implies a number of CPUs/ computing systems put together by a high
speed network. The use of multiple processors is invisible to the user i.e. the users are not
aware of where their programs are being run or where there files are residing. These are
handled automatically and efficiently by the operating system. This operating system allows
programs to run on several processors at the same time, thus requiring more complex
processor scheduling algorithms in order to achieve maximum utilization of CPU’s time.
A few examples of distributed system are:
Alpha Kernel, Angle, Chorus and Mach.
The distributed operating system allows the user to access remote resources in the same
manner as local resources as they do.
Advantage of Distributed Operating System:-
Advantages of distributed operating system are:
a. Reduction of load on single host computer.
b. Resource sharing.
c. Powerful and cheap microprocessor technology.
d. Incremental Growth.
e. Reliability availability and fault tolerance.
f. Communication and information sharing
g. Reduction of delays in data processing
h. Better services to users.
SOME POPULAR OPERATING SYSTEMS
UNIX
UNIX is a multi-user, time sharing operating system. Although it can be used on a wide
variety of computers, ranging from notebook computers to super computers, it is especially
prevalent on RISC workstations, such as those from Sun Microsystems, Hewlett-Packard,
IBM, and Silicon Graphics.
UNIX was developed in the early 1970s at Bell Laboratories by Ken Thompson and Dennis
Ritchie for a small PDP-11 computer. It was the first operating system to be written in a high-
level language, C. The normal practice until then was to use assembly language for writing
operating systems due to which operating systems were system dependent. That is, they were
usable only on the system for which they were developed. However, since UNIX was written
in C language, moving it to a new machine, known as porting it, was much easier. This was
an important reason for its large popularity and availability on a wide variety of systems.
MS-DOS
MS-DOS stands for Microsoft Disk Operating System. It is a single-user operating system for
IBM and IBM-compatible personal computers. It was introduced in 1981 jointly by Microsoft
and IBM and was the most popular operating system for personal computers in the 1980s. Its
popularity started reducing in the 1990s with the launch of Microsoft Windows operating
system.
Microsoft Windows
Microsoft Windows operating system was developed by Microsoft to overcome the limitations
of its own MS-DOS operating system. The first successful version of this operating system
was Windows 3.0, which was released in 1990. The subsequently released versions were
Windows 95, Windows 98, and Windows 2000. The numbers associated with these released
versions indicate their year of release. The main features of Microsoft Windows are as
follows:
1) Its native interface is a GUI. Hence, it is easier for a new user to learn and use the system.
2) Microsoft Windows was designed to be not just an operating system, but also a complete
operating environment. That is, all its programs conform to a standard way of working.
For example, a Microsoft Windows word processor words similarly the way a Microsoft
Windows spreadsheet works. This means that the experience gained by learning one
Windows program is useful while using any other Microsoft Windows program.
3) It is a single-user, multitasking operating system. That is, a user may run more than one
program at a time. For example, while editing a file in the foreground, a sorting job can be
given in the background. The monitor’s screen can be partitioned into multiple windows
and the progress of different programs can be viewed on different windows.
With these features, Microsoft Windows became an operating system of choice for most
personal computer users after 1990.
Microsoft Windows NT
Microsoft Windows NT is a multi-user, timesharing operating system developed by Microsoft.
It was designed to have Unix-like features so that it can be used for powerful workstations,
networks and database servers. Its main features are as follows:
1. Unlike Unix, its native interface is a GUI. The look and feel of Microsoft Windows
NT’s GUI is similar to that of Microsoft Windows’ GUI.
2. It supports multiprogramming and is also designed to take advantage of multiprocessing
on systems having multiple processors.
3. It has built –in networking and communications features, so that any computer with
Microsoft Windows NT can be made to work as a network client or server.
4. It provides strict system security.
5. It has a rich set of tools for software development and system administration.
6. It can run Microsoft Windows applications and many Unix applications directly.
Linux
Linux is an open-source operating system enhanced and backed by thousands of programmers
worldwide. It is a multi-tasking operating system, which was originally designed to be used
on personal computers. The name “Linux” is derived from its inventor Linux Torvalds.
Linux was a student at the University Of Helsinki, Finland in early 1990s when he wrote the
first version of a Unix-like kernel as a toy project. He later posted the code on the Internet
and asked programmers across the world to help him build it into a working system. The
result was Linux. Torvalds holds the copyright, but permits free distribution of the source
code. That is, he oversees development of the kernel and owns its trademark. When someone
submits a change or features, Torvalds and his core team of kernel developers review the
merit of adding it to the source code.
Summary
After going through this unit we have learnt about the concept of software. We have also
understood the different types of software. We have understood about operating system and its
functions. This unit has taught us about the different types of operating systems.
Keywords
1. System software
2. Compiler
3. Assembler
4. Operating System
5. Batch processing
6. Multiprogramming
7. Serial processing
Self Assessment
1. Software Package is a group of programs that solve multiple problems.
a) True
b) False
2. Which of the following is designed to control the operations of a computer?
a) Application Software
b) System Software
c) Utility Software
d) User
3. Which of the following is not an example of system software?
a) Language Translator
b) Utility Software
c) Communication Software
d) Word Processors
4. ___________________ is designed to solve a specific problem or to do a specific task.
a) Application Software
b) System Software
c) Utility Software
d) User
5. What is operating system?
a) collection of programs that manages hardware resources
b) system service provider to the application programs
c) link to interface the hardware and application programs
d) all of the mentioned
6. Which one of the following is not a real time operating system?
a) VxWorks
b) Windows CE
c) RTLinux
d) Palm OS
7. The OS X has ____________
a) monolithic kernel
b) hybrid kernel
c) microkernel
d) monolithic kernel with modules
8. In operating system, each process has its own
a) address space and global variables
b) open files
c) pending alarms, signals and signal handlers
d) all of the mentioned
9. In Unix, Which system call creates the new process?
a) Fork
b) create
c) new
d) none of the mentioned
10. Which of the following is not an operating system?
a) Linux
b) Windows
c) DOS
d) Google Crome
****