1. K.K. WAGH POLYTECHNIC, NASHIK-03
DEPARTMENT OF COMPUTER TECHNOLOGY
(Second Shift)
Chapter-01
Introduction to
System Programming
2. System Software consists of a variety of programs that
support the operation of a computer.
The software makes it possible for the users to focus
on an application or other problem to be solved,
without needing to know the details of how the
machine works internally.
A System program is a program which is required for
the effective execution of a general user (application)
program.
The term execution here includes all activities namely
writing program code ,editing, storage, translation,
relocation, linking and eventual execution.
System Software
4. Components of System Software
Assembler
Linker
Loader
Macro processor
Text editor
Compiler
Operating system
Debugging system
Source Code Control System
5. 1. Assemblers:
Programmers found it difficult to write or read programs in
machine language, so for more convenience they began to use a
mnemonic for each machine instruction, which subsequently
translate into machine language.
Such a mnemonic machine language is now called as an
assembly language. Program known as assembler were written to
automate the translation of assembly language into machine
language.
The input to an assembler is an assembly language program.
Output is an object program plus information that enables the loader
to prepare the object program for information.
Evolution of System Software
6. Evolution of System Software
2. Loaders :
Once the assembler produces an object program, that program
must be placed into memory and executed. It is the purpose of the
loader to assure that object program are placed in memory in an
executable form.
A loader is a program that places programs into main memory
and prepares them for execution.
There are various loading schemes: absolute, compile-and-go,
relocating, ,dynamic linking and direct-linking. In general loader
must load, relocate, and link the program.
The period of execution of user’s program is called execution
time. The period of translating a user’s program is called assembly or
compile time. The period of loading and preparing an object program
for execution is called load time.
7. Evolution of System Software
3. Macros:
To avoid the repetition of the identical parts of code in a program
operating system provide a macro processing facility, which permits
the programmer to define an abbreviation for a part of his program
and to use the abbreviation in his program.
The macro processor treats the identical parts of the program
defined by abbreviation as a macro definition.
The macro processor substitutes the definition for all occurrences
of the abbreviation (macro call) in the program.
8. Evolution of System Software
4. Compilers:
A compiler is a program that accepts a program written in high
level language and produce an object program.
e.g. FORTRAN, COBOL, C etc.
Modern compilers must interact closely with the operating
system to handle statements concerning the hardware interrupts of a
computer system.
9. Evolution of System Software
5. Operating Systems:
An operating system is an interface between user and computer
hardware.
An OS is concerned with the allocation of resources and services,
such as memory, processors, devices and information. The OS
includes programs to manage these resources, such as bus controller,
a scheduler, memory management module, I/O programs, and a file
system.
10. Evolution of Operating System
Historical Review of Operating Systems:
1. Monitors
-Monitors are the simplest operating systems.
-Single user systems .
-Allow user interaction.
2. Simple Batch Systems
-The user prepares a job (which consists of program, data and some
control information), submits it to the computer operator and receives
the output after the program is executed.
-The job is usually punched on cards and the output is usually
printed.
-To speed up processing, jobs with similar needs can be batched
together and run as a group.
-The operating system is always in memory and its job is to transfer
control automatically from one job to the next.
11. card reader
CPU
I/O line printer
As the I/O devices are slower than the speed of the CPU (the
difference may be three orders of magnitude or more), the CPU is often
idle. For using the system more efficiently, cards can be read from the
card reader onto the disk. The operating system records their location on
disk in a table. When a job requests the printer, the output is copied into a
system buffer and is written to the disk. When the job is completed, the
output is printed. This form of processing is called spooling
(simultaneous peripheral operation on line).
Evolution of Operating System
12. Evolution of Operating System
3. Multiprogrammed Batch Systems:
The operating system keeps several jobs (a subset of jobs in the
job pool) in memory at a time. During the execution of one job, if it
waits for an I/O operation to complete, the operating system switches to
and executes another job. In this way, as long as there is always some job
to execute, the CPU will never be idle.
13. 4. Time-Sharing Systems
In multiprogrammed batch systems, the user cannot interact with
the program during its execution. In time-sharing or multitasking
systems, multiple jobs are executed by the CPU switching between them,
but the switching occurs so frequently that the user may interact with
each program while it is running. Time-sharing operating systems:
-uses CPU scheduling and multiprogramming,
-uses time-slice mechanism,
-allows interactive I/O,
-allows many users to share the computer simultaneously.
Evolution of Operating System
14. 5. Real time operating systems:
Used whenever a large number of external events have to be treated
in a short or limited interval of time
Support for multiprogramming/multi-tasking
Main goal:
Minimization of the response time to service the external events.
Memory management:
-Concurrent processes are loaded into the memory.
-Support for protection and inter-process communication.
I/O management:
-Critical in time
-Processes dealing with I/O are directly connected to the interrupt
vectors (or handling the interrupt requests)
File management:
It may be missing
If exists, it should comply with requirements for timesharing
systems + it should satisfy the requirements for real time systems
Evolution of Operating System
15. 6. Distributed operating systems
Distributed systems also have more than one processor. Each
processor has its local memory. Processors communicate through
communication lines (eg. Telephone lines, high-speed bus, etc.).
Processors are referred to as sites, nodes, computers depending on the
context in which they are mentioned. Multicomputer systems are loosely
coupled. Example applications are e-mail, web server, etc.
Evolution of Operating System
18. The CPU consists of an instruction interpreter, a location counter, an
instruction register and various working registers and general registers.
Instruction Interpreter:
It is group of electrical circuits(hardware), that execute the
instructions fetched from memory.
Location Counter(LC):
It is also called as Program Counter(PC) or Instruction
Counter(IC), is a hardware memory device which denotes the location of
the current instruction being executed.
Instruction Register(IR):
A copy of current instruction is stored in the Instruction
Register.
Machine Structure
19. Working & General Registers:
The working registers (WR) are memory devices that serves as
“scratch pads” for the instructions interpreter, while the general
registers(GR) are used by the programmer as storage location and for
special functions.
Memory Address Register(MAR) & Memory Buffer Register(MBR)
The primary interface between the memory and CPU is via the
MAR and MBR.
The MAR contains the address of the memory location that is to
be read from or store into.
The MBR contains a copy of the designated memory location
specified by MAR after a “read” or the new contents of the memory
locations prior “write”.
Machine Structure
20. Memory Controller:
It is hardware that transfers data between the MBR and primary
memory locations the address of which is in the MAR.
I/O Channel
The I/O channel interpret special instructions for inputting and
outputting information from the memory.
Machine Structure