US06FBCA01:

SYSTEM SOFTWARE

SYSTEM SOFTWARE SHORT QUESTION Unit-1 Q-1

What do you mean by compiler? Definition: A compiler is any language translator that translate source program into machine program. Compiler performs lexical analysis, syntax analysis and semantic analysis.

Q-2

Write in brief about two parts of compilation. 1) Front End: The front end performs lexical, syntax and semantic analysis of the source Program. Each kind of analysis involves the following functions: 2) Back End: The back end performs memory allocation and code generation.

Q-3

List the phases of compiler Total six phases of compiler are there: 1) Lexical analysis 2) Syntax analysis 3) Semantic analysis. 4) Intermediate code generator 5) Code optimizer 6) Code generator

Q-4

Explain error detection and reporting phase of compiler • • • •

It identifies all possible type of error in source program and report to the user for correcting such type of errors. Checks source program for semantic errors Gathers type information for subsequent code generation (type checking) Identifies operator and operands of expressions and statements

Prepared By: Mr. Krunal Khurana

College: ACC-BCA

US06FBCA01:

Q-5

SYSTEM SOFTWARE

Explain symbol table management phase of compiler • • •

Symbol table – data structure with a record for each identifier and its attributes Attributes include storage allocation, type, scope, etc All the compiler phases insert and modify the symbol table

Q-6

Draw a diagram of a language processing system.

Q-7

Language processing activities arise due to the difference between the manner in which a software designer describes the ideas concerning the behaviour of software and the manner in which these ideas are implemented in a computer system. What is meaning of Language Processing? •

Q-8

The term language processing is used to describe the activity performed by a language processor. Normally language processor performs analysis of source program and synthesis of target program.

Define : Application Domain & Execution Domain The software designer expresses the ideas about expected software in terms related to the application domain of the software. To implement these ideas, their description has to be interpreted in terms related to the execution domain of the computer system

Q-9

Define: Specification Gap & Execution Gap • •

Specification gap is the semantic gap between two specifications of the same task. Execution gap is the gap between the semantics of programs (that perform the same task) written in different programming languages.

Prepared By: Mr. Krunal Khurana

College: ACC-BCA

US06FBCA01:

SYSTEM SOFTWARE

Q-10

What is the Analysis of SP & Synthesis of SP?

Q-11

Mainly analysis of source program (SP) includes lexical analysis, syntax analysis and semantic analysis. For e.g. The analyses of source program used to find the type information. While synthesis of target program (TP) is used to generate machine code of source program. In pass It performs main two activities memory allocation and code generation. Define: Program generation activity & Program execution activity. Program Generator: The program generator is a software system which accepts the specification of a program to be generated, and generates a program in the target PL. Program Execution Activity: It executes program in memory. Two popular models for program execution are there called program translation and program interpretation.

Q-12

Define the Lexical & Semantic Rule. 1. Lexical rules which govern the formation of valid lexical units in the source language. 2. Syntax rules which govern the formation of valid statements in the source language. 3. Semantic rules which associate meaning with valid statements of the language.

Q-13

Define: Program generation activity & Program execution activity. Answer as above Unit-2

Q-1

Write design specification of an assembler in brief. We use a four steps approach to develop a design specification for an assembler: – Identify the information necessary to perform a task. – Design a suitable data structure to record the information. – Determine the processing necessary to obtain and maintain information. – Determine the processing necessary to perform the task.

Q-2

Explain analysis phase in brief. • •

The primary function of this phase is to build symbol table. For this it determines the address of symbols used in program. It is possible to determine the address either directly or indirectly.

Prepared By: Mr. Krunal Khurana

College: ACC-BCA

US06FBCA01: • • Q-3

SYSTEM SOFTWARE

For e.g., the address of first instruction in the program (directly). i.e. START 101 For e.g., the address of N in previous program (indirectly).

Explain synthesis phase in brief. •

Q-4

We must have the following information to synthesis the machine instruction for this statement: 1. Obtain the machine opcode corresponding to the mnemonic from the Mnemonic table. 2. Obtain address of a memory operand from the Symbol table. 3. Synthesize a machine instruction or the machine form of a constant List the tasks performed by the passes of a two pass assembler. • •



Q-5

Q-6

Q-7

Tasks performed by the passes of two pass assembler are as follows: Pass I – Separate the symbol, mnemonic opcode and operand fields – Builds the symbol table – Performs LC processing – Construct IR Pass II – Synthesize the target program

List four advantages of Assembly language. 1. The symbolic programming of Assembly Language is easier to understand and saves a lot of time and effort of the programmer. 2. It is easier to correct errors and modify program instructions. 3. Assembly Language has the same efficiency of execution as the machine level language. Because this is one-to-one translator between assembly language program and its corresponding machine language program. List the elements of assembly language programming and explain any one of them. Mnemonic operation code: • Also known as mnemonic opcode • It eliminates needs to memorize numeric operation code. Symbolic operands: • Symbolic name associated with data or instructions. • These symbolic name used as operand in assembly statement. Data Declaration: • Data can be declared in variety of notations including the decimal, hexadecimal, binary notation etc. Explain any one feature provided by assembly language programming. Mnemonic operation code: • Also known as mnemonic opcode • It eliminates needs to memorize numeric operation code. Instruction opcode Assembly mnemonic Remarks

Prepared By: Mr. Krunal Khurana

College: ACC-BCA

US06FBCA01: 00 01 02 03 04 05 06 07 08 09 10 Q-8



The opcode, register operand and memory operand occupy 2, 1 and 3 digits respectively (in machine language program). Below figure shows an assembly language program and an equivalent machine language program.

The optional indicates the address of the instruction where execution of the program should begin, by default execution begin with the first instruction of the assembled program.

Give Instruction opcode and function of following assembly mnemonic. [1] STOP [2] SUB [3] MOVER [4] READ Instruction opcode 00 02 04 09

Q-11

Stop execution First operand is modified First operand is modified First operand is modified Register  memory move Memory  register move Sets condition code Branch on condition Analogous to SUB First operand is not used First operand is not used

Explain with its syntax. •

Q-10

STOP ADD SUB MULT MOVER MOVEM COMP BC DIV READ PRINT

Describe an assembly language statement with its syntax. •

Q-9

SYSTEM SOFTWARE

Assembly mnemonic STOP SUB MOVER READ

Remarks Stop execution First operand is modified Register  memory move First operand is not used

Give Instruction opcode and function of following assembly mnemonic. [1] ADD [2] MULT [3] MOVEM [4] COMP Instruction opcode 01 03 05 06

Assembly mnemonic ADD MULT MOVEM COMP

Prepared By: Mr. Krunal Khurana

Remarks First operand is modified First operand is modified Memory  register move Sets condition code

College: ACC-BCA

US06FBCA01: Q-12

SYSTEM SOFTWARE

Give Instruction opcode and function of following assembly mnemonic. [1] BC [2] DIV [3] MOVER [4] PRINT Instruction opcode 04 07 08 10

Assembly mnemonic MOVER BC DIV PRINT

Remarks Register  memory move Branch on condition Analogous to SUB First operand is not used

Q-13

What is Condition code? How it is tested?

Q-14

In an assembly language BC (Branch Codition) statement is used as a conditional statement. The syntax of BC statement is used as follows: BC , The condition code in BC statement is encoded into the first operand position using code 1-6 for the specification LT, LE, , EQ, GT, GE and ANY respectively Explain Branch on Condition instruction.

Q-15

In an assembly language BC (Branch Codition) statement is used as a conditional statement. The syntax of BC statement is used as follows: BC , The condition code in BC statement is encoded into the first operand position using code 1-6 for the specification LT, LE, , EQ, GT, GE and ANY respectively List all assembly language statements and Explain any one. 3 - Main kinds of statements are: – Imperative statements – Declarative statements – Assembler directives Imperative statements: • An Imperative statement indicates an action to be performed during the execution of the assembled program. • Each imperative statement translated into one machine instruction. Declarative statements: • The syntax of declarative statement is: [Label] DS [Label] DC ‘’ • The DS (declare storage) statement reserves areas of memory and associates names with them. • For e.g., Consider the following DS statement: A DS 1 G DS 200 • The first statement reserves a memory area of 1 word and associates the name A with it. • The second statement reserves a block of 200 memory words. The name G is associated with the first word of the block. • The DC (declare constant) statement constructs memory words containing

Prepared By: Mr. Krunal Khurana

College: ACC-BCA

US06FBCA01:

• •

SYSTEM SOFTWARE

constants. For e.g., Consider the following DC statement: ONE DC ‘1’ Above statement associates the name ONE with a memory word containing the value ‘1’.

Assembler directives: • It instructs assembler to perform certain actions during the assembly of a program. • Some assembler directives are described in the following: START • This directive indicates that the first word of the target program generated by the assembler should be placed in the memory word with the address . END [] • This directive indicates the end of the source program. • The optional indicates the address of the instruction where execution of the program should begin, by default execution begin with the first instruction of the assembled program. Q-16

Define Imperative statements.

Q-17

Imperative statements: • An Imperative statement indicates an action to be performed during the execution of the assembled program. • Each imperative statement translated into one machine instruction. • In assembly program ADD, SUB, MUL, MOVER and MOVEM are imperative statement • Example MOVER BREG, ONE 102) + 04 2 115 MOVEM BREG, TERM 103) + 05 2 116 ADD CREG, ONE 106) + 01 3 115 Explain DS of declaration statements in brief. Declarative statements: • The syntax of declarative statement is: [Label] DS [Label] DC ‘’ • The DS (declare storage) statement reserves areas of memory and associates names with them. • For e.g., Consider the following DS statement: A DS 1 G DS 200 • The first statement reserves a memory area of 1 word and associates the name A with it. • The second statement reserves a block of 200 memory words. The name G is associated with the first word of the block. • The DC (declare constant) statement constructs memory words containing constants.

Prepared By: Mr. Krunal Khurana

College: ACC-BCA

US06FBCA01: • •

Q-18

For e.g., Consider the following DC statement: ONE DC ‘1’ Above statement associates the name ONE with a memory word containing the value ‘1’.

Explain DC of declaration statements in brief. • • •

Q-19

SYSTEM SOFTWARE

The DC (declare constant) statement constructs memory words containing constants. For e.g., Consider the following DC statement: ONE DC ‘1’ Above statement associates the name ONE with a memory word containing the value ‘1’.

What are assembler directives? List all and Explain in brief. Assembler directives: • It instructs assembler to perform certain actions during the assembly of a program. • Some assembler directives are described in the following: START • This directive indicates that the first word of the target program generated by the assembler should be placed in the memory word with the address . END [] • This directive indicates the end of the source program. • The optional indicates the address of the instruction where execution of the program should begin, by default execution begin with the first instruction of the assembled program.

Q-20

What is the function of START assembler directive?

Q-21

The START directivies specifies the address to be used for the generation of code. Subsequent instructions and data address's begin at the new value. Normally, it is used to set the start address of the program, but can also set the location counter to the value specified. Example: START 101 (Refer Example on page number-8) What is the function of END assembler directive? The END directive specifies the end of the assembly language source listing. It may be followed by an optional entry address. The optional entry address is used by LOADERS to initialize the Program Counter before running the program. If no entry address is specified, execution will start at the first location allocated by the assembler. Example: START 101 READ N 101) + 09 0 113 MOVER BREG, ONE 102) + 04 2 115

Prepared By: Mr. Krunal Khurana

College: ACC-BCA

US06FBCA01: MOVEM AGAIN MULT MOVER ADD MOVEM COMP BC MOVEM PRINT STOP N DS RESULT DS ONE DC TERM END

Q-1

Q-2

Q-3

SYSTEM SOFTWARE BREG, TERM BREG, TERM CREG, TERM CREG, ONE CREG, TERM CREG, N LE, AGAIN BREG, RESULT RESULT 1 1 ‘1’ DS

1

103) 104) 105) + 01 + 05 + 06 + 07 + 05 + 10 + 00

106) 107) 108) 109) 110) 111) 112) 113) 114) 115) + 00 116)

+ 05 + 03 + 04 3 3 3 2 2 0 0

2 2 3 115 116 113 104 114 114 000

0

001

116 116 116

UNIT-3 List different types of Editors. The editors come in the following forms/types: 1. Line editors 2. Stream editors 3. Screen editors 4. Word processors 5. Structure editors Which terminology is used to refer the address of program entity at different times? Terms to refer to the address of a program entity at different time: • Translated address: Address assigned by the translator. • Linked address: Address assigned by the Linker. • Load address: Address assigned by the Loader. Explain address sensitive program. Address sensitive program – contains one or more of the following: 1) An address sensitive instruction: An instruction which uses an address a(i) Є AA. 2) An address constant: A data word which contains an address a(i) Є AA. • An address sensitive program P can execute only if the start address of the memory area allocated to it is the same as its translated origin. • To execute correctly from any other memory area, the address used in each address sensitive instruction of P must be corrected.

Q-4

Difference between linking and loading. Linking

Prepared By: Mr. Krunal Khurana

Loading College: ACC-BCA

US06FBCA01:

SYSTEM SOFTWARE

Linking is the process of binding an Loading is the process of loading external reference to the correct link program into memory. time address. It produces an executable file from several object files. It resolves external references. Linking types are static linking and dynamic linking Q-5

A loader takes an executable file and copies into memory for execution. It cannot resolves external references. Loading types are absolute loader and relocating loader

Explain any one Editor. Screen editors: • A line or stream editor does not display the text in the manner it would appear if printed. • A screen editor uses the what-you-see-is-what-you-get principle in editor design. • The user can move the cursor over the screen, position it at the point where he desires to perform some editing and proceed with the editing directly. • Thus it is possible to see the effect of an edit operation on the screen. This is very useful while formatting the text to produce printed documents.

Q-6

Draw the schematic diagram of program execution. Four steps for program execution: Translation, Linking, Relocation and Loading • Translation: A program is translated into a target program. • Linking: The code of a target program is combined with codes of other programs and library routines that it calls. • Relocation: A program may have been coded or translated with the idea of executing it in a specific area of memory. However, the operating system may have used that memory area for another purpose, so it may allocate a different memory area for the program’s execution. Relocation is the action of changing the memory addresses used in the code of the program so that it can execute correctly in the allocated memory area. • Loading: the program is loaded in a specific memory area for execution.

Q-7

Define ENTRY and EXTRN statement of public definition. EXTRN and ENTRY statements The ENTRY statement lists the public definitions of a program unit, i.e. it lists those symbols defined in the program unit which may be referenced in other program units. The EXTRN statement lists the symbols to which external references are made in the program unit.

Q-8

Explain External Reference

Prepared By: Mr. Krunal Khurana

College: ACC-BCA

US06FBCA01:

SYSTEM SOFTWARE

External Reference: A reference to a symbol ext-symb which is not defined in the program unit containing the reference. Resolving external references Before the application program can be executed, it is necessary that for each Pi in SP, every external reference in Pi should be bound to the correct link time address.

Q-9

Example: (Refer example-2 on page number 11) EXTRN MAX, ALPHA Define following terms: -

Q-10

Q-11

Linking: Linking is the process of binding an external reference to the correct link time address. - Loading: Loading is the process of loading program in a specific memory area for execution. Give definition of following terms : -

Binary Program: a pre-compiled, pre-linked program that is ready to run under a given operating system; a binary for one operating system will not run on a different operating system; "the same source code can be compiled to produce different binaries for different operating systems"

-

Syntax Directed Editors: Syntax-directed editors can perform syntax analysis during program editing. This capability allows programmers to correct syntax errors in a much more efficient way.

List steps of execution of a program written in a language L. Four steps for program execution: Translation, Linking, Relocation and Loading • Translation: A program is translated into a target program. • Linking: The code of a target program is combined with codes of other programs and library routines that it calls. • Relocation: A program may have been coded or translated with the idea of executing it in a specific area of memory. However, the operating system may have used that memory area for another purpose, so it may allocate a different memory area for the program’s execution. Relocation is the action of changing the memory addresses used in the code of the program so that it can execute correctly in the allocated memory area. • Loading: the program is loaded in a specific memory area for execution.

Prepared By: Mr. Krunal Khurana

College: ACC-BCA

US06FBCA01:

SYSTEM SOFTWARE

Example : 2 UNIT-4 Q-1

What is a software tool? Software tool: A Software tools is a system program which: 1. Interfaces a program with the entity generating its input data 2. Interfaces the results of a program with the entity consuming them.

The entity generating the data or consuming the results may be a program or a user. Q-2

List down fundamental steps in program development. The fundamental steps in program development are: 1. Program design, coding and documentation 2. Preparation of program in machine readable form 3. Program translation, linking and loading 4. Program testing and debugging 5. Performance tuning 6. Reformatting the data and/or results of a program to suit other programs. Which categories are used in program design and coding? Two categories of tools used for program design & coding: 1. Program generator: Generates program and saves coding efforts since program is generated rather than coded by hand. 2. Programming Environment: Supports program coding by incorporating awareness of the programming language syntax and semantics in the language editors.

Q-3

Define: Program generator:

Prepared By: Mr. Krunal Khurana

College: ACC-BCA

US06FBCA01:

SYSTEM SOFTWARE

Q-4

Program Generates program and saves coding efforts since program is generated rather than coded by hand. Define: Program Environment

Q-5

Programming Environment: Supports program coding by incorporating awareness of the programming language syntax and semantics in the language editors. List down steps for program testing and debugging. Important steps in program testing & debugging are: 1. Selection of test data 2. Analysis of test results to detect errors (if any), and 3. Debugging i.e. localization and removal of errors.

Q-6

Explain Debug Monitor Debug monitors provide the following facilities for dynamic debugging: 1. Setting breakpoints in the program 2. Initiating a debug conversation when control reaches a breakpoint 3. Displaying values of variables 4. Assigning new values to variables 5. Testing user defined assertions and predicates involving program variables • At any time during execution the programmer can interrupt program execution and enter into the debugging mode or return to the editor (by setting breakpoint). • Multiple breakpoint is also possible in the same program. • In the later case, he can modify the program and resume or restart its execution. • Advantage: – Debug monitor can be easily implemented in an interpreter • Disadvantage: – Incurs large execution time.

Q-7

List down components of program environment. It consists of the following components: 1. A syntax directed editor (which is structure editor) 2. A language processor – a compiler, interpreter, or both 3. A debug monitor 4. A dialog monitor All components are accessed through dialog monitor.

Q-8

What is a user interfaces? •

A user interface (UI) plays a vital role in simplifying the interaction of user with an application.

Prepared By: Mr. Krunal Khurana

College: ACC-BCA

US06FBCA01: • •

Q-9

SYSTEM SOFTWARE

UI has two important aspects: 1. Issuing of command, and 2. Exchange of data A UI consist of two components: 1. Dialog manager: Manages the conversation between the user and the application. This involves prompting the user for a command and transmitting the command to the application. 2. Presentation manager: Manages and display data produced by the application in an appropriate manner on the user’s display.

What is a command dialog design? Command dialog manages the conversation between the user and the application. This involves prompting the user for a command and transmitting the command to the application.

Q-10

List out principles of command dialog design. Principles of command dialog are as follow: 1. Ease of use 2. Consistency and command structure 3. Immediate feedback on user command 4. Error handling 5. Online help to avoid memorizing command details 6. Undo facility 7. Shortcuts for experience user

Q-11

Explain: Presentation of Data • The presentation manager manages and display data produced by the application in an appropriate manner on the user’s display. In other words, the presentation manager is responsible for managing the user’s screen and accepting data and presenting result.

Q-12

Explain: Hypertext, Hyper card, Menulay Hypertext is a structure document that consists of text and means to locate related documents at different levels of details. The related documents include hyperlinks, table string searching function and backtracking facility. Hyper card has an associated screen layout containing button and fields. A button can be selected by clicking the mouse on it. A field contains editable text. Each card has a specific background, which itself behaves like a card. Menulay is an early UIMS using the screen layout as the basis for the dialog model. The UI designer starts by designing the user screen to consist of set of icons. Specific action is specified for each icon. This action is performed when icon is selected.

Q-13

List out the facilities provide by debug monitors for dynamic debugging.

Prepared By: Mr. Krunal Khurana

College: ACC-BCA

US06FBCA01:

SYSTEM SOFTWARE

Debug monitors provide the following facilities for dynamic debugging: 1. Setting breakpoints in the program 2. Initiating a debug conversation when control reaches a breakpoint 3. Displaying values of variables 4. Assigning new values to variables 5. Testing user defined assertions and predicates involving program variables Q-14

Explain Program design and coding. Two categories of tools used for program design & coding: 1. Program generator: Generates program and saves coding efforts since program is generated rather than coded by hand. 2. Programming Environment: Supports program coding by incorporating awareness of the programming language syntax and semantics in the language editors.

Q-15

Explain Program entry and Editing. Program Entry and Editing: • These tools are text editors or more sophisticated program with text editing facilities. • The editor functions in two-modes: Command mode and data mode.

===BEST OF LUCK TYBCA STUDENTS===

Prepared By: Mr. Krunal Khurana

College: ACC-BCA

SYSTEM SOFTWARE MATERIAL.pdf

Sign in. Loading… Whoops! There was a problem loading more pages. Retrying... Whoops! There was a problem previewing this document. Retrying.

375KB Sizes 2 Downloads 231 Views

Recommend Documents

[PDF] System Software
Online PDF System Software: An Introduction to Systems Programming (3rd Edition), .... system software and the architecture of the machine it is designed to support, Beck ... topics, such as multiprocessor, distributed, and client/server systems.