0% found this document useful (0 votes)
18 views2 pages

System Software Exam Paper Winter 2023

this is very useful document for system software

Uploaded by

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

System Software Exam Paper Winter 2023

this is very useful document for system software

Uploaded by

sjtrivedi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Seat No.: ________ Enrolment No.

___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE - SEMESTER–VI (NEW) EXAMINATION – WINTER 2023
Subject Code:3160715 Date:13-12-2023
Subject Name: System Software
Time:02:30 PM TO 05:00 PM Total Marks:70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.

MARKS
Q.1 (a) Explain different kinds of system software. 03
(b) Difference between Procedure oriented language and Problem 04
oriented language.
(c) Explain the various stages of the life cycle of a source program 07
with a neat diagram.

Q.2 (a) Eliminate left recursion 03


E→E+T|T
(b) Describe following data structures: OPTAB, SYMTAB, LITTAB and 04
POOLTAB.
(c) Compare Top Down and Bottom Up Parsing. Find out First and 07
Follow and construct LL (1) parser table for following Grammar:
E→TE’
E’→+TE’
T→FT’
T’→*FT’
F→(E)  id
OR
(c) Consider following assembly language program: Show (i) 07
Contents of Symbol Table (ii) Intermediate codes using Variant-I
representation.
START 101
READ N
MOVER BREG, ONE
MOVEM BREG, TERM
AGAIN MULT BREG, TERM
MOVER CREG, TERM
ADD CREG, ONE
MOVEM CREG, TERM
COMP CREG, N
BC LE, AGAIN
MOVEM BREG, AGAIN
PRINT RESULT
STOP
N DS 1
RESULT DS 1
ONE DC ‘1’
TERM DS 1
END
1
Instruction opcode: STOP – 00, ADD – 01, MULT – 03, MOVER
– 04, MOVEM –05, COMP – 06, BC – 07, READ – 09, PRINT –
10, LE – 02
Assembler directives: START – 01, END – 02
Declaration statements: DC – 01, DS – 02
Register code: BREG – 02, CREG – 03
Q.3 (a) Draw a flowchart of maintaining Table of Incomplete Instruction 03
(TII) in assembler.
(b) Explain REPT and IRP statement with proper example. 04
(c) Explain advanced assembler directives with suitable example. 07
OR
Q.3 (a) Explain memory allocation in block structured language. 03
(b) What is the difference between Keyword parameters and 04
positional parameters?
(c) Explain lexical and semantic expansion of macro with example. 07
Q.4 (a) Write regular expressions of a given language. The language 03
consists no. of zero should be multiple of 3
(b) Explain in brief design of an absolute Loader. 04
(c) Explain Self relocating program and overlay structure program. 07
OR
Q.4 (a) Write a regular expression for a language containing both 11 and 03
00 as substring
(b) Write and explain the algorithm for macro expansion. 04
(c) What is program relocation? How relocation is performed by 07
linker? Explain with example.
Q.5 (a) Explain types of grammar. 03
(b) Explain the front end of toy compiler with suitable example. 04
(c) What is interpreter? Explain pure & impure interpreters. 07
OR
Q.5 (a) Explain Boostrap loader. 03
(b) Given following expression: x = -a * b + -a * b 04
(1) Write three address codes for the expression.
(2) Give triple implementation for the three-address code of the
expression.
(c) What is interpreter? Explain benefits of interpreter. Compare 07
interpreter and compiler.

*************

Common questions

Powered by AI

Interpreters translate and execute source code line-by-line, offering greater flexibility and ease of debugging but generally slow execution speeds. Compilers translate entire programs into machine code before execution, leading to faster runtimes but requiring a complete debugging process for errors. Interpreters are used in development environments where testing and immediate feedback are critical, while compilers suit production environments where performance is paramount .

OPTAB stores mnemonic operation codes and their machine equivalent; it's used during the instruction fetching phase of an assembler. SYMTAB is the symbol table that keeps track of user-defined labels and their memory locations. LITTAB is the literal table that manages constant values that appear in the source code. POOLTAB organizes pools of literals, helping in efficient memory allocation during program assembly .

A self-relocating program contains information that enables it to adjust its operation or data use based on memory location at runtime. This adaptation allows dynamic memory management and execution flexibility. An overlay structure program is designed to run in a constrained memory space by loading sections of the program only when needed, thus managing large programs in limited environments. The key difference is that self-relocating programs adjust according to the address, while overlay programs deal with execution sequences and memory constraints .

Pure interpreters execute source code directly without converting it to machine language, which provides flexibility and ease of modification but often at the cost of slower execution speeds. Impure interpreters perform some level of compilation, caching translations to enhance performance while maintaining some flexibility. The main limitation of pure interpretation is performance inefficiency, while impure interpreters may incur overhead due to intermittent compilation stages .

Top-down parsing builds a parse tree from the root by applying grammar rules to expand non-terminals through a predictive approach, which is straightforward but not suitable for left-recursive grammars. It is efficient for grammars designed for LL parsing techniques (like LL(1)). Bottom-up parsing constructs parse trees from the leaves up. It can handle a larger class of grammars, such as LR grammars, which makes it more powerful for complex language designs. However, it can be more complex to implement due to shift-reduce conflicts that must be resolved .

Program relocation is the process of modifying programs to run in different memory locations than initially coded for, improving utility and resource allocation. Linkers achieve this by updating absolute addresses based on relocated segments and using relocation information within the object code. For example, in segmented memory systems, linkers adjust references according to segment bases, allowing for dynamic memory use and larger program execution across varied memory layouts .

Construction of LL(1) parser tables involves the computation of First and Follow sets for each non-terminal. The First set determines the set of terminals that begin strings derivable from a non-terminal, while the Follow set contains terminals that can appear immediately after the non-terminal in some 'sentential' form. An LL(1) parser table is then constructed by placing grammar rules in table slots indexed by non-terminals and the first sets or follow sets if epsilon (ε) transitions are present. This table enables the parser to decide which rule to apply based on the next input symbol .

A bootstrap loader is a small, specialized program that initializes the system to allow the kernel to load. It executes at startup, performing tasks like setting up hardware and loading the full operating system into memory. Bootstrap loaders are pivotal for ensuring that the operating system is correctly initialized from a powered-off state. They must be concise and efficient, often embedded in system firmware or ROM to function properly during every system boot .

Procedure Oriented Languages (POLs), such as C, are designed with a focus on procedures or routines. They emphasize sequence, selection, and iteration in programming, making them suitable for writing clear, well-structured programs that involve repetitive tasks and computation. Problem Oriented Languages (POLs), like SQL, are designed to solve specific problems, enhancing productivity by allowing users to write fewer lines of code to accomplish complex tasks. POLs are often used in data manipulation and analysis where specific tasks like querying databases are required .

System software can be categorized into several types, including operating systems, device drivers, utility software, and language processors. Operating systems manage hardware resources and provide services for application software. Device drivers enable hardware components to communicate with the operating system. Utility software performs maintenance tasks to ensure the smooth operation of a computer, such as virus scanning and file management. Language processors, including compilers, interpreters, and assemblers, translate high-level language code into machine code. Each type plays a crucial role in maintaining and optimizing the computing environment.

You might also like