Computer Software
Computer Software
• The computer, as a machine, can do nothing for you without the software.
Software is required for the functioning of computer. Software programs instruct
computer about the actions to be performed, so as to get the desired output.
6.1 INTRODUCTION
• A computer system consists of hardware and software.
• The computer hardware cannot perform any task on its own. It needs to be
instructed about the tasks to be performed. Software is a set of programs that
instructs the computer about the tasks to be performed.
• Software tells the computer how the tasks are to be performed; hardware
carries out these tasks.
• Different sets of software can be loaded on the same hardware to perform
different kinds of tasks. For example, a user can use the same computer
hardware for writing a report or for running a payroll program. The components
like monitor, keyboard, processor, and mouse, constitute the hardware.
6.2 TYPES OF SOFTWARE
Software can be broadly classified in two categories:
1. System Software, and
2. Application Software.
• System software provides the basic functions that are performed by the
computer. It is necessary for the functioning of a computer.
• Application software is used by the users to perform specific tasks. The user
may choose the appropriate application software, for performing a specific task,
which provides the desired functionality.
• The system software interacts with hardware at one end and with application
software at the other end. The application software interacts with the system
software and the users of the computer.
6.3 SYSTEM SOFTWARE
• System software provides basic functionality to the computer. System software
is required for the working of computer itself. The user of computer does not
need to be aware about the functioning of system software, while using the
computer.
• For example, when you buy a computer, the system software would also include
different device drivers. When you request for using any of the devices, the
corresponding device driver software interacts with the hardware device to
perform the specified request.
• If the appropriate device driver for any device, say a particular model of a
printer, is installed on the computer, the user does not need to know about the
device driver, while printing on this printer.
The purposes of the system software are:
• To provide basic functionality to computer,
• To control computer hardware, and
• To act as an interface between user, application software and computer
hardware.
• On the basis of their functionality, system software may be broadly divided into
two categories
• Assembly language programs are easier to write than the machine language
programs, since assembly language programs use short, English-like
representation of machine code.
ADD 2, 3
LOAD A
SUB A, B
• The program written in assembly language is the source code, which has to be
converted into machine code, also called object code, using translator software,
namely, assembler.
• Each line of the assembly language program is converted into one or more lines of
machine code. Hence assembly language programs are also machine-dependent.
• Although assembly language programs use symbolic representation, they are still
difficult to write.
• Assembly language programs are generally written where the efficiency and the
speed of program are the critical issues, i.e. programs requiring high speed and
efficiency.
High-level Language
A program in a high-level language is written in English-like language. Such languages
hide the details of CPU operations and are easily portable across computers. A high-
level language isolates the execution semantics of computer architecture from the
specification of the program, making the process of developing a program simpler
and more understandable with respect to assembly and machine level languages.
Some of the features of a program written in high-level language are as follows:
• Programs are easier to write, read or understand in high-level languages than in
machine language or assembly language.
• Programs written in high-level languages is the source code which is converted
into the object code (machine code) using translator software like interpreter or
compiler.
• A line of code in high-level program may correspond to more than one line of
machine code.
• Programs written in high-level languages are easily portable from one computer
to another.
Different Generations of Programming Languages
In addition to the categorization of programming languages into machine
language, assembly language, and high-level language, programming languages are
also classified in terms of generations in which they have evolved.
Translator Software
Translator software is used to convert a program written in high-level language and
assembly language to a form that the computer can understand. Translator
software converts a program written in assembly language, and high-level
language to a machine-level language program. The translated program is called
the object code. There are three different kind of translator software:
• Assembler,
• Compiler, and
• Interpreter
Assembler converts a program written in assembly language to machine language.
Compiler and interpreter convert a program written in high-level language to
machine language. Let’s now discuss, briefly, the different kinds of translator
software.
Assembler
Assembly language is also referred to as a symbolic representation of the machine
code. Assembler is a software that converts a program written in assembly
language into machine code . There is usually a one-to-one correspondence
between simple assembly statements and machine language instructions. The
machine language is dependent on the processor architecture, though computers
are generally able to carry out the same functionality in different ways. Thus the
corresponding assembly language programs also differ for different computer
architectures
Assembly to Machine
Compiler
• A program written in a high-level language has to be converted to a language that
the computer can understand, i.e. binary form. Compiler is the software that
translates the program written in a high-level language to machine language.
• The program written in high-level language is referred to as the source code and
compiled program is referred as the object code. The object code is the
executable code, which can run as a stand-alone code. It does not require the
compiler to be present during execution. Each programming language has its own
compiler
Interpreter
The purpose of interpreter is similar to that of a compiler. The interpreter is used to
convert the high-level language program into computer-understandable form.
However, the interpreter functions in a different way than a compiler. Interpreter
performs line-by-line execution of the source code during program execution.
Interpreter reads the source code line-by-line, converts it into machine
understandable form, executes the line, and then proceeds to the next line. Some
languages that use an interpreter are BASIC and Python.
Linker
Linker is a program that links several object modules and libraries to a single
executable program. A source code of a program is often very large consisting of
several hundred or more lines. The source code may also include reference to
libraries. All these independent modules may not be stored in a single object file.
The code is broken down into many independent modules for easy debugging and
maintenance. Before execution of the program, these modules and the required
libraries are linked together using the linker software. The compiled and the linked
program are called the executable code.
Loader
The loader software is used to load and re-locate the executable program in the
main memory. Software has to be loaded into the main memory during execution.
Loader assigns storage space to the program in the main memory for execution.
Figure shows the working of a Java Runtime Environment (JRE). The java source file
Sample.java is compiled and converted into a set of bytecodes and are stored in
Sample.class file. At runtime, the class loader loads the bytecodes from the hard
disk, checks it, and runs it in an interpreter. The interpreter executes the bytecode
and makes calls to the underlying hardware.
APPLICATION SOFTWARE
The software that a user uses for accomplishing a specific task is the application
software. Application software may be a single program or a set of programs. A set of
programs that are written for a specific purpose and provide the required
functionality is called software package. Application software is written for different
kinds of applications—graphics, word processors, media players, database
applications, telecommunication, accounting purposes etc.
SOFTWARE ACQUISITION
Different kinds of software are made available for use to users in different ways. The
user may have to purchase the software, can download for free from the Internet, or
can get it bundled along with the hardware. Nowadays with the advent of Cloud
computing, many application software are also available on the cloud for use through
the Internet, e.g. Google Docs. The different ways in which the software are made
available to users are:
• Retail Software is off-the-shelf software sold in retail stores. It comes with
printed manuals and installation instructions. For example, Microsoft Windows
operating system.
• OEM Software stands for “Original Equipment Manufacturer” software. It
refers to software which is sold, and bundled with hardware. Microsoft sells its
operating system as OEM software to hardware dealers. OEM software is sold at
reduced price, without the manuals, packaging and installation instructions. For
example, Dell computers are sold with the “Windows 7” OS pre-loaded on them.
• Demo Software is designed to demonstrate what a purchased version of the
software is capable of doing and provides a restricted set of features. To use the
software, the user must buy a fully- functional version.
• Shareware is a program that the user is allowed to try for free, for a specified
period of time, as defined in the license. It is downloadable from the Internet.
When the trial period ends, the software must be purchased or uninstalled.
• Freeware is software that is free for personal use. It is downloadable from the
Internet. The commercial use of this software may require a paid license. The
author of the freeware software is the owner of the software, though others
may use it for free. The users abide by the license terms, where the user cannot
make changes to it, or sell it to someone else.
• Public Domain Software is free software. Unlike freeware, public domain
software does not have a copyright owner or license restrictions. The source
code is publicly available for anyone to use. Public domain software can be
modified by the user.
• Open-Source Software is software whose source code is available and can be
customized and altered within the specified guidelines laid down by the creator.
Unlike public domain software, open-source software has restrictions on their
use and modification, redistribution limitations, and copyrights. Linux, Apache,
Firefox, OpenOffice are some examples of open-source software.
Operating System
• Operating system is system software that controls and coordinates the use of
hardware among the different application software and users. OS intermediates
between the user of computer and the computer hardware. The user gives a
command and the OS translates the command into a form that the machine can
understand and execute.
• OS has two main objectives—(1) to make the computer system convenient and
easy to use, for the user, and—(2) to use the computer hardware in an efficient
way, by handling the details of the operations of the hardware.
• OS hides the working of the hardware from the user and makes it convenient for
the user to use the machine. The application program used by the user requires
the use of the hardware during processing.
• Some examples are—display of application’s user interface, loading a program
into memory, using I/O devices, allocating CPU to different processes during
execution, and store or load data from hard disk.
• When using the machine, the user gives the command to perform the required
actions to the OS and the OS handles all the operational steps. The user is not
bothered about how these actions will be performed. This is the job of OS. OS
provides an interface to the application programs to interact with the hardware.
The user need not get into the details of this interaction.
• At the other end, the different resources of computer hardware have to be managed
and controlled. This includes managing the communication between different
devices, controlling the sequence and execution of processes, allocating space on
hard disk, providing error handling procedures etc. OS supervises and manages the
hardware of the computer.
TYPES OF OS
OS are classified into different types depending on their capability of processing—(1)
Single user, (2) Multiuser, (3) Multitasking, (4) Multiprocessing, (5) Real time, and (6)
Embedded.
Single User and Single Task OS is for use by a single user for a standalone single
computer for performing a single task . Operating system for Personal Computers (PC)
are single user OS. For example, if the user is editing a document, then a document
cannot be printed on the printer simultaneously. Single user OS are simple operating
system designed to manage one task at a time. MS-DOS is an example of single user OS.
Single User and Multitasking OS allows execution of more than one task or process
concurrently. For this, the processor time is divided amongst different tasks. This
division of time is also called time sharing. The processor switches rapidly between
processes. For example, the user can listen to music on the computer while writing an
article using a word processor software. The user can switch between the applications
and also transfer data between them. Windows 95 and all later versions of Windows are
examples of multitasking OS.
• Multiuser OS is used in computer networks that allow same data and
applications to be accessed by multiple users at the same time. The users can
also communicate with each other. Linux, UNIX, and Windows 7 are examples of
multiuser OS.
• Multiprocessing OS have two or more processors for a single running process.
Processing takes place in parallel and is also called parallel processing. Each
processor works on different parts of the same task, or, on two or more different
tasks. Since execution takes place in parallel, they are used for high speed
execution, and to increase the power of computer. Linux, UNIX and Windows 7
are examples of multiprocessing OS.
• Real Time OS are designed to respond to an event within a predetermined time.
These operating systems are used to control processes. Processing is done
within a time constraint. OS monitors the events that affect the execution of
process and respond accordingly. They are used to respond to queries in areas
like medical imaging system, industrial control systems etc. LynxOS is an example
of real time OS.
• Embedded OS is embedded in a device in the ROM. They are specific to a device
and are less resource intensive. They are used in appliances like microwaves,
washing machines, traffic control systems etc.
FUNCTIONS OF OS
Operating system is a large and complex software consisting of several components.
Each component of the operating system has its own set of defined inputs and
outputs. Different components of OS perform specific tasks to provide the overall
functionality of the operating system . Main functions of the operating system are as
follows:
Process Management—The process management activities handled by the OS are—
(1) control access to shared resources like file, memory, I/O and CPU, (2) control
execution of applications, (3) create, execute and delete a process (system process
or user process), (4) cancel or resume a process (5) schedule a process, and (6)
synchronization, communication and deadlock handling for processes.
Memory Management—The activities of memory management handled by OS are
—(1) allocate memory, (2) free memory, (3) re-allocate memory to a program when
a used block is freed, and (4) keep track of memory usage.
File Management—The file management tasks include—(1) create and delete both
files and directories, (2) provide access to files, (3) allocate space for files, (4) keep
back-up of files, and (5) secure files.
• Device Management—The device management tasks handled by OS are—(1)
open, close and write device drivers, and (2) communicate, control and monitor
the device driver.
• Protection and Security—OS protects the resources of system. User
authentication, file attributes like read, write, encryption, and back-up of data are
used by OS to provide basic protection.
• User Interface or Command Interpreter—Operating system provides an interface
between the computer user and the computer hardware. The user interface is a
set of commands or a graphical user interface via which the user interacts with
the applications and the hardware.
PROCESS MANAGEMENT
• A process is a program in a state of execution. It is a unit of work for the operating
system. A process can be created, executed, and stopped. In contrast, a program
is always static and does not have any state. A program may have two or more
processes running. A process and a program are, thus, two different entities.
• To accomplish a task, a process needs to have access to different system resources
like I/O devices, CPU, memory etc. The process management function of an
operating system handles allocation of resources to the processes in an efficient
manner. The allocation of resources required by a process is made during process
creation and process execution.
• A process changes its state as it is executed. The various states that a process
changes during execution are as follows