Download DEC 2004 SECTION –A (Marks : 2 Each) Q.1 (a) What is spooling

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
Transcript
DEC 2004
SECTION –A (Marks : 2 Each)
Q.1 (a) What is spooling?
Ans.:
Spooling: Spooling is nothing but ‘Simultaneous Peripheral operations on-line’.
It is a common solution to bottleneck problem.
In this all job output intended to be printed is saved either in memory, or more reasonably,
on a direct access (e.g Drum or disk) until the job is completed. The saved output is then printed
at high speed rather than intermittently spread over the entire duration of the job.
As long the otal printed output requirement s of all jobs can be handled by the printers, all
of the saved output will eventually be printed.
Q.1 (b) List advantage of binding at load time over binding at assembly time.
Ans.:


Binding is nothing but linking, it resolve symbolic Reference between object decks.
If Program is binded at a load time then it become smaller compared to binding at
assembly time.
Q.1 (c) What is loading of a program?
Ans. :
Loading of program is nothing but place process programs into memory and prepares them
for execution. The loader can perform this job. In a simple loading scheme, the assembler
outputs the machine language translation of a program on a secondary storage device and a
loader is placed in core. The loader place into memory the machine language version of the
user’s program and transfers control to it.
Q.1 (d) What is a look ahead pointer?
Q.1 (e) What is a symbol table?
Ans.:
Symbol table : (ST) It is used to store each literal encountered and it’s corresponding
assigned location/
Symbol table include for each entry not only the name and assembly – time value field but a
length filed and a Relative location indicator.
The length fields indicates the length (in bytes) of the instruction or datum to which the symbol
is attached.
eg.
Comma
DC C.’
F
DS F
In this the symbol comma has length I, F has length 4.
Q.1 (f) At what point of time do direct linking loading loader scheme perform binding?
Q. 1 (g) What are the various errors seen in a complier ? Explain
Ans.:

Lexical process can be done in one continuous pass through the data by creating an
intermediate form of the program consisting of chain or table of tokens. Alternatively,
some schemes reduces the size of the token table by only parsing tokens as necessary,

and discarding those that are not longer needed. Current compliers uses both of these
approaches. Either method of lexical analysis will discover and note Lexical error .
If the token is not terminal symbol , lexical analysis proceeds to classify it as a possible
identifier or literals. In PL/I these are strings that begin with an alphabetic character and
contain upto 30 more alphameric character or underscores. If a token does not fit into one
of these categories, it is an error and is flagged as such.
Q. (h)
What is a parse tree ?
Ans.:
Parse Tree: The representation of token in specific order is called parse tree. The syntaxanalzer will produce this parse tree.
The statement is PASCAL can be converted into token using lexical-analyzer and that token’s is
represented using parse tree by syntax- analyzer.
e.g. – statement is PASCAL:
if A> B then a := B+C else A:=B-C
Tokens for this is:
if, then, else - Keywords
A,B,C
- Identifier
?,+,- Operators
:=
- Assignment
Parse tree for that is :
Q.1 (i) What is the need for a grammar ?
Q.1 (j) What are the complier writing tools ?
Ans.:
Complier writing tools :



We can use LEX and YACC as a complier writing tools
LEX is a lexical Analyzer, its main Job is to breakup an input stream into more usable
elements or in, other words, to identify the ‘ interesting bits’ in a text file.
YACC is a parser, its job is to analyse the structure of the stream, the structure of the
stream, and operate of the ‘big picture’. In its normal work, the parsec also verifies that
the input is syntactically sound
SECTION-B (Marks : 5 Each)
Q.2 Explain the sequence of hardware operation performed with in the instruction
interpreter for the multiply instruction.
Q.3 Describe the function of each of the RLD, ESD, TEXT. And END CARD in a loader.
Q.4 Define the follwong:
(a) Multiprocessing OS
(b) Time sharing
(c) Multitasking
(d) Parallet OS
Q.5 What is a phase and a pass ? What are the major difference between the two ?
Q.6 Explain the flow chart of the pass II of a two pass assembler.
SECTION –C (Marks : 10 Each)
Q.7 What are the various features of networked operating system ? Explain by taking
example from the operating system of your choice.
Q .8 What are the various functions of loader ? During what stage of loading each of them
is performed in the different schemes of loaders?
Q.9 Write short notes on :
(a) Text editor
(b) Line editor
MAY 2005
SECTION-A (Marks: 2Each)
Q.1 (a) What do you mean by a multiwindow editor ?
Ans.:
Multi-window editor?
A multi window or multi screen editor is just an extension of the screen editor
In case of these kind of editors
A number of separate areas:
On the display – window
In the memory – Buffer
One can edit multiple files
Only one window, one buffer is active at a time, so the command issued will be valid to
only that buffer and the active window/
Rest of the thing is as applicable to screen editor.
Q.1 (b) Differentiate static relocation and dynamic relocation.
Ans.:
Static relocation : In Static relocating all the routing is loaded into memory.
The main – program is also loaded into man memory and execute it. If it require any routine any
routine or of it is having call to any routine and directly access that Routine form main-memory
Dynamic Relocating : To obtain better memory – space utilization, we can use dynamic
relocating.
In this the routine is not loaded until it is called.
All Routine are kept on disc in a Relocated load format. The main program is loaded into
memory and executed.
When a Routine needs to call another Routine the calling Routine first checks to see whether the
other Routine has been loaded. If tie has not been, the Relocated linking order is called to load
the desired routine into memory and to update the programs address table to Reflect this change.
Then, control is passed to the newly loaded Routine.
Q1 (c) What are the features required in assembly language to build a two-pass assembler?
Ans.:
We require the data structure and function to build a two-pass assembler
Data Structures are:
1.
2.
3.
4.
5.
6.
7.
Machine opcode table
Pseudo opcode table
Location counter
End of code segment and start of data segment Flag.
Input source program
Output program
Input program line number etc.
Functions are:
1.
2.
3.
4.
5.
6.
7.
8.
Read line
Write line
SearchMOT
SearchPOT
SearchST
ModifyLC
InitLC
Get Attr Forms ST etc.
Q.1 (d) What is the difference between a phase and a pass, a token and a uniforms symbol?
Give examples.
Ans.:
Phase: If the lot of work has been done in code generation, then the assembly ‘phase’ must
Resolve label References in the object program, format the object deck and format the
appropriate information for the loader.
Pass : In pass we can divide your program into different part in such a way that one part perform
one task. So if we want only the task of part 1 then execute only part -1. All parts need not be
executed.
Token : The source program is scanned sequentially, the basic elements of that program are
called as token.
Uniform symbol : The basic element are placed into tables. As other phases recognize the use
and meaning of the elements, further information is entered into these tables. Other phases of the
complier use the attributes of each basic element and must therefore have access to this
information. Either all the information about each element is passed to other phases, or typically ,
the source string itself is converted into a string of “Uniform symbols”.
Uniform symbol are of fixed size
Q.1 (e) In What phase is the elimination of common sub expressions performed? Why?
Ans.:
The tree task of the Lexical analysis phase are :
1. To parse the source Program into the basic elements or tokens of the language.
2. To build a literal table and an identifier table.
3. To build a uniform symbol table.
Theses tasks involve manipulations of five data base. Possible form for these are.
1. Source Program : Original form of program ; appears to the complier as a string of
character.
2. Terminal table: A permanent data base that has an entry for each terminal symbol. Each
entry consists of the terminal symbol, an education of its classification and its
precedence.
3. Literal Table: Created to describe all literal s used in the source program
4. Identifier table l Created to describe all identifiers used in the source program.
Q.1 (f) What is the use of IDE?
Ans.;
IDE: (Integrated Development Environment)
It is a type of computer software that assists computer programmers in developing software
IDE’s normally consist of a source code editor, a complier and interpreter, build- automation
tools, and a debugger.
Sometimes a version control system and various tools to simplify the construction of a GUI
are integrated as well.
Q.1 (g) What do you mean by shell and shell scripts ?
Ans.:
Shell : Shell is a unix terms for the interactive user interface with an operating system. The shell
is the layer of programming that understands and executes the commands a user enters. A shell
usually implies a interface with a command syntax.
Shell scripts : Normally shells are interactive. It means shell accept command form you and
execute them. But if you use command one by one, then you can store this sequence of command
of text file and tell the shell to execute this text file instead of entering the commands, this is
known as shell-script
Q.1 (h) Differentiate LEX and YACC.
Ans.:
LEX: LEX officially known as a ‘Lexical Analyser.’ Its main job is to break up an input stream
into more usable elements or in, other words, to identify the “interesting bits” in a text file.
YACC: YACC officially known as a “parser”. Its job is to analyse the structure of the input
stream and operate of the “big picture”. In its normal work, the parser also verifies that the input
is syntactically sound.
Q1. (i) What are the different problems with the layered OS model? Define microkernel.
Ans.:
Microkernel: Linux modules are in the same address space as the kernel. In a micro-kernel
‘modules’ are in their own address space. This in not in OSF/Mach mklinux..
Problems with layered OS model :
Single input queue (SIQ) : GUI application was not servicing its window message, the entire
GUI system could get stuck and a Reboot was required.
No unified command line: In OS programs divides into strict categories was problematic.
1. No unified object handles: The availability of threads probably lead system designers to
overlook mechanisms which allows a single thread to wait for different types of
asynchronous events at the same time
Q.1 (j) What are different language processor development tools widely used in practice ?
Ans.;
1. ALE (Attribute Logic Engine): It is a environment that integrates phrase structure parsing
and constraint logic programming with typed feature structures.
2. CG parser : It is a liner parser of conceptual graphs. It was written using the YACC
complier generator utility.
3. CHARON : It is an environment for the development and testing of LFG grammar.
4. Conc : It is used for producing concordances of texts.
5. ELIZA : This is classic NIP program by weizenbaum. It allows for a simple first
assignment in NLP.
Q.2 Explain the different phase of the complier.
Q.3 Explain the pass structure of assembler. Make a flowchart for implementing one-pass
assembler.
Q.4 What is the purpose of the code-generation phase ? Explain with example.
Q.5 What are the various debugging techniques ?
Q.6 What is the requirement of optimization ? Discuss machine – indiependent
optimization techniques
SECTION-C (Marks :10 Each)
Q.7 What are the various loader schemes ? Explain each scheme with the help of a
diagram.
Q.8 (a) What is the difference between binder and overlays ? Define dynamic loading
(b) What is Parsing ? Construct the parse tree for the flowing using BNF grammar: X
=U-V x W+X/Y.
Q.9 (a) Explain the intermediate code generation taking one example.
(b) write short notes on the following:
(i) CLSC (II) FSA.
MAY 2006
SECTION – A (Marks : 2 Each)
Q.1 (a) What is Window Editor?
Q.1 (b) What is vi Editor?
Q.1 (c) What is Bug?
Ans.:
Bug: An error or defect in software or Hardware that causes a program malfunction. Often a bus
is caused by conflicts in software when applications try to Run in tandem.
Q.1 (d) What is Code generation?
Ans.:
Code – generation : The code – generation is nothing but the production of appropriate code, that
code is either assembly or machine language. In computer, the code generation phase has the
matrix as input. It uses the code productions (macro – definitions) which defines the operators
that may appear in the matrix to produce code. It also references the identifier tables and literal
tables in order to generate proper address and code conversions.
Q.1 (e) Define Time sharing?
Ans:- Time sharing: Time sharing is one method of allocating processor time. It is typically
characterized by interactive processing and time slicing of the CPU’s time to allow quick
response to each user.
Q.1 (f) What is meaning of Finite automata?
Ans.: Finite automata: Finite automata is a technique used to design Lexical – Analyzer
(scanner).
It is having five tuples:
(i)
A set of input alphabets (symbols)
(ii) A set of finitely many states
(iii) A distinguished unique state called `start state’
(iv) A set of distinguished states called `accepting state’
(v) A set of state transitions.
Purpose of FA is:
Input :
A given FA, and string x of input symbols
Output: Acceptance or Rejection of x.
Finite state automation M can be deterministic (DFA) or nondeterministic (NFA).
Q.1 (g) What is Lexical analysis?
Ans.: Lexical Analysis:
1. It is the first interface between the source program and the compiler.
2. Reads the source program character by character, here whether to read a character from a
file or read in bulk from a file and store it in an array and then read from an array
character by character.
3. Exposes the linear lexical structure.
4. Recognizes the logically cohesive units, so called as “Lexemes” or “tokens.”
5. Tokens could be keywords, identifiers, operators, labels. Punctuation symbols etc.
Q.1 (h)
Ans.:
What is Sub-routines?
Sub – routines:
1. Sub – routines is nothing but separate – modules of the system. The mechanisms
provided by loaders allows us to bind together separate program modules.
2. The most important aspects of system – design is the ability to design, implement, and
debus separate modules of the system.
3. To bind together separate program modules is called subroutines or procedures.
Q.1 (i)
What is Assembly Language?
Ans.:
Assembly language: It is the mnemonic version of the machine language (abstraction of machine
language). It is still one level away from the machine but still one must know the machine
architecture details to use it. It is called as a 2nd generation language. Whenever there is a
machine, there is an assembly language. It is not natural. It is not portable.
Q.1 (j)
What is Booting?
Ans.:
Booting: To boot a computer is to load an operating system into the computer main memory or
RAM. Once the operating system is loaded it’s ready for users to run applications. Sometimes
you shall see an instruction to `Reboot’ the operating system. This simply means to reload the
operating system.
A cold boot is when you turn the computer on from an off position. A warm boot is when you
rest a computer that is already on
SECTION – B (Marks : 5 Each)
Q.2 What is the difference between the Lexical Analysis and Syntax Analysis?
Q. 3 Explain Intermediate Code generation.
Q.4 Explain Code Optimization techniques.
Q.5 Explain different types of Compilers.
Q.6 Explain case study of Linker in X86 machines.
SECTION – C (Marks : 10 Each)
Q.7 Explain various debugging techniques.
Q.8 What is linking? What is the use of linking? Explain briefly.
Q.9 What is operating system? Explain various operating system briefly.
DEC. 2005
SECTION – A (Marks : 2 Each)
Q.1 (a) What do you mean by a multi-window editor?
Ans.:
Multi-Window editor is an editor which allows user to open multiple (i.e. more than one
window) and editing in those windows.
Q.1 (b) Differentiate static relocation and dynamic relocation.
Ans.:
Static Relocation means that the loader adjusts addresses before the program starts executing, but
instead of relocating a program’s addresses when it is loaded, we relocate them while it’s
running is called dynamic relocation.
In static relocation programs can interface with one another and operating system. A bug in one
program can cause another to crash. But in dynamic relocation if we limit the size of program’s
VAS, programs cannot access each others memory. This prevents one program from crashing
another.
Q.1 (c) What are the features required in assembly language to build a two-pass
assembler?
Ans.: In order to build a two pass assembler a assembly programming language should support
macro processing, file inclusion.
Its definition should be independent of any particular hardware or operating system.
Q.1 (d) What is the difference between a phase and a pass, a token and a uniform
symbol? Give examples.
Ans.:
A pass is nothing but one complete cycle of operations and phase means a specific part of
process.
A Token is sequence of characters considered a single unit by shell. It is either a word or an
operator.
Q.1 (e) In what phase is the elimination, of common sub expressions performed? Why?
Ans.:
Common sub expression elimination is performed code optimization phase.
Q.1 (f) What is the use of IDE?
Ans.:
IDE is used as common disk interface for hard drives, CD-ROM drives etc. It is easy to
use IDE combines the editor, complier and other useful tools in same software package. Its
advantage is that when a program with syntax errors is complied the programmer sees the error
messages and the original program at same time. … This makes debugging much easier.
Q. 1 (g) What do you mean by shell and shell scripts ?
Ans.:
A shell of an operating system is a program that presents an interface to various operating
system functions and services. The shell is so called because it is an outer layer of interface
between the user and innards of the operating system.
A shell script is a script written for shell or command interpreter of an operating system.
And a script is nothing but a program containing set of executable commands.
Q.1 (h) Differentiate LEX and YACC.
Ans. :
Lex is lexical analyzer which helps write programs whose control flow is directed by
instances of regular expressions in the input stream. Yacc provides general tool for describing
the input to a computer program. The Yacc user specifies the structures of his input, together
with code to be involved as each such structure is recognized.
Q.1 (i) What are the different problems with the layered OS mode? Define microkernel:
Ans.
Problems are : Sooner or later you loose touch with reality. Layers are abstraction
boundaries, and the more they encapsulate their works the more on is unaware of application
inner works.
Layering can lead to poor performance.
Change to one layer resulting in change to every other layer, which is an e expensive and
error prone proposition.
Microkernel : A system kernel that runs itself in protected memory space and all processes in
separate memory space allowing for better stability.
Q (j) What are different language processor development tools widely used in practice?
Ans.:
Tools are as follows :
1.
2.
3.
4.
5.
LADE – language Definition Environment
ALE- Attribute logic Engine
CHARON
ELIZA
Conc
etc.
SECTION –B ( Marks : 5 Each)
Q.2 Explain the different phases of the complier.
Q.3 Explain the pars structure of assembler ? Make a flow chart for implementing onepass assembler.
Q.4 What is the purpose of the code-generation phase ? Explain with example.
Q.5 What are various debugging techniques?
Q.6 What is the requirement of optimization ? Discuss machine independent optimization
techniques.
SECTION –C (Marks : 10 Each)
Q.7 What are various loader schemes? Explain each scheme with the help of a diagram.
Q.8 (a) What is the difference between binder and overlays ? Define dynamic loading.
(b) What is parsing ? Construct the parse tree for the following using BNF grammar:
X := U-V x W+ X/Y
(i) CISC
(ii) FSA
DEC. 2006
SECTION-A (Marks : 2 Each)
Q.1 (a) What is window editor?
Ans. :
It is a multipurpose text – editor for the window system, which combines a standard; easy a use,
graphical user interface with the thorough functionality and stability required by users who edit
text. It provides intensive support- for development in a wide variety of languages, testprocessors and other tools and so on.
Q .1 (b) What is Vi editor?
Ans. :
Vi is default- visual editor under unix and therefore shipped with all recent- version of unix.
This means that wherever we can run across a machine that is running a unix of some sort, you
will know that we have a powerful editor, at your finger tips Vi is a very powerful editor, Also
once you know vi, you can edit files really quickly, as it is extremely economical with the
keystrokes.
Q.1 (c) What is Bug ?
Ans.:
An error or defect in software or hardware that cause a program to malfunction. Often a but is
caused by conflicts in software when application try to run in tandem . A comuter but is an
error, flaw, mistake, failure, or fault in computer program that prevents it from working
correctly or produces an incorrect result. Bugs arise from mistakes and errors, made by people, in
either a program’s source
Code or its design. It is said that there are bugs in all useful computer programs, but well-written
programs contain relatively few bugs, and these bugs typically do not prevent the program from
performing its task.
Q. 1 (d) What is code generation ?
Ans. :
In computer science, code generation is the process by which a complier converts a
syntactically correct program into a series of instruction that could be executed by a machine.
The input to the code generation stage typically consists of parse tree, abstract syntax tree, or
intermediate language code; the target machine may be a physical machine such a
microprocessor, or an abstract machine such as a virtual machine or an intermediate language.
Q.1 (e) What is time sharing?
Ans. :
Time-sharing is an approach to interactive computing in which a single computer is used to
provide apparently simultaneous interactive general-purpose computing to multiple users by
sharing processor time also it refers to the concurrent use of a computer by more than one userusers share the computer’s time. Time sharing is synonymous with multi-user. Almost all
mainframes and minicomputers are time-sharing systems, but most personal computer and
workstations are not.
Q. (f) What is meaning of Finite Automata ?
Ans .:
A finite state machine (FSM) or finite automaton is a model of behavior composed of states,
transition and action. A state stores information about the past, i.e. reflects the input changes
from the system start to the present moment. A transition indicates a state change and is
described by a condition that would need to be fulfilled to enable the transition. An action is a
description of an activity that is to be performed at a given moment, also Finite automata are
computing devices that accept/recognize regular languages and are used to model operations of
many systems we find in practice. Their operations can be simulated by a very simple computer
program.
Q. 1 (g) What is lexical analysis ?
Ans. :
Lexical analysis is the process of taking an input string of characters (such as the source code of
computer program) and producing a Sequence of symbols called “lexical token”. Or just
“jokens”, Which may be handled more easily by a parser.
Q.1 (h) What is sub-routine?
Ans.:
In computer science, a subroutine (function, method, procedure, or subprogram) is a portion of
code within a larger program, which performs a specific task and is relatively independent of
the remaining code. The syntax of many programming languages includes support for creating
self contained subroutines, and for calling and returning from them.
Q.1 (i) What is assembly language)
Ans.:
An assembly language is a low-level language used in the writing of computer programs.
Assembly language uses mnemonics abbreviations or words that make it easier to remember a
complex instruction and make programming in assembler an easier task. The goal of using
mnemonics in the writing of assembly language programs is to replace the more error prone.
And time consuming. Effort of directly programming in a target computer’s numeric machine
code that had been used with the very first computers. An assembly language program is
translated into the target computer’s machine code that had been used with the very first
computer. An assembly language program is translated into the target computer’s machine code
by a utility program called an assembler. (An assemble is distinct from a compiler, in that it
generally performs one-to-one (isomorphic) translation from mnemonic statements into machine
instructions). Translators that take an entire program and translate it as a body are called
compilers. Translators that take one line at a time are called interpreters. Translators that
translate assembly language programs into machine language are called assemblers.
Q.1 (j)
What is Booting?
Ans.:
In computing, booting is a bootstrapping process that starts operating systems when the
user turns on a computer system. A boot sequence is the set of operation system. A computer’s
automatic start-up routine when it is switched on or reset; the boot program is normally stored on
ROM and is responsible for loading the operating system; derived from the saying “picking the
system up by its boot-straps.”
SECTION – B (Marks : 5 Each)
Q.2 What is the difference between the lexical and syntax analysis?
Q.3 Explain intermediate code generation.
Q.4 Explain code optimization techniques.
Q.5 Explain different types of compilers.
Q.6 Explain case study of Linker in x86 machines.
SECTION – C (Marks : 10 Each)
Q.7 Explain various debugging techniques.
Q.8 What is linking? What is the use of linking explain briefly?
Q.9 What is operating system? Explain various operating systems briefly.
(a) What is protocol?
(b) What is error detection?
(c) What is subnet?
(d) What is E-mail?
(e) What is correction?
(f) What is network lanes?
May 2007
SECTION – A (Marks : 2 each)
Q.1 (a) Define relocation bits?
Ans.:
Relocation bits:
For simple machines.
Relocation bit


0: no modification is necessary
1: modification is needed
Twelve-bit mask is used in each text record



since each text record contains less than 12 words
unused words are set to 0.
Any value that is to be modified during relocation must coincides with one of these 3byte segments.
For e.g. line 210
Q. 1 (b) Differentiate between pseudo-op and machine-op?
Ans.:
Pseudo-op:
Allows the user to specify a base address and assign a base register number, pseudo-op specifies
an expression as a base address, and assigns a base register, assuming that the register parameter
contains the program address of expression at run time. Symbol names do not have to be
previously defined.
Generally, op-codes can be classified into machine op-code and pseudo-code. Each machine opcode has a corresponding hardware instruction. Examples include, MOV, ADD, JMP, LOOP,
CMP etc. some pseudo-op-codes are:
Char
DB
`A’
Hours
DB
24
Year
DB
1997
Q.1 (c ) What is Program counter?
Ans.: Program counter: Program counter indicates the address of the next instruction to be
executed for this process.
Q.1 (d) What is the use of Macroinstructions?
Ans.: Macroinstructions: A macro is an abbreviation for a sequence of operation. e.g. A 1,
DATA Add contents DATA to register 1
Q.1 (e) What are Dummy arguments?
Ans.: Dummy arguments: Dummy arguments are specified in the argument list in a procedure
definition. They define the number type, kind and rank of the actual arguments.
Q.1 (f)
What is the use of LTORG operation?
Ans.: Use of directive LTORG:
Create a literal pool that contains all of the literal operands used since the previous LTROG and
place it where LTORG was encountered.
Q.1 (g)
What is the use of IDE?
Ans.: IDE is integrated development environment, it used for given graphical user interface.
Q.1 (h) Define Microkernel?
Ans.: Microkernel: Microkernel is a minimal computer operating system kernel which provides
no operating system services at all, only the mechanisms needed to implement such services,
such as low-level address management, thread management, and inter process communication
(IPC).
Q.1 (i)
Elimination of sub expression is performed in which phase? Explain briefly.
Ans.:
A method for performing global common sub expression eliminate is done within
the code optimization phase of compiler.
Q.1 (j) Differentiate between a phase and a pass.
Ans.: Phase:
Compiler basically grouped into two distinct phases (i) Analysis (ii) Synthesis. Phases are
actually the grouping activities, after every application of a phase the form of the source program
is modified.
Pass.:
It is activity of scanning the file (read source or intermediate) and producing an output as a file
(read target code file or intermediate representation). It is desirable to have relatively few passes.
SECTION – B (Marks : 5 each)
Q.2 What is difference in function between BALR and USING instruction? What happens
to each at assembly time and at execution time?
Q. 3 What are absolute loaders? Explain.
Q.4 Draw a block diagram of the phases of a complier and indicate the main functions of each
phase?
Q.5 What is the requirement of optimization? Discuss machine-independent optimization
techniques.
Q.6 List and explain the main functions of operating system?
SECTION – C (Marks : 10 each)
Q.7 Design a two pass assembler with help of neat flow charts.
Q.8 Minimize the following switching function:
(a) What is conditional macro-expansion? Explain.
(b) What is difference between binder and overlays? Define dynamic loading.
Q.9 Differentiate between the following:
(a)
Interpreter and complier
(b) Top down and Bottom up parsing.
(c) Single pass and two pass assemblers.
Dec 2007
SECTION – A (Marks : 2 each)
Q.1 (a)
What is the use of BALR instruction?
Ans.: BALR instruction will branch to the address in R2. Before the branch takes place the
address of the next instruction in your program following the BALR instruction in placed in R1.
If the second operand (R2) contains 0 no branch will take place into the location counter. It then
branches to the address specified. By using register 0 in the BALR instruction we effectively did
not branch anywhere causing the next instruction address to be loaded into register.
Q.1 (b) Differentiate between pseudo-op and machine-op.
Ans.:
A mop is translated into an instruction, a pseudo op is not and a macro call is usually
expanded into many statement defined as a macro body. A pseudo op is referred to as an
assembler directive because it passes information to the assembler. A pseudo op does not
generate code except define constant or define storage. A define constant code generates data in
memory with a specific bit pattern, while a define storage code merely reserves a memory block
with whatever bits in it. The term constant is similar to a mathematical constant except in
assembly programming the defined constant can be changed by instructions in a program at run
time.
In a mop statement, the operand field specifies how to locate the operand. For define constant,
the operand field specifies the bit pattern. There may be zero, one, or more operandi separated by
commas as the delimiter. The fourth field is comment which is optional. Each comment begins
with a semicolon (; and may start in column one as a separate line.
Q.1 (c) What is instruction counter?
Ans.:
Instruction Counter (IC):
A register in the CPU that holds the address of the next instruction to be executed.
Q.1 (d)
List the steps followed to design an assembler.
Ans.: To design an assembler following steps to be consider:
(a) Problem statement:
(i)
Generate instructions
(ii) Process assembles directive
(b) Identification of data structure:
(i)
Symbol table
(ii) Mnemonics table (MOT)
(iii) Pseudo-opcode table
(c) Phases of processing
(d) Algorithm.
Q.1 (e)
What are dummy arguments?
Ans.: The following sections provide more detailed information about these types of dummy
arguments:




Scarlars
Arrays
Derived types
Pointers

Q.1 (f)
Ans.:
Procedure names.
What are advantages of direct linking loader?
Advantage:
Simple, developing environment.
Q.1 (g)
What is the use of IDE?
Ans.: In computing, an integrated development environment (IDE) is a software application that
provides comprehensive facilities to computer programmers for software development. An IDE
normally consists of a source code editor, a complier and/or interpreter, build automation tools,
and (usually) a debugger. An IDE normally consists of a source code editor, a compiler and/or
interpreter, build automation tools, and (usually) a debugger. Sometimes a version control
system and various tools are integrated to simplify the constructions of a GUI. Many modern
IDEs also have a class browser, an object oriented software development.
IDEs are designed to maximize programmer productivity by providing tighty-knit components
with similar user interfaces, thus minimizing the amount of mode switching the programmer
must do comparing to loose, discrete collections of disparate development programs.
Q.1 (h)
What are different types of cards produced by assembler?
Ans.: MMC such as used in digital cameras and the like, memory cards, smart cards and personal
computer memory and international association (PCMCIA) cards. In the industry, these types of
cards are sometimes referred to collectively as “semiconductor cards,” “multimedia cards” or
“daughter boards.”
Q.1 (i) Elimination of subexpression is performed in which phase?
Explain briefly: Symmentic Analysis Phase.
Ans.:
In symmetric analysis phase subexpression eliminate.
Q.1 (j)
Database required during compiler design:
1.
Source program
2.
Terminal table
3.
Literal table
4.
Identifier table
5.
Uniform symbol table.
SECTION – B (Marks : 5 each)
Q.2 What are macro-instruction arguments? Explain.
Q.3 Explain two pass direct-linking loader scheme with the help of a block diagram.
Q.4 Explain the difference between linker and loader. Also discuss their role.
Q.5 What is the requirement of optimization? Discuss machine-independent optimization
techniques.
Q.6 List and explain various debugging techniques.
SECTION – C (Marks : 10 each)
Q.7 Specify all the steps in producing a single pass assembler and give the detailed
flowchart.
Q.8 What are the various loader schemes? Explain each scheme with help of a diagram?
Q.9 Differentiate between the following:
(a)
Binder and Overlays.
(b) Compiler and interpreter.
(c) Top down and Bottom up parsing.