CH - 10 - Computer Software
CH - 10 - Computer Software
Components of a Computer
• Hardware
• Refers to the physical components
• Software
• Refers to the code or program that makes the computer functional
• System Software
• Software that controls the functioning of the system
• Ex. Operating System, device drivers, utility software
• Application Software
• Software that is used to solve real world problems
Software
System Software
Application
[OS, Device Drivers, Software
Utility Software]
System Software
Operating Systems
Operating Systems
• Operating System
• A software that controls the operation of a computer and makes
it functional.
• Set of system programs that control and coordinate the
operation of a computer system.
• Consists of two parts
• BIOS (Basic Input Output System) – Stored in ROM
• The part that provides other services – Stored in hard disk
Major Functionalities
• Starting the operation of a computer
• Storing users’ programs in memory and scheduling them for execution in an orderly
fashion.
• Enabling to run new devices by adding new programs called device drivers
• BIOS is a firmware
• Software, which is permanently stored in a ROM and cannot be modified by a user
Functions of an OS
• An OS is a program which is permanently stored in a part of the main memory
and is protected from accidental or intentional intrusion by users’ programs.
• Command processing
• interpreting users’ commands and executing these commands.
• Utilities
• OS supports utilities that helps to maintain the computer and simplify the jobs of the
processor
System Software
Utility Software
Utility Programs
• Disk Formatting
• The process of making a disk ready for storage.
• Formatting allocates addresses to sectors which can be used to reserve space for files.
• Formatting creates a directory of the locations of each file stored in the disk. This is
called a File Allocation Table (FAT).
• When a file is saved on a disk, the OS stores it in a group of sectors called clusters
which is the smallest storage unit which is addressable by a computer.
• Before saving a file, the OS examines the FAT to find empty clusters.
• After storing, FAT updates the beginning and end addresses of the stored file.
• When a file is searched, OS identifies it using FAT.
• Defragging
• As new files are added to the disk, clusters are progressively occupied.
• If adjacent clusters are available to store the file, storing as well as retrieval is fast.
• If neighboring clusters are occupied, a file will be stored in clusters scattered all over
the disk.
• Defragging tries to rearrange fragments to reduce scattering.
• Disk Scanner
• When a disk is manufactured, there may be defects in some parts, thereby making
some sectors unusable.
• The manufacturer will scan the disk and mark the defective sectors electronically as
bad.
• When a file is stored, the sectors marked defective are left vacant.
• Sectors may become bad with continuous use of a disk.
• A disk scanner utility is run to detect such sectors and if a part of a file is stored in
such a sector, it is retrieved and stored in a good sector.
Types of Operating Systems
Operating Systems
• Machine Independent OS
• An OS that can run on a variety of computers
• Ex. Linux, Microsoft Windows OS
• Proprietary OS
• A proprietary OS is owned by a company which distributes only the binary (or object) code of the OS.
• Licensed code
• Ex. Windows
• Open Source OS
• Written in a high level language such as C
• Distributed free on the Internet.
• No license is needed.
• Portable to many systems.
• Inexpensive
• More reliable and secure
• Not guaranteed or supported by any organization
• Ex. Linux
Summary
Type of Computer OS Type Remarks/Examples
Embedded Computer ROM based, small size, limited functions More like a BIOS
High Level
Assembly Level Machine Level
Languages
Languages Languages
[C++, C, Java]
• Programming Languages
• Objective: making it easy for a large number of persons to use computers
without the need to know in detail the internal structure of a computer.
• Algorithm : Detailed systematic step by step solution to a problem
• Program : Algorithm translated in programming language.
• High level machine independent programming languages.
• Structure of the programming language would not depend on the internal
structure of the computer.
Assembly Language
• Mnemonic codes are used to represent the operations performed by the computer.
• Language is based on the internal structure of the machine => machine dependent language.
• Compiler
• Scans the whole program and translate it into an equivalent machine language
program.
• A compiler is a complex program.
• But the compiled machine code takes lesser time to execute as compared to an
interpreted program
Classification of Programming (HLL) Languages
• Categories
• Procedural Languages
• Non-procedural Languages
• Problem oriented Languages
• Object Oriented Languages
• Platform Independent Languages
• Scripting Languages
Classification of High Level Languages
High Level Languages
• They provide a methodology to break up a large job into a number of tasks and
programming the tasks independently as functions or subroutines.
• A logic program is expressed as a set of atomic sentences (known as facts) and Horn clauses (if then
rules).
• An object is modeled by a collection of data structures and a set of procedures that use these
data structures.
• Objects are invoked by sending messages to them and they return messages when the job is
done.
• Advantages
• enables a programmer to remain close to the conceptual, higher level model of the real-world
problem.
Problem Oriented Languages
• Designed to solve a narrow class of problems.
• They are not type specific i.e variables need not be declared with data types.
• Shell script
select | grep language | wc
• The program select reads the given text that is currently on the display and prints the text on its
output.
• grep - prints as its output the lines containing the word “language”.
Latex, MS
SQL, Java, FORTRAN C, C++, LIST,
Shell, Perl Word,
Python ,C Ada Prolog Coral Draw
• Business Data Processing
• Large files should be processed
• Spread sheet based languages for answering what-if type
questions.
• Query languages to access data from databases and manipulate
them.
• Fourth generation languages (4GL)
• Ex. SQL, Java, Python
• Scientific Applications
• Require numeric intensive computing.
• Ex. FORTRAN, C
• System Programs
• Languages to develop compilers and operating systems.
• Ex. C, C++, Ada
• Scripting Programs
• Combining program components to build large programs.
• Languages have been developed to specify such tasks and sequence them to
execute automatically.
• Ex.
• Commands to backup files at specified times.
• Sending replies automatically to email messages.
• Invoking certain processes automatically when some conditions are satisfied.
• Ex.
• Shell, PERL (Practical Extraction and Report Language)
• Artificial Intelligence (AI) Applications
• characterized by algorithms which search large databases for specific
patterns.
• Ex. Chess playing programs
• LIST, Prolog
• Publishing
• Ex. Latex, Microsoft Word