Unit 2
Unit 2
Unit 2
Lecture No. 11
Introduction
A computer system consists of hardware, the electronic devices that enable of computing
and manipulating information and software (set of instructions) that carry out predefined
task to complete a given job. It is the combination of physical equipment (hardware) and
logical instructions (software that gives the modern computing systems their power and
versatility.
Software refers to computer programs that are loaded into a computer system and hardware
refers to all the visible devices which are assembled together to build a computer system.
To get a particular job done by a computer, firstly the relevant software is loaded in the
hardware. Different software can be used on the same hardware to perform different jobs,
just as different games can be played on the computer screen (Console) by using different
cassettes.
Types of software
A wide variety of computer software is available today. Although the range of software
available is vast and varied, most software can be divided into two major categories:
1. System software,
2. Application software
System Software
System software is a set of one or more programs designed to control the operation and
extend the processing capability of a computer system. It acts as an intermediary between
the computer hardware and application program, it also provides interface between user and
computer In general, a computer's system software performs one or more of the following
functions:
1. Supports the development of other application software.
2. Supports the execution of other application software.
3. Monitors the effective use of various hardware resources such as CPU, memory,
peripherals, etc.
4. Communicates with and controls the operation of peripheral devices such as printer,
disk, tape, etc.
5. It helps the hardware components work together and provides support for the
development and execution of application software (programs).
6. The programs included in a system software package are called system programs
and the programmers who prepare system software are referred to as system
programmers.
Advantages
1. Good system software allows application packages to be run on the computer with
less time and effort.
2. Without system software, application packages could not be run on the computer
system. A system software is an indispensable part of a total computer system.
3. A computer without some kind of system software would be very ineffective and
most likely impossible to operate.
Examples
Operating Systems
Every computer has an operating system software that takes care of the effective and
efficient utilization of all the hardware and software components of the computer system.
These are a set of programs that help users in system maintenance tasks and in performing
tasks of routine nature. Some of the tasks commonly performed by utility programs include
the following:
1. Formatting hard disks or floppy disks.
2. Reorganizing files on a hard disk to conserve storage space.
3. Taking backup of files stored on hard disk on to a tape or floppy disk.
4. Searching a particular file from a directory of hundreds of files.
5. Checking the amount of available memory.
6. Checking the amount of available storage space on hard disk.
7. Reducing the file size for more efficient transmission over a data communication
link.
Device Drivers:
Device drivers are system programs which are responsible for proper functioning of
devices. Every device or hardware whether it is a printer, monitor, mouse has a
driver program for support. A driver acts as translator between the device and
programs that use the device.
Communication Software
Application Software
In all over the world, language is the source of communication among human beings.
Different countries/regions have different languages. Similarly, in order to communicate
with the computer user also needs to have a language that should be understood by the
computer. For this purpose, different languages are developed for performing different
types of work on the computer, such languages are known as Programming Languages.
Basically, languages are divided into two categories according to their interpretation.
1. Low Level Languages.
2. High Level Languages.
3. Easier to modify: Because they are easier to understand, it is easier to locate, correct,
and modify instructions of an assembly language program than a machine language
program.
in case of machine language.
4. No worry about addresses: One of the greatest advantage of assembly language is that
programmers need not keep track of the storage locations of the data and instructions while
writing an assembly language program.
Limitations of Assembly Language
The following limitations of machine language are not solved by using assembly language:
1. Machine dependent: Because each instruction of an assembly language program is
translated into exactly one machine language instruction, assembly language programs are
machine dependent.
2. Knowledge of hardware required: Since assembly languages are machine dependent,
an assembly language programmer must have a good knowledge of the characteristics and
the logical structure of his/her computer in order to write good assembly language
programs.
3. Machine level coding: In case of an assembly language, instructions are still written at
the machine-code level. That is, one assembly language instruction is nsubstituted for one
machine language instruction.
Lecture No. 12
4GLs are designed to reduce the overall time, effort and cost of software development. The
main domains and families of 4GLs are: database queries, report generators, data
manipulation, analysis and reporting, screen painters and generators, GUI creators,
mathematical optimization, web developmentand general purpose languages.
Language Translators
Compiler
During the process of translation of a source program into its equivalent object program by
High Level Laguage
the compiler , the source program is not being executed. It is only being converted into a
form
that can be executed by the computer's processor. A compiler can translate only those
source programs, which have been written in the language for which the compiler is meant.
For (SouHigh Level
example, a C compiler is only capable of translating source programs, which have been
written in C. Therefore, each computer requires a separate compiler for each high-level
Language
language that it supports.
(Source Code)
How Does Complier Works?
Characteristics of Compiler
1. There is no need to repeat the compilation process every time you wish to execute
the program: This is because the object program stored on secondary storage is already in
Prepared by: Ms. Kanika Dhingra Sardana Page 8
IINTM/BCA 105/FUNDAMENTALS OF COMPUTERS & IT/UNIT 2
machine language. You simply have to load the object program from the secondary storage
into the main memory of the computer, and execute it directly.
2. Compilation is necessary whenever we need to modify the program: That is, to
incorporate
changes in the program, you must load the original source program from secondary storage
into the main memory of the computer, carry out necessary changes in the source program,
recompile the modified source program, and create store an updated object program for
execution.
3. Compilers also automatically detect and indicate certain types of errors in source
programs. These errors are referred to as syntax errors and are
typically of the following types:
1. Illegal characters
2. Illegal combination of characters
3. Improper sequencing of instructions in a program
4. Use of undefined variable names
Limitations
1. A compiler, however, cannot detect logic errors. It can only detect grammatical
(syntax errors) in the source program.
2. Programs containing logical errors will be successfully compiled and the object
code will be obtained without any error message.
3. It is necessary that each computer must have its own "personal" compiler for a
particular language.
Interpreter
An interpreter is another type of translator used for translating programs written in high-
level languages. It takes one statement of a high-level language program, translates it into
machine language instructions, and then immediately executes the resulting machine
language instructions. That is, in case of an interpreter, the translation and execution
processes alternate for each statement encountered in the high-level language program.
the source program, but unlike a compiler, its output is the result of program
execution instead of an object program.
After compilation of the source program, the resulting object program is
permanently saved for future use and is used every time the program is to be
executed. So repeated compilation (translation of the source code) is not necessary
for repeated execution of a program. However in case of an interpreter, since no
object program is saved for future use, repeated interpretation (translation plus
execution) of a program is necessary for its repeated execution.
As compared to compilers, interpreters are easier to write because they are less
complex programs than compilers. They also require less memory space for
execution than compilers.
The main advantage of interpreters over compilers is that a syntax error in a
program statement is detected and brought to the attention of the programmer as
soon as the program statement is interpreted. This allows the programmer to make
corrections during interactive program development. Therefore, interpreters make it
easier and faster to correct programs.
Interpreters are slower than compilers when running a finished program. This is
because each statement is translated every time it is executed from the source
program.
Because the interpreter does not produce an object program, it must perform the
translation process each time a program is executed.
Assembler
The input to the assembler is the assembly language program (often referred to as a source
program) and its output is the machine language program (often referred to as an object
program). Note that during the process of translation of a source program into its equivalent
object program by the assembler, the source program is not being executed. It is only being
converted into a form that can be executed by the computer's processor.
Note: Assemblers, compilers, and interpreters are also referred to as language processors
since they are used for processing a particular language instructions.
Linker
An application usually consist of hundred, thousand or even millions of lines of codes. The
codes are divided into logical groups and stored in different modules so that the debugging
and maintence of the code becomes easier. These independent source programs have to be
linked together to create a complete application. This job is done by a tool called as Linker.
A linker is a program that links together several object modules and libraries to form a
single, coherent program (executable). Object modules are the machine code output from an
assembler or compiler and contain executable machine code and data, together with
information that allows the linker to combine the modules together to form a program.
Program
Library
Loader
Loaders are a part of the operating system that brings an executable file residing on disk
into memory and starts it running. It is responsible for loading, linking and relocation. In
computer a loader program is a program that performs the functions of a linker program and
then immediately schedules the executable for execution, without necessarily creating an
executable file as an output.
A loader perform four basic task:-
1) Allocation- It allocates memory space for the program
2) Linking- It combines two or more separate object programs and supplies the
information needed to allow references between them.
3) Relocation- It prepares a program to execute properly from its storage area.
4) Loading- It places data and machine instruction into the memory.
Source Code
High Level Language
Program
Compiler
object Code
Linker
Loader
Memory
1) Absolute Loader- It Loads the file into memory at the location specified by the
beginning portion (header) of the file and then passes control to the program. If the
memory space specified by the header is currently in use, execution cannot proceed,
and the user must wait until the requested memory becomes free. Moreover, this
type of loader performs only loading function . It does not perform linking and
program relocation.
2) Relocating Loader- This loader loads the program in memory, altering the various
addresses as required to ensure correct referencing. The decision as to where in
memory the program is placed, is done by the operating system, not the file header.
The relocating loader can only relocate code that has been produced by linker
capable of producing relative code.
Lecture no- 13
Operating system
An operating system (OS) is a collection of software that manages computer hardware resources
and provides common services for computer programs. The operating system is a vital component
of the system software in a computer system. Application programs require an operating system to
function.
Time-sharing operating systems schedule tasks for efficient use of the system and may also include
accounting for cost allocation of processor time, mass storage, printing, and other resources.
For hardware functions such as input and output and memory allocation, the operating system acts
as an intermediary between programs and the computer hardware.For Example: Windows Xp,
Linux, Unix
Operating systems
1) Serial Processing
The earliest computer system has no OS at all, and is characterized as serial processing
because users have to reserve time slots in advance and during the allotted period, they
occupy the computer exclusively. Thus the computer will be used in sequence by different
users.
1) Users may finish their task earlier than you have expected and unfortunately the rest
time is simply wasted or they cannot finish in the allotted time and thus are forced to
stop which may cause inconvenience.
2) In such systems, Programs are presented by Cards. Programs are loaded into
memory via card reader. With no OS available users have to manually load the
compiler program first with the user program as input. If an error occurred the user
has to repeat the whole process from the beginning. Thus much time is wasted.
Even with the automatic job processing by a monitor, the processor is still often idle. The
problem is actually what we have discussed before regarding programmed I/O.That is
program may have to wait for I/O operation finish and thus leads to the processor’s
idling.The solution is to run multiple programs concurrently during a certain period so that
whenever the current program has to wait for I/O devices, control may be transferred to
another program. If needed, a third program may be loaded or even more.
With multiprogramming, the overall system is quite efficient. However a problem remains.
That is those jobs that come late in the batch job list won’t get chance to run until the jobs
before them have completed, thus their users have to wait a long time to obtain the results.
Some programs may even need interaction with the users, which requires the processor to
switch to these programs frequently. To reach this new goal, a similar technique to
multiprogramming can be used , called time sharing. In such a system, multiple users
simultaneously access the system through terminals, with the operating system interleaving
the execution of each user program in a short burst of computation. Time sharing OS uses
multiprogramming with a special CPU scheduling algorithm to ensure quick response time
to all users.
The special CPU scheduling algorihm used in a time sharing system allocates a very short
period of CPU time one- by one to each user process beginning from the first user process
and proceeding through the last one, and then again beginning from first one. This short
period of time during which a user process gets the attention of the CPU is known as a time
slice , time slot or quantum and is typically of the order of 10 to 100 milliseconds.ie when
the CPU is allocated to a user process the user process will use the CPU until the allotted
time slice expires or until the process needs to perform some I/O operation or if the
execution of the process is over during this time period.
The computers communicate with one another through various communication lines (such
as high-speed buses or telephone lines). These are referred as loosely coupled systems or
distributed systems.
With resource sharing facility 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.
Examples of distributed systems are telephone networks, cellular networks, ATM machines
etc.
Real time system is defined as a data processing system in which the time interval required
to process and respond to inputs is so small that it controls the environment. The time taken
by the system to respond to an input and display of required updated information is termed
as response time. So in this method response time is very less as compared to the online
processing.
Real-time systems are used when there are rigid time requirements on the operation of a
processor or the flow of data and real-time systems can be used as a control device in a
dedicated application. Real-time operating system has well-defined, fixed time constraints
otherwise system will fail.For example Scientific experiments, medical imaging systems,
industrial control systems, weapon systems, robots, and home-applicance controllers, Air
traffic control system etc.
Hard real-time systems guarantee that critical tasks complete on time. In hard real-time
systems secondary storage is limited or missing with data stored in ROM. In these systems
virtual memory is almost never found.
Soft real time systems are less restrictive. 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.
Generally a Computer has a Single Processor means the Computer have a just one CPU for
Processing the instructions. But if we are Running multiple jobs, then this will decrease the
Speed of processing. For Increasing the Speed of Processing we use the Multiprocessing
Operating System. In the Multi Processing there are two or More CPU in a Single
Computer System. If one CPU will fail, then other CPU is used for providing backup to the
first CPU. With the help of Multi-processing, we can Execute Many Jobs at a Time. In such
a system instructions from different and independent programs can be processed
simultaneously by different CPUs or the CPUs may simultaneously execute different
instructions from the same program. If first CPU Completed his Work before the Second
CPU, then the Work of Second CPU will be divided into the First and Second.
Multiprocessing systems are of two types- tightly coupled systems and loosely coupled
systems. In tightly coupled systems there is a single wide primary memory which is shared
by all the processors. On the other hand in loosely coupled systems the processors do not
share memory and each processor has its own local memory.
8) Multitasking
The ability to execute more than one task at the same time, a task being a program. The
terms multitasking and multiprocessing are often used interchangeably, although
multiprocessing implies that more than one CPUis involved.
In multitasking, only one CPU is involved, but it switches from one program to another so
quickly that it gives the appearance of executing all of the programs at the same time.
There are two basic types of multitasking: preemptive and cooperative. In preemptive
multitasking, the operating system parcels out CPU time slices to each program. In
cooperative multitasking, each program can control the CPU for as long as it needs it. If a
program is not using the CPU, however, it can allow another program to use it temporarily.
OS/2, Windows 95, Windows NT, the Amiga operating system and UNIX use preemptive
multitasking, whereas Microsoft Windows 3.x and the MultiFinder (for Macintosh
computers) use cooperative multitasking.
Parallel Processing sytems are designed to speed up the execution of programs by dividing
the program into multiple fragments and processing these fragments simultaneously. Such
systems are multiprocessor systems also known as tightly coupled systems.
Parallel computing is an evolution of serial computing where the jobs are broken into
discrete parts that can be executed concurrently. Each part is further broken down to a
series of instructions. Instructions from each part execute simultaneously on different
CPUs.
A system is said to be a parallel system in which multiple processors have direct access to
shared memory which forms a common address space.In these systems there is single
system wide primary memory(address space) that is shared by all the processors. On the
other hand distributed systems are loosely coupled. Parallel computing is the use of two or
more processors in combination to solve a single problem. An example of parallel
computing would be two servers that share the workload of routing mail, managing
connection to a database, solving mathematical problem etc.
It is an operating system for embedded computer systems. These operating systems are
designed to be compact ,efficient and reliable forsaking many functions that non embedded
computer operating systems provide , and which may not be used by the specialized
applications they run. They are designed to operate on small machines like PDAs. They are
able to operate with a limited number of resources. They are very compact and extremely
efficient by design. They are frequently also referred to as real time operating systems
(RTOS). Windows CE and Minix 3 are some of the examples of embedded operating
system.
BOOTING :
Boot is the process of starting or resetting a computer. When first turning on, the computer
executes the software that loads and starts the computers OS and prepares it for use.
Boot Record refers to the section of disk that contains the operating system.
Boot sector is the portion of the disk reserved for self starting portion (boot strap loader) of
an operating system.
Boot strap loader is a program that is automatically run when computer is switched on. It
first performs few basic hardware tests then passes control to operating system’s loader files
to load the OS.
It is of two types (1) Cold booting: when the computer is started after having been switched
off. (2) Warm booting: when the operating system alone is restarted (without being
switched off) after a system crash or 'freeze.' Both types of booting clear out (for the time
being) the bugs, bombs, memory conflicts of the OS
Mail merge is a feature in MS-Word that enables you to create multiple copies of a document with
small changes in each. It is a way of placing content from a spreadsheet, database, or table into a
Microsoft Word document. Mail merge is ideal for creating personalized form letters or labels
instead of editing the original letter several times to input different personalized information. As
you can imagine, this can save a lot of time as well as worry about not changing all of the
information for the new recipient.
Take an example of appointment letter. For every employee the format and structure of
letter is almost identical except those information related to the employee.
Step 1
On the Mailings tab, click Start Mail Merge, and then click Step by Step Mail Merge Wizard.
Step 2
1. In the Mail Merge task pane, click Letters. This will allow you to send letters to a group of
people and personalize the results of the letter that each person receives.
2. Click Next: Starting document.
Step 3
Currently select “Start from existing document” as the invitation is available with you.
Step 4
Select recipients
When you open or create a data source by using the Mail Merge Wizard, you are telling Word to
use a specific set of variable information for your merge. Use one of the following methods to
attach the main document to the data source.
1. In the Mail Merge task pane, click Next: Select Recipients.
2. Click Type a new list.
3. Click Create.
The New Address List dialog box appears.
In this dialog box, enter the address information for each record. If there is no information for a
particular field, leave the box blank.
By default, Word skips blank fields. Therefore, the merge is not affected if blank entries are in the
data form. The set of information in each form makes up one data record.
After you type the information for a record, click New Entry to move to the next record.
To delete a record, click Delete Entry. To search for a specific record, click Find Entry. To customize
your list, click Customize. In the Customize Address List dialog box, you can add, delete, rename,
and reorder the merge fields.
In the New Address List dialog box, click OK. In the Save Address List dialog box, type the
name that you want to give to your data source in the File name box, and then click Save.
In the Mail Merge Recipients dialog box, make any changes that you want, and then click
OK.
Click Next: Write your letter to finish setting up your letter.
Save the main document.
When you save the main document at this point, you are also saving the data source and attaching
the data source to the main document.
Type the name that you want to give to your main document, and then click Save.
To proceed to the next step, click Next: Write your letter.
Step 5
1. Type or add any text and graphics that you want to include in your letter.
2. Add the field codes where you want the variable information to appear. In the Mail Merge
task pane, you have four options:
o Address block: Use this option to insert a formatted address.
o Greeting line: Use this option to insert a formatted salutation.
o Electronic postage: Use this option to insert electronic postage.
Note This option requires that you have a postage software program installed on
your computer.
o More items: Use this option to insert individual merge fields. When you click More
Items, the Insert Merge Field dialog box appears.
Note Make sure that your cursor is where you want to insert the information from
your data source before you click More Items.
3. When you finish editing the main document, click Save or Save As on the File menu.
Note In Word 2007, click the Microsoft Office Button, and then click Save or Save As.
Name the file, and then click Save. To proceed to the next step, click Next: Preview your
letters.
Step 6
This step allows you to preview your merged data, one letter at a time. You can also make changes
to your recipient list or personalize individual letters. To move between the recipients in the list
one can click the “>>”.
On clicking the “>>” the next recipient’s name and address block appears in the letter.
Step 7
This step merges the variable information with the form letter. You can output the merge result by
using either of the following options:
Print: Select this option to send the merged document directly to the printer. You will not
be able to view the document on your screen.
When you click Print, the Merge to Printer dialog box appears. In the Merge to Printer
dialog box, you can choose which records to merge. When you click OK, the Print dialog
box appears. Click Print to print the merge document.
Edit individual letters: Select this option to display the merged document on your screen. When
you click Edit individual letters, the Merge to New Document dialog box appears. In the Merge to
New Document dialog box, you can choose which records to merge. When you click OK, the
documents are merged to a new Word document. To print the file, on the File menu, click Print.
Lecture 14
2) data management
3) job (task) management
4) standard means of communication between user and computer
5) Process Management
6) Memory Management
7) File Management
8) Security
9) Command Interpretation
The resource management function of an OS allocates computer resources such as CPU time, main
memory, secondary storage, and input and output devices for use.
The data management functions of an OS govern the input and output of the data and their location,
storage, and retrieval.
The job management function of an OS prepares, schedules, controls, and monitors jobs submitted
for execution to ensure the most efficient processing. A job is a collection of one or more related
programs and their data.
The OS establishes a standard means of communication between users and their computer systems.
It does this by providing a user interface and a standard set of commands that control the hardware.
The process management module of an operating system takes care of the creation and deletion of
processes, scheduling of various system resources to the different processes requesting them and
providing mechanisms for synchronization and communication among processes.
The memory management module of an OS takes care of allocation and deallocation of memory
space to the various programsin need of this resource.
The file management module of an OS takes care of file related activities such as organization,
storing, retrieval, naming, sharing, and protection of files.
The security module of the OS protects the resources and information of a computer system against
destruction and unauthorized access.
The command interpretation module of an OS takes care of interpreting user commands, and
directing the system resources to handle the requests.
The efficiency of an operating system and the overall performance of a computer system are usually
measured in terms of the following:
1. Throughput: Throughput is the amount of work that the system is able to do per unit of
time. It is measured as the number of processes that are completed by the system per unit
time.
2. Turnaround time: Turnaround time is the interval from the time of submission of a job to
the system for processing to the time of completion of the job.
3. Response time: Response time is the interval from the time of submission of a job to the
system for processing to the time the first response for the job is produced by the system.
Lecture 15
Application Software
Examples
Some of the most commonly known application software are briefly described below.
1.Word-Processing Software
Word-Processing is a term that describes the use of computers to create, edit, view, format,
store, retrieve and print documents (written material such as letters, reports, books, etc.). A
word-processing software is an application software that enables the user to do all these on
a computer system. The need to create documents is so common in every walk of life,
whether it is at work, at school, or at home, that word-processing software is the most
commonly used application software.
2.Graphics Software
A graphics software enables us to use a computer system for creating, editing, viewing,
storing, retrieving and printing designs, drawings, pictures, graphs and anything else that
can be drawn in the traditional manner.
3.Education Software
Education software allow computer systems to be used as a teaching and learning tool. A
few examples of such applications are:
1. Applications that teach young children to do mathematics, how to recognize the alphabet,
or how to read whole words and sentences. The use of a computer allows the learning
process to be made interesting by incorporating audio-visual effects in the application.
2. For example, use of encouraging spoken words (like excellent, marvelous, etc.) when the
correct answer is given, and display of marks obtained leads to interesting learning process.
4.Entertainment Software
1. Video Games. Today thousands of video game applications are available on computer
systems. Special audio and visual effects are used in these applications to make the games
thrilling and exciting for the users.
2. Interactive Television. These applications allow users to either use their computer
systems as an interactive television or to convert their conventional televisions into an
interactive television.
Page 37