SS & MP Lab Viva Questiions
SS & MP Lab Viva Questiions
SS & MP Lab Viva Questiions
FCFS stands for First-come, first-served. It is one type of scheduling algorithm. In this
scheme, the process that requests the CPU first is allocated the CPU first.
Implementation is managed by a FIFO queue.
7) What is fragmentation?
Fragmentation is memory wasted. It can be internal if we are dealing with systems
that have fixed-sized allocation units, or external if we are dealing with systems that
have variable-sized allocation units.
9) What is an Assembler?
An assembler acts as a translator for low-level language. Assembly codes written
using mnemonic commands are translated by the Assembler into machine language.
13) What are the four necessary and sufficient conditions behind the
deadlock?
These are the 4 conditions:
1) Mutual Exclusion Condition: It specifies that the resources involved are non-sharable.
3) No-Preemptive Condition: Resources cannot be taken away while they are being used by
processes.
4) Circular Wait Condition: It is an explanation of the second condition. It specifies that the
processes in the system form a circular list or a chain where each process in the chain is waiting
for a resource held by next process in the chain.
o Internal fragmentation: It is occurred when we deal with the systems that have fixed
size allocation units.
o External fragmentation: It is occurred when we deal with systems that have variable-
size allocation units.
o Binary semaphores
o Counting semaphores
...............................................................................................................................
1. Define system software.
-process management
Operating system acts as an interface between the user and the system
Eg:windows,linux,unix,dos
Compiler is a set of program which converts the whole high level language
program to machine language program.
4. Define loader.
Loader is a set of program that loads the machine language translated by the
translator into the main memory and makes it ready for execution.
MAR (memory address register) is used to store the address of the memory
from which the data is to be read or to which the data is to be written.
In the case of immediate addressing the operand field gives the memory
location.The word from the given address is fetched and it gives the address of
the operand.
Here the second operand is given in indirect addressing mode.First the word in
memory location 600 is fetched and which will give the address of the operand.
14. What are the instruction formats used in SIC/XE architecture? Give
any one format. Format 1 (1 byte), Format 2 (2 bytes), Format 3 (3 bytes)
& Format 4(4 bytes) Are the different instructions used in SIC/XE
architecture.
Format 2:
8 4 4
OPCODE R1 R
UNIT II-ASSEMBLERS
2 Marks
These are the statements that are not translated into machine instructions,but
they provide instructions to assembler itself.
The header record,text record and the end record are the three different records
used in object program.
The header record contains the program name,starting address and length of the
program. Text record contains the translated instructions and data of the
program.
End record marks the end of the object program and specifies the address in the
program where execution is to begin.
The symbol table includes the name and value for each symbol in the source
program,together with flags to indicate error conditions.Some times it may
The operation code table contain the mnemonic operation code and its machine
language equivalent. Some assemblers it may also contains information about
instruction format and length.OPTAB is usually organized as a hash table,with
mnemonic operation code as the key.
* „EQU‟-it allows the programmer to define symbols and specify their values
directly.The general format is symbol EQU value
10. Write the steps required to translate the source program to object
program.
One pass assembler that generate their object code in memory for immediate
execution is known as load and go assembler.Here no object programmer is
written out and hence no need for loader.
13 .What are the two different types of jump statements used in MASM
assembler.
Near jump
Far jump
In this instruction one word area(3 bytes) is reserved for the symbol THREE. If
the memory is byte addressable then the address assigned for the next symbol is
1006.
RESB –It reserves the indicated number of bytes for data area. Eg: 10 1008
INPUT RESB 1
In this instruction one byte area is reserved for the symbol INPUT .Hence the
address assigned for the next symbol is 1009.
This record contains the information about the modification in the object code
during program relocation.the general format is
Col 1 M
Col 2-7 starting location of the address field to be modified relative to the
beginning of the program
A control section is a part of the program that maintain its identity after
assembly;each control section can be loaded and relocated independently of the
others.
Control sections are most often used for subroutines.The major benefit of using
control sections is to increase flexibility.
EXTDEF names external symbols that are defined in a particular control section
This record gives information about external symbols that are defined in a
particular control
section.The format is
Col 1 D
Col 2-7 name of external symbol defined in this control section Col 8-13
relative address of the symbol with in this control section Col 14-73 name and
relative address for other external symbols.
USE – used to divide the program in to many blocks called program blocks
The assembler directive START gives the name and starting address of the
program.The format is PN START 1000
Linking – combines two or more separate object programs and also supplies the
information needed to reference them.
The loader, which is used only for loading, is known as absolute loader. e.g.
Bootstrap loader
This is a special type of absolute loader which loads the first program to be run
by the computer. (usually an operating system)
Loaders that allow for program relocation are called relocating (relocative )
loaders.
The relocation bits are gathered together following the length indicator in each
text record and which is called as bit mask.For e.g. the bit mask FFC(1
11111111100) specifies that the first 10 words of object code are to be modified
during relocation.
It is used to store the name and address of the each external symbol. It also
indicates in which control section the symbol is defined.
In many linking loaders the subroutines called by the program being loaded are
automatically fetched from the library, linked with the main program and
loaded.This feature is referred to as automatic library search.
13. List the loader options INCLUDE &DELETE. The general format of
INCLUDE is
program from a library and treat it as the primary loader input. The general
format of DELETE
It instructs the loader to delete the named control sections from the sets of
programs loaded.
The linking loader performs the process of linking and relocation. It includes
the operation of automatic library search and the linked programs are directly
loaded.
If the subroutine is loaded and linked to the program during its first call(run
time),then it is called as dynamic loading or dynamic linking.
a) it has the ability to load the routine only when they are needed
b) The dynamic linking avoids the loading of entire library for each execution
In static executable, all external symbols are bound and ready to run. In
dynamic executables some symbols are bound at run time.
Begin
Moved object code to specified location in memory Read next object program
record
End
Macro processor is system software that replaces each macroinstruction with the
corresponding group of source language statements. This is also called as
expanding of macros.
These statements give the name of the macroinstruction being invoked and the
arguments to be used in expanding the macros. These statements are also known
as macro call.
NAMTAB – it is used to store the macro names and it contains two pointers
for each macro instruction which indicate the starting and end location of macro
definition in DEFTAB.it also serves as an index to DEFTAB
ARGTAB – it is used to store the arguments during the expansion of macro
invocations.
Macro time variable can be used to store working values during the macro
expansion. Any symbol that begins with the character & and then is not a macro
instruction parameter is assumed to be a macro time variable.
If the parameters and arguments were associated with each other according to
their positions in the macro prototype and the macro invocation statement, then
these parameters in macro definitions are called as positional parameters.
The statement in which a macro calls on another macro,is called nested macro
call. In the nested macro call, the call is done by outer macro and the macro
called is the inner macro.
-it avoids the extra pass over the source program during assembling
-it may use some of the utility that can be used by language translators so that
can be loaded once.
This macro processor reads the source program statements, process the
statements and then the output lines are passed to the language translators as
they are generated, instead of being written in an expanded file.
*The programmer does not need to learn about a macro facility for each
compiler.
The macro processors that are not dependent on any particular programming
language,but can be used with a variety of different languages are known as
general purpose macro processors. Eg.The ELENA macro processor.
16. What are the important factors considered while designing a general
purpose macroprocessors?
-comments
x identify the macro calls in the program the values of formal parameters are
identified x maintain the values of expansion time variables declared in a macro
x expansion time control flow is organized x determining the values of
sequencing symbols x expansion of a model statement is performed
................................................................................................................................
ANSWER: 16-bit
ANSWER: 8086 has two independent functional units because of that the
processor speed is more. The Bus interface unit and Execution unit are the two
functional units.
ANSWER: Bus interface unit is responsible for transferring the data addresses
on the buses necessary for execution unit.
ANSWER: Execution Unit receives program instruction codes and data from
BIU,executes these instructions and store the result in general registers.
ANSWER: It is accumulator register and used for I/O, arithmetic and logical
ANSWER: It is base register. It is used to store base address and is the only
register used as offset address pointer. BX (16-bit) = BL (8-bit) + BH (8bit)
ANSWER:IP (Instruction pointer): 16-bit register that stores the offset address
of next instructions to be executed.
BP (Base pointer): 16-bit register that stores the offset address of the data or
SP (Stack pointer): 16-bit register that stores the offset address of the top most
ANSWER: 6 byte
Flag register
Code segment
Data segment
Stack segment
Extra segment
ANSWER: Extra segment is used when data segment is not sufficient enough
for the program.
ANSWER: 64 k bytes
DB-data byte
These are the directives used to declare a variable of type double word, word
and byte respectively.
Carry flag: set when carry occurs after an operation, otherwise reset.
Parity flag: set if the result of an operation contains even number of 1 bits,
otherwise reset.
Auxiliary carry flag: set if there is carry from lower nibble, otherwise reset.
Zero flag: set if the result of an arithmetic or logical operation is zero, otherwise
reset.
Sign flag: If the MSB of the result is 1 then the flag is set, otherwise reset.
Overflow flag: set when carry out of MSB and carry into MSB is different,
otherwise reset.
CONTROL FLAGS
Trap flag: To execute the program in a single step, this flag should be set.
sequence.
Example: MASM
ANSWER: The linker is a program that allows the user to combine different
objects into a single executable file.
ANSWER: Emulators are used to test and debug the hardware and software of
an external system.
ANSWER: debugger is a program that allows the user to load the object
program into the memory, execute the program in single step.
ANSWER: Yes
ANSWER: FIFO
ANSWER: SI
ANSWER: DI
ANSWER: the value of BX is multiplied with the value of AL and stored in AL.
ANSWER: Hexadecimal
ANSWER: Load Effective Address, load the address of the data that is to be
printed to dx.
location, either from one end to another or through the carry flag.
ANSWER: the feature of fetching the next instruction by BIU when the current
instructions from memory, decodes and executes the instructions. Most Micro
ANSWER: carry flag, Parity flag, Auxiliary carry flag, Zero flag, Overflow
flag,Trace flag, Interrupt flag, Direction flag, and Sign flag.
77) Which Segment is used to store interrupt and subroutine return address
registers?
ANSWER: Flag is a flip-flop used to store the information about the status of a
82) What is the difference between min mode and max mode of 8086?
ANSWER: Minimum mode operation is the least expensive way to operate the
8086 microprocessor because all the control signals for the memory and I/O are
generated by the microprocessor. In Maximum mode some of the control
signals must be externally generated. This requires the addition of an external
bus controller. It used only when the system contains external coprocessors such
as 8087 arithmetic coprocessor.
ANSWER: 8288 bus controller is used to provide the signals eliminated from
the 8086 by the maximum mode operation.
ANSWER: Stack is a portion of RAM used for saving the content of Program
Counter and general purpose registers.
ANSWER: FIFO (First In First Out) stack is used in 8086.In this type of Stack
the first stored information is retrieved first.
86) What is the position of the Stack Pointer after the PUSH instruction?
87) What is the position of the Stack Pointer after the POP instruction?
Maskable interrupt.
Read Interrupt Mask. Used to check whether the interrupt is Masked or not.
ANSWER: Macro is a set of instructions that perform a task and all the
instructions defined in it is inserted in the program at the point of usage.
ANSWER: It has limitations on the size of data. Most Microprocessor does not