Lecture-3 Topics
1. Some important definitions
2. Evolution of Operating System
3. General Machine structure of IBM 360/370
4. Structure of Assembly Language Program(ALP)
6. Some important
definitions
1. Multiprogramming:- In this multiprograms are allowed to reside in the
seperate area of memory. The advantage of multiprogramming is there is no
wastage of memory and we can run multiprograms.
Types of Multiprograms
a. Multiprogramming with fixed task(MFT):- Fixed portion of memory is allocated to
all the programs.
b. Multiprogramming with variable task(MVT):- Here size of every portion is not
fixed. The variable size memory is allocated to the program.
2. Fragmentation:- In partition memory system the unused memory block
which are too small to contain the program
30 kb 30 kb
are refered as holes is called
10 kb 40 kb
fragmentation. 20 kb
200 kb 200 kb 200 kb 400 kb 200 kb 200 kb
3. Defragmentation:- It is the collection of unused portion of memory.
130 kb
4. Paging:- In this, program is divided into equal portions called as Pages and
memory is divided into equal portions called as Blocks. Then these pages are
loaded or allocated to the memory blocks.
5. Multi processing/Processor:- In this more than one processor is operating
on same memory.
Memory
Processor 1 --- Processor N
6. Schedular:- The allocation of processor time to all the program/processes is
done by program is called Schedular. Time sharing is one of the method of
allocating processor time to allocate multiple program by single processors.
7. Traffic controller:- It co-ordinates processes/program and the processors.
8. Subroutine:- It is a program or function designed to perform a specific task
and used by any program. There are two types of subroutine
a. Open subroutine
b. Close subroutine
a. Open Subroutine:- It is written inside the main program and
execution sequence of main program continues.
b. Closed Subroutine:- It is written outside the main program.
Execution sequence of main program is transferred to the
subroutine.
9. Execution Time:- It is the time required by the program to
execute.
10. Compile Time:- It is the time required to compile the program.
11. Loading time:- It is the time required to load the program in to
the main memory.
Difference between Impure and Pure Procedure
• Impure • Pure
• 1. It can be Modified • It cannot be modified
• 2. Difficult to read • Can be easy to read and
understand
• 3. Cannot be shared
• Shared by multiple
processors
• 4. Processor can modify
impure procedure
• Processor cannot modify pure
procedure
Operating System Function
• Operating System User view point:- Functions
1. Job sequencing, Scheduling and Traffic controlling operations
2. Input Output Programming
3. Protect itself from user, protecting the user from other users
4. Secondary storage management
5. Error Handling
• Operating System User view point:- Facility
1. Assembler
2. Compiler such as COBOL, Fortran, C, C++
3. Subroutine libraries such as SINE, COSINE, SQUAREROOT
4. Debugging tools and linkage editors
5. Data management and File processing
6. Application packages such as circuit analysis and simulations
7. Utility routine
8. Hardware management
Machine Structure of 360/370
1. Location Counter (LC):- Also called as Program Counter (PC) or Instruction
Counter (IC) is a hardware memory device which denotes the location of current
instruction being executed.
2. Instruction Register (IR):- It consist of the current instruction being
executed.
3. Instruction Interpreter:- It interpret the current instruction being executed.
4. Working Registers and General Registers (WR, GR):- These registers
act as scratch pads for storing instruction and data. The arithmetic and logic
operations can be performed on these registers.
5. Memory Address Register(MAR):- It is the primary interface between
main memory and CPU. It consist of the address of memory location that is to
be read form or store into(writing into memory).
6. Memory Buffer Register(MBR):- It contains the copy of the memory address
specified by MAR after we read the data or before writing the data into memory
location.
7. Memory Controller:- Memory controller transfer data between MBR and Memory
location. The address of which is specified by MAR.
8. I/O Channel:- It interpret special instructions for inputting and outputting
information from the memory. General register
no
Memory location
Ex: ADD 2, 176
It will add data stored in memory location 176 with the data stored in general register
no. 2. The result will be stored in register 2.
What is Assembler?
• Assembler is a translator that translates a program written in Assembly level language to
machine level language.
A program in Machine level language
Assembly level Assembler code
language (ALP) (object code/object file)
• Assembly level Language(ALL):- A language that uses Mnemonics for their instructions
is called as Assembly level Language. Program written in ALL is called Assembly
Language Program (ALP).
Structure of Assembly Language Program(ALP)
ALP is a sequence of Assembly Language Instructions. These assembly language
instructions is divided into 4 parts or 4 fields
1. Label field
2. Opcode field
3. Operand field
4. Comment field
Consider the example:
opcode
MOV B, A ; Move register A to register B 1000
operand
Loop: ADD A, B ; Add B to A 1001
DCR C ; Decrement C 1002
label comment
JNZ Loop ; Jump not Zero 1003
1. Label field:- It is the identifier of Assembly Language Instructions. The label
in label field identifies the assembly language instruction and the execution
sequence is transferred to that instruction.
2. Opcode field:- It specifies the operation to be performed. Opcode means
Operation code.
3. Operand field:- Operand on which the operation specified by the opcode is
to be performed. Operands may be memory location, register or direct data.
4. Comment:- This is a non executable part of program that increases the
readability of the program. Comment gives the additional information about
instruction. It helps in understanding the structure of ALP.