Important Questions For System Software

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

lOMoARcPSD|49454283

SS(IQ) - Important Questions for System Software

System Software (Pondicherry University)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by Kishore K (kishore22oct@gmail.com)
lOMoARcPSD|49454283

IT T46 SYSTEM SOFTWARE

Two Marks Questions


UNIT-1

1. Define system software.


It consists of variety of programs that supports the operation of the computer. This software
makes it possible for the user to focus on the other problems to be solved without needing to know
how the machine works internally.
E.g.: operating system, assembler, and loader.

Give some applications of operating system.


 to make the computer easier to use
 to manage the resources in computer
 process management
 data and memory management
To provide security to the user.
Operating system acts as an interface between the user and the system Eg: windows, Linux, UNIX,
dos

3. Define compiler and interpreter.


Compiler is a set of program which converts the whole high level language program to
machine language program.
Interpreter is a set of programs which converts high level language program to machine
language program line by line.

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.

5. What is the need of MAR register?


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.

6. Draw SS instruction format.

It is a 6 byte instruction used to move L+I bytes data from the storage location1 to the storage
location2.
Storage location1 = D1+ [B1]
Storage location2 = D2+ [B2]
Eg: MOV 60,400(3), 500(4)

20
Department of Information Technology
Downloaded by Kishore K (kishore22oct@gmail.com)
lOMoARcPSD|49454283

IT T46 SYSTEM SOFTWARE

Give any two difference between base relative addressing and program counter relative
addressing used in SIC/XE.

8. Define indirect addressing


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.
Eg: ADD R5, [600]
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.

9. Define immediate addressing.


In this addressing mode the operand value is given directly. There is no need to refer memory.
The immediate addressing is indicated by the prefix 8#9.
Eg: ADD #5
In this instruction one operand is in accumulator and the second operand is an immediate
value the value 5 is directly added with the accumulator content and the result is stored in
accumulator.

List out any two CISC and RISC machine.


CISC –Power PC, Cray T3E
RISC – VAX, Pentium Pro architecture

Following is a memory configuration:


Address Value Register R
1 5 5
7
5
What is the result of the following statement?
ADD 6(immediate) to R (indirect)

Here 6 is the immediate data and the next value is indirect data.ie the register contains the
address of the operand. Here the address of the operand is 5 and its corresponding value is 7.
6+[R]=6+[5]=6+7=13

21
Department of Information Technology

Downloaded by Kishore K (kishore22oct@gmail.com)


lOMoARcPSD|49454283

IT T46 SYSTEM SOFTWARE

Following is a memory configuration:


Address Value Register R
4 9 6
7
2
What is the result of the following statement?
SUB 4(direct) to R (direct)
Here one operand is in the address location 4(direct addressing) and the next operand is in the
register (register direct).
The resultant value is 9 –6 =3.

What is the name of X and L register in SIC machine and also specify its use. A-
accumulator
Used for arithmetic operation.ie in the case of arithmetic operations one operand is in the
Accumulator and other operand may be an immediate value, register operand or memory content. The
operation given in the instruction is performed and the result is stored in the accumulator register.
L-linkage register
It is used to store the return address in the case of jump to subroutine (JSUB) instructions.

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:

Consider the instructions in SIC/ XE programming


10 1000 LENGTH RESW 4
20 ----- NEW WORD 3
What is the value assign to the symbol NEW?
In the line 10 the address is 1000 and the instruction is RESW 4.It reserves 4 word (3 x 4=12)
area for the symbol LENGTH. Hence 12 is added to the LOCCTR. Thus the value of the symbol
NEW is 1000+12 =100C.

16. What is the difference between the instructions LDA # 3 and LDA THREE?
In the first instruction immediate addressing is used. Here the value 3 is directly loaded into
the accumulator register.
In the second instruction the memory reference is used. Here the address (address assigned
for the symbol THREE) is loaded into the accumulator register.

17. Differentiate trailing numeric and leading separate numeric.


The numeric format is used to represent numeric values with one digit per byte. In the
numeric format if the sign appears in the last byte it is known as the trailing numeric. If the sign
appears in a separate byte preceding the first digit then it is called as leading separate numeric.

22
Department of Information Technology.

Downloaded by Kishore K (kishore22oct@gmail.com)


lOMoARcPSD|49454283

IT T46 SYSTEM SOFTWARE

18. What are the addressing modes used in VAX architecture?


Register direct, register deferred, auto increment and decrement, program counter relative,
base relative, index register mode and indirect addressing are the various addressing modes in VAX
architecture.

How do you calculate the actual address in the case of register indirect with immediate index
mode?
Here the target address is calculated using the formula
T.A = (register) + displacement.

Write the sequence of instructions to perform the operation BETA = ALPHA + 1 using SIC
instructions.

Write the sequence of instructions to perform the operation BETA = ALPHA+5 using SIC/XE
instructions.

What is the use of TD instruction in SIC architecture?


The test device (TD) instruction tests whether the addressed device is ready to send or receive
a byte of data. The condition code is set to indicate the result of this test. Setting of < means the
device is ready to send or receive, and = means the device is not ready.

23. Define Assembler.


Assembler is a translator from human readable (ASCII text) files of machine instructions into
the actual binary code (object files) of a machine.

23. Define Loader.


Loader is a program that performs the functions of loading and linkage editing. The process of
loading consists of taking re-locatable machine code, altering the re-locatable address and lacing the
altered instruction and data in memory at the proper location.

24. Define Preprocessor. What are its functions?


Program that processes the source code before the compiler sees it. Usually, it implements
macro expansion, but it can do much more. The functions of a preprocessor are:
 Macro processing.
 File inclusion.
 Rational preprocessors.
Language extensions

23
Department of Information Technology

Downloaded by Kishore K (kishore22oct@gmail.com)


lOMoARcPSD|49454283

IT T46 SYSTEM SOFTWARE

25. Define Debugger.


Debugger is a program to help you see what is going on when your program runs.
It can print the values of variables, show what procedure called what procedure to get where you are,
run up to a particular line, run until a particular variables gets a special value etc.

26. What is front-end and back-end of the compiler?


Often the phases of a compiler are collected into a front-end and back-end.
Front-end consists of those phases that depend primarily on the source program and largely
independent of the target machine. Back-end consists of those phases that depend on the target
machine language and generally those portions do not depend on the source language, just the
intermediate language. In back end we use aspects of code optimization, code generation, along with
error handling and symbol table operations.

27. Define Passes.


In an implementation of a compiler, portion of one or more phases are combined into a
module called pass. A pass reads the source program or the output of the previous pass, makes the
transformation specified by its phases and writes output into an intermediate file, which is read by
subsequent pass.

28. Define syntax and semantics.


The rules and regulations used to form a language are known as syntax. The meaning given to
a programming construct is known as semantics.

What are the classifications of a compiler?


The classifications of compiler are:
 Single-pass compiler.
 Multi-pass compiler.
 Load and go compiler.
 Debugging compiler.
Optimizing compiler.

24

Downloaded by Kishore K (kishore22oct@gmail.com)


lOMoARcPSD|49454283

IT T46 SYSTEM SOFTWARE

Two Marks Questions


UNIT-2
Define the basic functions of assembler.
 Translating mnemonic operation codes to their machine language equivalents.
Assigning machine addresses to symbolic labels used by the programmer.

What is meant by assembler directives? Give example.
These are the statements that are not translated into machine instructions, but they provide
instructions to assembler itself.
Example: START, END, BYTE, WORD, RESW and RESB.

3. What is forward references?


It is a reference to a label that is defined later in a program.
Consider the statement

The first instruction contains a forward reference RETADR. If we attempt to translate the
program line by line, we will unable to process the statement in line10 because we do not know the
address that will be assigned to RETADR .The address is assigned later(in line 80) in the program.

4. What are the three different records used in object program?


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.

5. What is the need of SYMTAB (symbol table) in assembler?


The symbol table includes the name and value for each symbol in the source program,
together with flags to indicate error conditions. Sometimes it may contains details about the data area.
SYMTAB is usually organized as a hash table for efficiency of insertion and retrieval.

6. What is the need of OPTAB (operation code table) in assembler?


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.

7. What are the symbol defining statements generally used in assemblers?


8EQU9-it allows the programmer to define symbols and specify their values directly. The
general format is symbol EQU value
8ORG9-it is used to indirectly assign values to symbols. When this statement is encountered the
 assembler resets its location counter to the specified value.
The general format
is ORG value
In the above two statements value is a constant or an expression involving constants and
previously defined symbols.

73
Department of Information Technology.
Downloaded by Kishore K (kishore22oct@gmail.com)
lOMoARcPSD|49454283

IT T46 SYSTEM SOFTWARE

8. Define relocatable program.


An object program that contains the information necessary to perform required modification
in the object code depends on the starting location of the program during load time is known as
relocatable program.

9. Differentiate absolute expression and relative expression.


If the result of the expression is an absolute value (constant) then it is known as absolute
expression, e.g.: BUFEND – BUFFER
If the result of the expression is relative to the beginning of the program then it is known as
relative expression. Label on instructions and data areas and references to the location counter values
are relative terms.
E.g.: BUFEND + BUFFER

Write the steps required to translate the source program to object program.
 Convert mnemonic operation codes to their machine language equivalents.
 Convert symbolic operands to their equivalent machine addresses
 Build the machine instruction in the proper format.
Convert the data constants specified in the source program into their internal machine
 representation
Write the object program and assembly listing.

What is the use of the variable LOCCTR (location counter) in assembler?
This variable is used to assign addresses to the symbols. LOCCTR is initialized to the
beginning address specified in the START statement. After each source statement is processed the
length of the assembled instruction or data area to be generated is added to LOCCTR and hence
whenever we reach a label in the source program the current value of LOCCTR gives the address
associated with the label.

12. Define load and go assembler.


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
A near jump is a jump to a target in the same segment and it is assembled by using a
current code segment CS.
 Far jump
A far jump is a jump to a target in a different code segment and it is assembled by
using different segment registers.

What are the use of base register table in AIX assembler?


A base register table is used to remember which of the general purpose registers are currently
available as base registers and also the base addresses they contain.
.USING statement causes entry to the table and .DROP statement removes the corresponding
table entry.

74
Department of Information Technology.

Downloaded by Kishore K (kishore22oct@gmail.com)


lOMoARcPSD|49454283

IT T46 SYSTEM SOFTWARE

Differentiate the assembler directives RESW and RESB.


RESW –It reserves the indicated number of words for data area.
E.g.: 10 1003 THREE RESW 1
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.
E.g.: 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.

16. Define modification record and give its format


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
Col 8-9 length of the address field to be modified in half bytes.

Write down the pass numbers (PASS 1/ PASS 2) of the following activities that occur in a two
pass assembler:
a. Object code generation
b. Literals added to literal
table c. Listing printed
d. Address location of local symbols

Answer:
a. Object code generation - PASS 2
b. Literals added to literal table – PASS 1
c. Listing printed – PASS2
d. Address location of local symbols – PASS1

18. What is meant by machine independent assembler features?


The assembler features that does not depends upon the machine architecture are known as
machine independent assembler features.
E.g.: program blocks, Literals.

19. How the register to register instructions are translated in assembler?


In the case of register to register instructions the operand field contains the register name.
During the translation first the object code is converted into its corresponding machine language
equivalent with the help of OPTAB. Then the SYMTAB is searched for the numeric equivalent of
register and that value is inserted into the operand field.
Eg: 125 1036 RDREC CLEAR X B410 B4-macine equivalent of the
opcode CLEAR 10-numeric equivalent of the register X.

20. What is meant by external references?


Assembler program can be divided into many sections known as control sections and each
control section can be loaded and relocated independently of the others. If the instruction in one
control section need to refer instruction or data in another control section .the assembler is unable to

75
Department of Information Technology.

Downloaded by Kishore K (kishore22oct@gmail.com)


lOMoARcPSD|49454283

IT T46 SYSTEM SOFTWARE

process these references in normal way. Such references between controls are called external
references.

21. Define control section.


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.

22. What is the difference between the assembler directive EXTREF and EXTDEF.
EXTDEF names external symbols that are defined in a particular control section and may be
used by other sections.
EXTREF names external symbols that are referred in a particular control section and defined
in another control section.

23. Give the general format of define record.


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.

24. Give the use of assembler directive CSECT and USE


CSECT - used to divide the program into many control sections
USE – used to divide the program in to many blocks called program blocks

25. What is the use of the assembler directive START?


The assembler directive START gives the name and starting address of the program. The
format is
PN START 1000
Here
PN –name of the program
1000-starting address of the program.

Downloaded by Kishore K (kishore22oct@gmail.com)


lOMoARcPSD|49454283

IT T46 SYSTEM SOFTWARE

Two Marks Questions


UNIT-3
1. What are the basic functions of loaders?
Loading – brings the object program into memory for execution
Relocation – modifies the object program so that it can be loaded at an address different from the
location originally specified
Linking – combines two or more separate object programs and also supplies the information
needed to reference them.

2. Define absolute loader


The loader, which is used only for loading, is known as absolute loader.
E.g. Bootstrap loader

3. What is meant by 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)

4. What are relative (relocative) loaders?


Loaders that allow for program relocation are called relocating (relocative) loaders.

5. What is the use of modification record?


Modification record is used for program relocation. Each modification record specifies the
starting address and the length of the field whose value is to be altered and also describes the
modification to be performed.

What are the 2 different techniques used for relocation?


Modification record method and relocation bit method.

Relocation bit method


If the relocation bit corresponding to a word of object code is set to 1, the program9s starting
address is to be added to this word when the program is relocated. Bit value 0 indicates no
modification is required.

8. Define bit mask


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 (111111111100) specifies that the first 10
words of object code are to be modified during relocation.

9. What is the need of ESTAB?


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.

10. What is the use of the variable PROGADDR?


It gives the beginning address in memory where the linked program is to be loaded. The
starting address is obtained from the operating system.

100
Downloaded by Kishore K (kishore22oct@gmail.com)
lOMoARcPSD|49454283

IT T46 SYSTEM SOFTWARE

Two Marks Questions


UNIT-5

1. Define Text-Editors
They are the primary interface to the computer for all types of <Knowledge workers= as they
compose, organize, study and manipulate computer-based information.

Give an overview of the editing process.

An interactive editor is a computer program that allows a user to create and revise a target
 document.
The term document includes objects such as computer programs, texts, equations, tables,
 diagrams, line arts and photographs-anything that one might find on a printed page.
Text editor is one in which the primary elements being edited are character strings of the
 target text.
The document editing process is an interactive user-computer dialogue designed to
accomplish four takes:

Select the part of the target document to be viewed and manipulated
Determine how to format this view on-line and how to display it.
Specify and execute operations that modify the target document.
Update the view appropriately.

Define Traveling.
Traveling – Selection of the part of the document to be viewed and edited. It involves first
traveling through the document to locate the area of interest such as <next screenful=,=bottom=, and
<find pattern=

Traveling specifies where the area of interest is;


Filtering: The selection of what is to be viewed and manipulated is controlled by filtering.

Filtering extracts the relevant subset of the target document at the point of interest, such as next
screenful of text or next statement.

Formatting: Formatting then determines how the result of filtering will be seen as a visible
representation (the view) on a display screen or other device.
Editing: In the actual editing phase, the target document is created or altered with a set of
operations such as insert, delete, replace, move or copy.

4. Explain the User-Interface of an Editor.


The user of an interactive editor is presented with a conceptual model of the editing system. The
model is an abstract framework on which the editor and the world on which the operations are based.
Some of the early line editors simulated the world of 80-character card image lines.

The Screen-editors define a world in which a document is represented as a quarter-plane of text


lines. Unbounded both down and to the right. The user sees, through a cutout, only a rectangular
subset of this plane on a multi-line display terminal. The cutout can be move left or right, and up or
down, to display other portions of the document.

5. Define Input Devices.

138
Downloaded by Kishore K (kishore22oct@gmail.com)
lOMoARcPSD|49454283

Department of Information Technology.

Downloaded by Kishore K (kishore22oct@gmail.com)


lOMoARcPSD|49454283

IT T46 SYSTEM SOFTWARE

Input Devices: The input devices are used to enter elements of text being edited, to enter commands,
and to designate editable elements.

INPUT DEVICES are categorized as:


Text or string devices are typically typewriter like keyboards on which user presses and
release keys, sending unique code for each key. Virtually all computer key boards are of the
QWERTY type.

Button or Choice devices generate an interrupt or set a system flag, usually causing an
invocation of an associated application program. Also special function keys are also available on the
key board.

Locator devices: They are two-dimensional analog-to-digital converters that position a


cursor symbol on the screen by observing the user9s movement of the device. The most common such
devices are the mouse and the tablet.

Define Data Tablet.


The Data Tablet is a flat, rectangular, electromagnetically sensitive panel. Either the
ballpoint pen like stylus or a puck, a small device similar to a mouse are moved over the surface. The
tablet returns to a system program the co-ordinates of the position on the data tablet at which the
stylus or puck is currently located. The program can then map these data-tablet coordinates to screen
coordinates and move the cursor to the corresponding screen position.

.Text devices with arrow (Cursor) keys can be used to simulate locator devices. Each of these
keys shows an arrow that points up, down, left, or right. Pressing an arrow key typically generates an
appropriate character sequence, the program interprets this sequence and moves the cursor in the
direction of the arrow on the key pressed.

Voice-input Devices: which translate spoken words to their textual equivalents, may prove to be
the text input devices of the future

7. Define Output Devices


The output devices let the user view the elements being edited and the result of the editing
operations. The first output devices were teletypewriters and other character-printing terminals that
generated output on paper. Next CRT (Cathode Ray Tube) technology which uses CRT screen
essentially to simulate the hard-copy teletypewriter. Todays advanced CRT terminals use hardware
assistance for such features as moving the cursor, inserting and deleting characters and lines, and
scrolling lines and pages.

8. What is Interaction Language?


Interaction Language: The interaction language of the text editor is generally one of several
common types.

The typing oriented or text command-oriented method is the oldest of the major editing
interfaces. The user communicate with the editor by typing text strings both for command names and
for operands. These strings are sent to the editor and are usually echoed to the output device.
Typed specification often requires the user to remember the exact form of all commands, or at
least their abbreviations.

Help facility have to be used or manuals have to be referred. Time consuming for in-
experienced users.

139
Department of Information Technology.

Downloaded by Kishore K (kishore22oct@gmail.com)


lOMoARcPSD|49454283

IT T46 SYSTEM SOFTWARE

2) Function key interfaces:


Each command is associated with marked key on the key
board E.g. Insert key, Shift key, Control key
Menu oriented interfaces
A menu is a multiple choice set of text strings or icons which are graphical symbols that
represent objects or operations

The user can perform actions by selecting items for the menus
The editor prompts the user with a menu

One problem with menu oriented system can arise when there are many possible actions and
several choices are required to complete an action.

9. Explain with a neat diagram the structure of an Editor.

Editing Editing
component buffer Editing
filter

Traveling Main
component memory

input Command
language Viewing
processor Viewing Viewing filter
component buffer

Paging
Routines

Output
devices Display File
component system

Control
Data
Typical Editor Structure
10. What is the Command Language Processor?
The command Language Processor accepts input from the user9s input devices, and
analyzes the tokens and syntactic structure of the commands. It functions much like the lexical and
syntactic phases of a compiler. The command language processor may invoke the semantic routines
directly. In a text editor, these semantic routines perform functions such as editing and viewing.

11. What are interactive debug systems?


An interactive debugging system provides programmers with facilities that aid in testing and
debugging of programs interactively.

140
Department of Information Technology.

Downloaded by Kishore K (kishore22oct@gmail.com)


lOMoARcPSD|49454283

IT T46 SYSTEM SOFTWARE

What are all the Debugging Functions and Capabilities?

One important requirement of any IDS is the observation and control of the flow of
 program execution
Setting break points – execution is suspended, use debugging commands to analyze the
 progress of the program, résumé execution of the program
Setting some conditional expressions, evaluated during the debugging session, program
execution is suspended, when conditions are met, analysis is made, later execution is
 resumed
A Debugging system should also provide functions such as tracing and trace back.

Downloaded by Kishore K (kishore22oct@gmail.com)


lOMoARcPSD|49454283

IT T46 SYSTEM SOFTWARE

Write the two passes of a linking loader. Pass1:


assigns address to all external symbols
Pass2: it performs actual loading, relocation and linking.

Define automatic library search.


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.

List the loader options INCLUDE &DELETE.


The general format of INCLUDE is
INCLUDE program name (library name)
This command direct the loader to read the designated object program from a library and treat
it as the primary loader input.
The general format of DELETE command is
DELETE Csect-name
It instructs the loader to delete the named control sections from the sets of programs loaded.

14. Give the functions of the linking loader.


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 into the memory.

15. Give the difference between linking loader and linkage editors.

16. Define dynamic linking.


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.

Write the advantage of dynamic linking.


It has the ability to load the routine only when they are needed
The dynamic linking avoids the loading of entire library for each execution

What is meant by static executable and dynamic executable?


In static executable, all external symbols are bound and ready to run. In dynamic executables
some symbols are bound at run time.

19. What is shared and private data?


The data divided among processing element is called shared data. If the data is not shared
among processing elements then it is called private data.

101
Department of Information Technology.

Downloaded by Kishore K (kishore22oct@gmail.com)


lOMoARcPSD|49454283

IT T46 SYSTEM SOFTWARE

Write the absolute loader algorithm.


Begin
Read Header record
Verify program name and length
Read first text record
While record type! = 8E9 do
Begin
Moved object code to specified location in memory
Read next object program record
End
Jump to address specified in End record

Downloaded by Kishore K (kishore22oct@gmail.com)

You might also like