50% found this document useful (2 votes)
171 views6 pages

CST265: System Programming Question Bank UNIT-1

System software includes operating systems and utility programs that manage computer hardware and provide common services for application software. Assemblers are system programs that translate assembly language instructions into machine code. Assemblers use various data structures like symbol tables, mnemonic tables, and intermediate code to facilitate the translation process across multiple passes. Linking combines object files into an executable program and resolves symbolic references, while loading transfers the executable program into memory for execution.

Uploaded by

aattish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
50% found this document useful (2 votes)
171 views6 pages

CST265: System Programming Question Bank UNIT-1

System software includes operating systems and utility programs that manage computer hardware and provide common services for application software. Assemblers are system programs that translate assembly language instructions into machine code. Assemblers use various data structures like symbol tables, mnemonic tables, and intermediate code to facilitate the translation process across multiple passes. Linking combines object files into an executable program and resolves symbolic references, while loading transfers the executable program into memory for execution.

Uploaded by

aattish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

CST265: System Programming

Question Bank
UNIT-1
1. What do you understand by the term System Software? 3
2. What is the importance of system software in a computer system? Give an
example of a system software and explain how the overall performance of the
system depends on it. 4 + 3
3. How will you classify a software as either an application software or a system
software? 3
4. Would you consider a text editor such as vi a system program or an application
program? Justify. 1 + 3
5. How would you classify system software? In which categories would you put
language processors and operating systems? Why? 3 + 3
6. Why is "assembler" considered as a system program? 2
7. What are the benefits of using "language processors? 5
8. What are the various language processing activities in the domain of system
software? What do you understand by cross-compilation? 4 + 3
9. Mention some advantages of assembly language over machine language. 5
10.What are some advantages of assembly languages over high level languages? 3
11. In an environment such as UNIX, several programs reside in the system
simultaneously, and programs may be invoked by various users in any arbitrary
order. How does assembly language or a high level language facilitate
preparation of programs for such environments? 5
12.What are assembler directives in assembly languages ? Illustrate with an
example the importance of assembler directives. 3 + 3

13.Consider the following program segment in a hypothetical assembly language.


(Contents of a line after a semicolon are comments and are to be ignored during
assembly) 2 + 2 + 2 + 2
A
AGAIN:

DS 2
MOV A, 10
CALL PRINT
DEC A
JNZ AGAIN

; allocate 2 bytes for A


; put 10 in var A
; call subroutine PRINT
; decrement the contents of A by 1
; continue at AGAIN if previous
; operation produces zero

14.(i) Indicate which type is each of the above statements of.


(ii) How many machine instructions will be produced due to the above
program
?
(iii) What will be the contents of the main data structures during the
assembly process ? (Indicate the entries, the exact values are not
important)
(iv) Which instructions are address sensitive in the above program
segment ? Why ?
15.Why is it useful to perform the assembly process in multiple passes? Give an
outline of the division of activities among the passes of a multi-pass
assembler. 3 + 4
16.What are the activities performed in the analysis phase and synthesis phase of
an assembler ? 4
17.Draw a block diagram to show the steps involved in a two-pass assembler,
indicating where the important data structures are built and used. What are the
various fields and their types in the different data structures? 8 + 5
[Hint: First draw a rough sketch in half a page]
18.What are the main data structures necessary for an assembly scheme? State the
purpose of each of them. 2 + 2
19.What is the role of a mnemonic table in an assembler? What all information
may be maintained in it ? When is a mnemonic table built ? Describe a possible
organization of a mnemonic table (using C language if necessary). 2 + 3 + 1 +
4
20.What is location counter processing ? Why and how is location
counter processing performed by an assembler? 3 + 4

UNIT-2
21.Briefly describe a possible sequence of steps of an assembler. What is a major
difference between the creation of a mnemonic table and that of a symbol
table ? 5 + 2
22.What does lexical analysis mean? Give a possible outline of a lexical analyser
program/module (you may assume C programming language for the
purpose). 2 + 5
23.What is a commonly used and convenient method of creating an efficient
lexical analyser (mention important steps in this method)? 4
24.What is "flex" ? 3
25.What is flex used for ? Write the regular expression that describes a word that
has a sequence of hexadecimal digits followed by a dot and then another
sequence of hexadecimal digits. The word may optionally have a hyphen as a
prefix. Give two examples of such words. 2 + 2 + 1
26.Why is a symbol table used by an assembler ? Give a possible format of a
symbol table record and state why you would use either an array, a hash table,
or any other data structure to keep these records. 5
27.What are the different stages in which a symbol table is accessed during an
assembly process ? Write C statements to define a possible symbol table. 3 + 4
28.Suppose an assembly language allows the use of literals and literals can be
alloted memory space either at the end of the program code or at places
corresponding to ``LTORG" statements in the program. Describe how this can
be handled by an assembler. 7
29.Using a small segment (less than 10 statements) of an assembly language
program as an example, show the contents of the symbol table and the literal
table after an assembler performs analysis of the program. What do you
understand by forward reference ? 6 + 2
30.Why is Intermediate code needed in the translation process by an assembler ?
Describe a suitable format for intermediate code. 3 + 3
31.Give a small example that explains the usage and need of "table of incomplete
instructions". 5

32.Assume a statement in an assembly language program - 5


LIR 4, TERM
How will you represent this in intermediate code between two passes of an
assembler. Justify the representation assuming any suitable format for the
intermediate code.
33.What are some of the errors that an assembler should detect? What course of
action should the assembler take when it detects an error? 3 + 3
34.Why do programming languages provide the macro feature despite the
procedure call mechanism ? How does it affect the size and efficiency of the
machine language program generated? 3 + 3
35.Compare the two features - macro and subroutines in a programming
language. 5
36.What do you understand by conditional expansion during macro processing ?
4
37.Give a small example to show the use of a macro in some hypothetical
assembly language. Your example should contain parameters and conditional
expansion statements. 5
38.What are positional parameters, keyword parameters and expansion time
variables in macros ? Give a smple example to show their usage. 6 + 2
39.What data structures may be used for macro expansion? Explain.

4+5

40.What are the various methods of binding formal and actual parameters in
macros ? How is parameter passing in macros different from that in subroutines
? 3+3
UNIT-3
41.How are "expansion time variables" in macros different from normal program
variables? 3
42.What do you understand by the terms linking and relocation? What
requirements do these tasks put on the translation process? 5
43.How can program relocation be performed? 4

44.What is relocation factor ? 3


45.How do the segment registers in Intel 8086 processor affect the relocation
requirements of program generated for it ? 4
46.Why is "linking" required after a program is translated? 3
47.What does the term object file mean in context of program linking? What
are shared objects ? 3 + 3
48.Briefly explain the phenomena of static and dynamic linking. Why is dynamic
linking generally preferred? 5 + 3
49.What are the advantages of "dynamic linking" over "static linking"? What kind
of additional information processing (i.e., book keeping) does it require to
support dynamic linking ? 5 + 5
50.What is "lazy binding" in UNIX? 4
51.Briefly describe the dynamic linking scheme in MS Windows. 5
52.Explain with a small example how linking and loading of a required module of
a program can be done depending on the runtime conditions during the
program's execution. 6
53.Briefly describe the dynamic linking scheme in UNIX. 5
54.Why is relocation required during static linking? 3
55.What does a assembler do to facilitate linking? 3
56.What is a Module Table in MS Windows? What are some of its important
components? 4
57.Briefly describe the ActiveX feature in MS Windows 5
58.What is an activation record and why is it used? Why are activation records
maintained in a stack ? 4 + 2
59.What are some of the optimisations that can be performed by a compiler?
Which kind of optimisation is more effective inside loops - space optimisation
or time optimisation ? Why ? 5 + 2

60.Why is optimization attempted by a compiler but not by an assembler ? 3


61.What are the major stages in the process of compilation? 5
62.What does parsing mean in the context of compilers? 3
63.Describe the syntax for a variable definition statement in C language for simple
scalar variables using Context Free Grammar. Give the rightmost
derivation sequence for the statement - 4 + 2
short a, count, *p;
64.Why is the feature of putting "break points" very important in debuggers? 3
65.Propose a suitable data structure scheme for an interactive text editor. 6
66.What are some essential features in program debuggers ? How can these be
implemented ? 3 + 3
67.What are input-output redirection and pipes in shells in UNIX ? 5
68.Briefly describe the UNIX utilities - make, sed, rcs.

5+5+5

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy