IMP questions for System programming for GTU

9
Unit-1 : System Software & Unit-2 : Language Processors 1. What is System software/program? [GTU,BE-CE,Dec-2014] [DEC- 2015] 2. Define Language Processor. List various phases of a language processor. Explain roles of phases of Language Processor.[GTU,BE-CE,Dec-2014][DEC-2015][May- 2016] 3. Explain Symbol table and Mnemonics table with suitable example.[GTU, BE-CE, June- 2013][DEC-2015] 4. Briefly explain the tasks performed by analysis and synthesis phases of simple assembly schemes.[GTU,BE-CE,June-2013] [GTU,BE-CE,May-2014] 5. Explain various suitable data structures for the symbol table. Explain how one can organize Symbol table using Linear Data Structure.[May-2016] 6. Compare Problem oriented and Procedure oriented languages. [GTU,BE-CE,May- 2014][DEC- 2015] 7. Explain various types of Language Processors. 8. Differentiate passes and phases of complier. Explain in brief syntax analysis phase.[GTU,BE-CE,May-2015] 9. Explain following : a) Semantic Gap b) Specification Gap c) Execution Gap[DEC- 2015] 10. Explain the various stages of the life cycle of a source program with a neat diagram.[DEC- 2015] 11. Explain language processing activities [DEC-2015] 12. Compare user-centric view and system-centric view of system software[May-2016] Unit-3 : Assembler

Transcript of IMP questions for System programming for GTU

Page 1: IMP questions for System programming for GTU

Unit-1 : System Software & Unit-2 : Language Processors

1. What is System software/program? [GTU,BE-CE,Dec-2014] [DEC- 2015]2. Define Language Processor. List various phases of a language processor. Explain roles ofphases of Language Processor.[GTU,BE-CE,Dec-2014][DEC-2015][May-2016]3. Explain Symbol table and Mnemonics table with suitable example.[GTU, BE-CE, June-2013][DEC-2015]4. Briefly explain the tasks performed by analysis and synthesis phases of simple assemblyschemes.[GTU,BE-CE,June-2013] [GTU,BE-CE,May-2014]5. Explain various suitable data structures for the symbol table. Explain how one canorganize Symbol table using Linear Data Structure.[May-2016]6. Compare Problem oriented and Procedure oriented languages.[GTU,BE-CE,May-2014][DEC- 2015]7. Explain various types of Language Processors.8. Differentiate passes and phases of complier. Explain in brief syntax analysisphase.[GTU,BE-CE,May-2015]9. Explain following : a) Semantic Gap b) Specification Gap c) Execution Gap[DEC-2015]10. Explain the various stages of the life cycle of a source program with a neat diagram.[DEC-2015]11. Explain language processing activities [DEC-2015]12. Compare user-centric view and system-centric view of system software[May-2016]

Unit-3 : Assembler

1. What are advanced assembler directives? Explain any two with suitable example.[GTU,BE-CE,June-2013] [GTU,BE-CE,May-2015] [GTU,BE-CE,Dec-2014][DEC-2015][MAY-2016]2. Write difference between one pass and two pass assembler.[GTU,BE-CE,June-2013]3. Explain the complete working of first pass of the double pass assembler along with thedata structure used.4. Compare Variant I and Variant II of intermediate code generation for assembler.[GTU, BE-CE, Dec 2013] [GTU,BE-CE,May-2015]5. Explain two pass assembler. Explain how forward references are handled in two pass.[GTU,BE-CE,May-2015]6. Explain the data structure of single pass assembler.[GTU,BE-CE,May-2015]7. Explain use of various data structures (tables) needed in PASS I of the assembler. Alsogive details of their fields. [GTU,BE-CE,Dec-2014]8. Define forward references. How it can be solved using back-patching? Explain withexample. [GTU,BE-CE,May-2014][DEC-2015]9. Explain assembly scheme with suitable example.10. Show content of symbol table at the end of pass-one of an assembler.

Page 2: IMP questions for System programming for GTU

11. Explain the role of Mnemonic Opcode Table, Symbol Table, Literal Table and POOLTable in assembling process of assembly language program.12. Compare and Contrast the following:(i) macro call and function call(ii) macro preprocessor and macro assembler[GTU,BE-CE,May-2015]13. Which are the different assembly language statements? Explain each of them with suitableexample.

Unit-4: Macro & Macro Processors

1. Draw a flow chart and explain simple one pass macro processor.[May-2016]2. What is macro in programming language? Write an algorithm for macro definition.3. Explain advanced macro programming facilities. Give examples. [GTU,BE-CE,Dec-2014][DEC-2015]4. Define a macro taking starting location and N as parameters to find summation of all Nnumbers stored at locations starting from starting location. The result is to be stored atstarting location.5. Illustrate expansion of nested macro calls by giving example. [GTU,BE-CE,Dec-2014]6. Define Lexical and Semantic Expansion. Write a macro which takes A,B, C and D asparameters and calculates A*B+C*D in AREG.7. What is macro-preprocessor? Explain steps of macro-preprocessor design.[GTU,BECE,June-2013][GTU,BE-CE,May-2015] [GTU,BE-CE,Dec-2014][DEC-2015]8. Explain macro expansion in details.[GTU,BE-CE,June-2013][GTU,BE-CE,May-2015]9. Define a macro taking A and B as parameters to compute A = A * B + B * B + A + B.10. Define two macros of your choice to illustrate nested calls to these macros. Also show theircorresponding expansion. [DEC-2015]11. Explain use and field of following tables of macro. KPDTAB, MDT, EVTAB, SSTAB[May-2016]12. Explain various data structures of Macro definition processing with example.[GTU, BE-CE, Dec 2013]13. Explain following facilities for expansion time loop with example.(i) REPT statement(ii) IRP statement[GTU,BE-CE,Dec-2014][May-2016]14. Compare the features of subroutine and macros with respect to following.(iii)Execution speed(iv) Processing requirement by assembler.(v) Flexibility and generality

Page 3: IMP questions for System programming for GTU

Unit-5: Linkers & Loaders

1. Describe in detail how relocation and linking is performed. Explain with Example.[DEC-2015]2. What is Overlay? Explain the execution of an overlay structured program.3. Explain Absolute Loader with example. [GTU,BE-CE,May-2014] [GTU,BE-CE,May-2015][DEC-2015][May-2016]4. Explain design of a linker by addressing issues of relocation and linking. [GTU,BECE,May-2015]5. Explain BSS loader with example.6. Explain object module of the program.7. Explain self-relocating program and overlay structured program. [GTU,BE-CE,May-2015][May-2016]8. What is program relocation? How relocation is performed by linker. Explain withexample. [GTU,BE-CE,May-2014][May-2016]9. Explain linking and loading in MS DOS. [GTU,BE-CE,May-2014]10. Explain dynamic linking. Draw the flaw chart for dynamic linking.11. Write an algorithm for first pass of a linker.12. Draw flow chart of “program linking”.13. Explain relocation and linking requirements in segmented addressing with suitableexample.[GTU,BE-CE,June-2013]14. In brief explain relocating loader. [May-2016]

Unit-6: Scanning & Parsing

1. Explain types of grammars.[GTU,BE-CE, Dec 2013][GTU,BE-CE,May-2014][GTU,BE-CE,Dec-2014] [DEC- 2015][May-2016]2. Explain Left recursion, Left factoring and backtracking in top down parsing.3. Explain left factoring by giving example.4. Explain recursive descent parsing algorithm.[DEC-2015][May-2016]5. Compare top-down and bottom-up parser.[GTU,BE-CE,June-2013]6. Explain recursive decent parser with suitable example. Also state its drawbacks.[GTU,BE-CE,June-2013]7. Write operator precedence table for arithmetic operators “+”, “*”, “-”, “/”.[GTU,BE-CE,June-2013]8. Parse following expression using the table. id * id + id * id9. Write algorithm for operator precedence parsing and explain with example.[GTU,BECE,Dec 2013]10. Explain working of LL (1) parser. Parse following string: id + id - (id * id ).

Page 4: IMP questions for System programming for GTU

11. Write complete grammar for an arithmetic expression containing operators „+‟, „–„, „*‟,„$‟ using recursive specification and Backus Naur Form (BNF) where „$‟ isexponentiation operator.[GTU,BE-CE,June-2013]12. Build a DFA for following regular expression.(a | b)*aab#.13. A language consists of all strings of a‟s and b‟s which ends with b and does not containaa. Write regular expression for the language.14. Perform left-factoring on the following grammar.S = i E t S e S | i E t S | aE = b15. Given the Grammar, evaluate the string id-id*id using shift reduce parser.E-> E – EE -> E * EE -> id16. Construct LL (1) parsing table for following grammar.E TE‟E‟ +TE‟ | ЄT FT‟T‟ *FT‟ | Є[GTU, BE-CE, May-2015]17. Write a regular expression for a language containing a binary string which does not containtwo consecutive 0s or two consecutive 1s anywhere. [DEC-2015]18. Construct NFA and DFA for following regular expression:(0 | 1)*001# [DEC-2015]19. Given following expression: x = -a * b + -a * bWrite three address codes for the expression.Optimize the three address code if it is possible to do so.Give triple implementation for the three address code of the expression. [May-2016]

Unit-7: Compiler

1. Explain methods for accessing non local variables.2. Explain Memory allocation models.3. List and compare various techniques for dynamic memory allocation.4. Give example(s) of errors detected by first three phases of compiler.5. Explain different code optimization techniques. [GTU,BE-CE,May-2014]6. What is meant by optimizing transformations? Explain any three with suitable example.[GTU, BE-CE, June-2013] [GTU,BE-CE,May-2014][DEC-2015]7. What are the issues in code generation in relation to compilation of expression? Explaineach issue in brief.[GTU, BE-CE, June-2013]8. Discuss parameters for Activation Records.9. Explain triple and quadruple representation with example.

Page 5: IMP questions for System programming for GTU

10. Explain memory allocation in block structured language.11. What is interpreter? Explain benefits of interpreter. Compare interpreter and compiler.[DEC-2015]

Unit-8: Interpreter & Debugger

1. Explain functioning of interpreter.2. Define the following terms.(i) Handle(ii) Program Relocation(iii) literals(iv) forward Reference(v) System Program(vi) Language Processor(vii) Operator Grammar(viii) Pass(ix) Frequency reduction(x) triples[GTU, BE-CE, Dec 2013] [GTU, BE-CE, May-2014]3. Define following terms:(i) Assembler(ii) Macro(iii)Parsing[GTU,BE-CE,June-2013]4. Explain following.(i) Execution Gap (iii) Phases of Compiler(ii) Interpreter (iv) Language Migrator5. Explain following terms with suitable example.(i) Expansion time variable (iii) Semantic Expansion(ii) Positional parameter (iv) Macro Preprocessor[GTU,BE-CE,May-2015][May-2016]6. What is interpreter? Explain pure & impure interpreters [May-2016]6. Fill in the Blanks.1. A macro is a unit of specification for _________________________through expansion.2. Macro definition is enclosed between a __________________ statement anda__________________ statement.3. A _______________________________ is designed to hold the names of all macrodefined in a program.4. An ___________________________ counter is maintained to count the number of nestedmacro calls.5. A _____________________bridges an execution gap to the machine language of acomputer system.

Page 6: IMP questions for System programming for GTU

(i) Detranslator(ii) Preprocessor(iii)Language translator[GTU,BE-CE,June-2013]6. A _____________________bridges the specification gap between two programminglanguages.(i) Interpreter(ii) Language Migrator(iii)Compiler[GTU, BE-CE, June-2013]7. _____________________ is designed to hold the value of formal parameters duringexpansion of macro call.(i) Actual Parameter Table(ii) Macro Name Table(iii)Expansion time variable table[GTU, BE-CE, June-2013][GTU, BE-CE, May-2014]8. Syntax analysis processes the string of tokens built by _______________ to determinethe statement class.(i) Semantic Analysis(ii) Lexical Analysis(iii)Itself[GTU, BE-CE, June-2013]9. A lexical expansion is typically employed to replace occurrence of formal parameters bycorresponding actual parameters.(State True/False)10. Default specification of parameters is useful in situations where a parameter has thedifferent value in most calls.(State True/False)11. Macro definition table is maintained to hold value of sequencing symbols. (StateTrue/False)