Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

How many memory locations will be allocated to variable A and B by assembler.

Refer the
below sample assembly code? *

>>2 locations for 'A' and 1 location for 'B'

1 location for 'A' and 1 location for 'B'

1 location for 'A' and 2 locations for 'B'

2 locations for 'A' and 2 locations for 'B

'What is address of variable "VAR1"? 

437

>>>440

>>>442

444

An imperative statement in hypothetical assembly language is *

Represents an action to be carried out during assembly of input program

Allocates memory area to instruction and labels it with particular name

None of the above

>>>Represents an action to be carried out during execution time of assembled program

Macro calls are identified and expanded in Pass 1 of two pass Macro
preprocessor[True/False] *

>>>False

True

Which of the different design options are suitable to design macro preprocessor? *

Two pass macro preprocessor

Single pass macro preprocessor

>>All of these

Macro assembler
When memory is allocated to Literals in hypothetical assembler design? *

>>>At LTORG

None of these

At LTORG and after END

After END

A model statement contains call for another macro is called as *

Referential macro call

>>>Nested Macro

Inherited Macro

Inbuilt Macro

When expression sum=3+2 is tokenized then what is the token category of 3 *

Identifier

Addition Operator

>>>Integer Literal

None of the above

Which statement is employed to specify size of variable? *

DC

END

LTORG

>>>DS

If you compare Macro and function w.r.t the size of the program which one of the following
is correct? *

Macros increase the size of the program and function increases the size of the program

>>Macros increase the size of the program and function does not increases the size of the
program

Both will increase the size of the program

Macros doesn't increase the size of the program and function increases the size of the
program

Correct Syntax of using LTORG is *

LTORG L

LTORG 200

>>LTORG
200 LTORG

Which errors will be reported by pass-I of assembler? Solve the below problem for error
reporting. *

Invalid mnemonic

Undeclared variable 'Y'

Multiple declarations of 'X'

Invalid literal

Invalid opcode Y Undefined symbol Y duplicate definition of Symbol X.

What are the tasks to be carried out by Pass-I of two pass hypothetical assembler? *

·         >>Pseudo equ code eval,,,,,”” Separate the symbol, mnemonic opcode and operand
fields.
·         Determine the storage-required foe every assembly language statement and update the
location counter.
·         Build the symbol table and the literal table.
·         Construct the intermediate code for every assembly language statement.

””

target code generation

Intermediate code generation

code execution

literal processing

symbol management

MDT is the data structure generated in -------- of ------------- *

Pass1, Macro-preprocessor

>>Pass1, Assembler
Pass2, Macro-preprocessor

Pass2, Assembler

Consider sample assembly program: Which memory address will be allocated to SUB
instruction in below example? *

311

>>>310

202

201

What is a pass? *

>>>complete scan of program

target code generation

None of the above

intermediate code generation

Identify all the correct macro call statement for the following macro? *

INCR A, B, K1=C

>>INCR A, K1=C, B

INCR A, B, K1= 10, K2=20

INCR K2=20, B, A

Type checking is usually done by *

>>>>>>Semantic analysis

Lexical Phase

Code optimization

Syntax analysis

The ORIGIN directive is used for _________ *

To indicate the starting of the computation code

To list the locations of all the registers used

To indicate the purpose of the code


>>>>To indicate the starting position in memory, where the program block is to be stored

Identify the kind of parameters of A and C in the following macro defintion? *

>>Keyword Parameter, Positional Paramet

Keyword Parameter, Default Parameter

Default Parameter, Keyword Parameter

Positional Parameter, Default Parameter

In following list which statements are used for reserving memory for variables *

None of the above

>>>>>Declaration statements

Imperative statement

Assembler Directives

What is the purpose of SET statement in Macro definition? *

>>>To assign value to expansion time variable

To indicate the start of the program

To set the Macro expansion counter

To indicate the end of the program

Which technique is used to address forward referencing problem in single pass


assembler *

>>>Forward referencing

Backward referencing

Back patching

A statement which specifys the name of macro is -----------. *

A model statements

All of these

Macro pre-processor statement

>>>>A macro prototype statement


For the following macro what is the output when the macro call EVAL A, A, C is
expanded? *

None of these

MOVER AREG, C

MOVER AREG, A

>>MOVER AREG, A SUB AREG, A ADD AREG, C

Which of the two notions are concerned with macro expansion? *

@@Semantic expansion

>>Macro expansion

Macro call

@@Lexical substitution

In compiler, Source program is read by *

parser

>>>lexical analyzer

developer

analyst

Expansion time variables are used --- *

>>>Only during expansion of macro calls

Before expansion of macro calls

None of these

After expansion of macro calls

In the second pass, assembler creates _______in binary format for each instruction in
program then refers to the symbol table to giving every symbol an______ relating the
segment. *

Code and program

>>Code and offset


All of these

Program and instruction

Which are the following Imperative statements belonging to hypothetical assembly


language? *

>>READ

END

BC

STOP

The output of binder is stored in a file known as ______ *

None of these

>>Load module

Linkage editor

Module loader

Which of the following statements are true: *

>>More memory is required in case static linking is used

?>>>Static linking is performed during execution

Dynamic linking takes constant load time

Program size becomes larger in case dynamic linking is used

>>Dynamic linking is performed during execution

Multiple data segments and multiple procedure segments are handled by what kind of
loader? *

Assemble-and-go loader

>>>Direct linking loader

Absolute loader

Relocating loader

A Process Control Block(PCB) does not contain which of the following? *

Data

>>>Bootstrap program

Code
Stack

For Direct Linking Loader, information about external symbols such as Relative location
and length is maintained by an assembler in ----- type of card *

END

>>>>RLD

Relocation bits used by relocating loader are specified by *

>>>Linker

Compiler

Assembler

Relocating loader

Bootstrap loader is a what kind of loader *

>>>Absolute loader

Compile-and-go loader

Direct linking loader

Relocating loader

Which of the below are process control system calls? *

>> creating, load, abort, end, execute, process, terminate the process

>None of the above

open, close, read, write---file management

send, recv, listen, accept

fork, exec, wait, exit

For the following set of processes, with CPU burst given in milliseconds: Use RR
scheduling algorithm and calculate waiting time. What is the waiting time for process B? *

>>3 ms
5 ms

0 ms

4 ms

For the following set of processes, with CPU burst given in milliseconds:: What is average
turnaround time of SJF (Non preemptive) algorithm? *

4 ms

3 ms

>>0 ms

>>>5 ms

Assume a group of 'm' tasks to be run on single processor system with known runtimes
R1, R2,... Rn. Which of the following CPU scheduling strategies produces the most
throughput? *

Round-Robin

>>Shortest-Job-First

First-Come-First-Served

Highest-Response-Ratio-Next

Each process has its own __________ *

Open files

Address space and global variables

>>>All of these

Pending alarms, signals and signal handlers

Relocation and linking related information is maintained in what type of card in the design
of direct linking loader? *

TXT card

END card

>>>RLD card

ESD card

Which of statements below is correct? (I) Shortest remaining time first scheduling may
result in starvation (II) Preemptive scheduling may result in starvation (III) response time
with round robin is better than FCFS *

II and III only


I and III only

I only

>>>I, II and III

Round robin scheduling belongs to one of the following categories: *

None of the mentioned

Non-preemptive scheduling

All of the mentioned

>>>Preemptive scheduling

Which of the following is TRUE about Shortest Job First CPU Scheduling algorithm? R1: It
results in the shortest average waiting time. R2: It has potential to cause starvation *

Only R2

>>>Both R1 and R2

Neither R1 nor R2

Only R1

What type of details are held in ESD cards of direct linking loader *

All symbols which are defined in code that may be referenced outside the program & all
symbols referenced in this code but defined outside.

About address dependent entires

translated code of source program i.e. Object program

End of Object program

What happens after a process finishes? *

Its process control block is never de-allocated

Its process control block is de-allocated

>>It is removed from all queues

It is removed from all, but the job queue

Which system calls are used to spawn a process (Creation + loading/execution with
desired executable) *

>>>>fork() followed by exec()

wait()

Only exec()

Only fork()

exit()
Which of the following function is accomplished by an Absolute loader? *

>>>Relocation of object file created

Allocation

Loading

Linking

Which of the below are examples of bootloaders? *

ISOLinux

>>>>Das U-Boot(  BIOS, coreboot, Libreboot and Das U-Boot)

Grub

All of the above

What will be the input to loader? *

>>>>>C program(Highr lang C or fortan)

Object code

Assembly Program

None none of these

Linux kernel is of type: *

Microkernel

Nanokernel

Exokernel
>>>Monolithic

Degree of multiprogramming is contolled by ________ scheduler *

>>>Long term

Medium term

None of these

Short term

Which of the following is /are the functions of loader *

>>>All of these options

Relocation

Linking

Memory allocation

Loading
What is the use of EXTRN Psudo op ? *

None of these

To declare the symbols which are defined locally and can be used in other subroutines

To define local internal variables

>>>To declare the symbols which are externally defined in other subroutines

The part of the process dispatcher in the operating system that allocates processes
involves *

Assigning running processes to blocked queue

Allocating ready processes to waiting queues

>>>>Allocating ready processes to CPU

All of the mentioned

The problem of linking is solved by which design structures in relocating loader? *

Relocation mask

>>>>Relocation bits

Length of program

Transfer vector

What is the use of ENTRY statement in the design of direct linking loaders? *

To define the internal variables which can be used by another programs outside the program

To define the external variables

>>>>>>>>>To define local internal variables LOCAL DEF

To define global internal variables

Relocation loader BSS(Binary Symbolic Subroutine Loader) allows *

>>>>>>Many Program Segment but only one Data Segment

Only Data Segment

Only Program Segmen

You might also like