Sei sulla pagina 1di 11

System Programming

Text Book:
1. L. L. Beck, “System software: An Introduction to system Programming”,
Third Edition.
2. A. Silberscgatz and P. B. Galvin, “Operating System Concepts”, Fifth
Edition.
Reference Book:
1. J. J. Donovan, “Systems Programming”.
2. A. V. Aho, R. Sethi, and J. D. Ullman, “Compilers: Principles, Techniques,
and Tools”.
3. R. C. T. Lee, C. W. Shen, S. C. Chang, “Introduction to Compiler Writing”.

Chapter 1 Introduction

1. Macro Call (Macro Expansion)


The Macro processor replaces each macro instruction with the corresponding group of
source language statements. Whose code is inserted into source program ( open
subroutine).

2. Function Call
Calling program transfer of data and control to called program (close
subroutine).

3. Linker
Combine two or more separate object programs and supplies the information needed
to allow reference between them.

4. Loader
a. Allocation: Assign memory location.
b. Linking: Link external reference.
c. Relocation: Modify the object program so that it can be loaded at different
address.
d. Loading: Load object program into main memory.

5. Operating System
a. Memory Management

1
b. Processor/Process Management
c. Device Management
d. Information Management

6. Instruction Cycle
a. Fetch Cycle FETCH CYCLE
b. Decoder Cycle EXECUTION CYCLE
c. Fetch Operand Cycle
d. Computation Cycle
e. Store Result Cycle

7. Addressing Mode
a. Immediate
b. Simple Addressing (Direct Addressing)
c. Indirect Addressing
d. Indexed Addressing (Relative addressing)

8. Pseudo Instruction
Specify an operation (directive) to the assembler.

Chapter 2 Assembler

1. Assembler
To translate mnemonic operation codes to their machine language equivalents and
assign machine addresses to symbolic labels used by the programmer.

2. Disassenbler
To translate machine code to their assembly source.

3. Cross Assembler
The assembler may run on one machine and produce object code for another.

4. Software Life Cycle


a. Requirement Analysis
b. System Specification
c. System Design
d. Implementation

2
e. System Testing
f. Maintenance

5. System Design
a. Output Requirements
b. Input Design
c. Data Structure (Data Base)
d. Algorithms
e. Look For Modularity

6. Two passes Assembler


Pass 1 : Label definition and assign address
a. Determines the length of machine instruction(OPTAB)
b. Calculate location counter(LOCCTR)
c. Remember address of labels until pass 2(SYMTAB)
d. Process some pseudo instructions (BYTE, RESW, … etc.)
Pass 2 : Generate object program
a. Look up address of symbols if need(SYMTAB)
b. Generate machine instructions(OPTAB)
c. Calculate location counter(LOCCTR)
d. Generate data value defined by BYTE, WORD, … etc.
e. Process pseudo instructions not done during pass 1.

7. Absolute Program
The program must be loaded at the specified (absolute) address.

8. Relocatable Program
The actual starting address is not known until load time. The program can be loaded
at different address of memory.
How to Solve:
a. Modification record
b. Base relative
c. Program counter relative

9. Literal
To use the value of a constant operand as a part of the instruction. Literal
immediately following the END or LTORG statements.

3
10. EQU
To define symbol and specify their address.

11. ORG
Resets its location counter to the specified address.

12. Program Block (segment)


USE indicates which portions of the source program belong to the various blocks.
The assembler assigns to each block a starting address in the object program.

13. External Reference


Reference between control sections.

14. Internal Reference


Referenced symbols are defined in this section.

15. CSET Instruction


Define new control section.

16. EXTDEF (External Definition)


Define in this control section and may be used by other sections.

17. EXTREF(External Reference)


Symbols are used in this control section and are defined elsewhere.

18. Configuration Table Algorithm


That refers to the undefined symbol is added to a list of forward references associated
with the symbol table entry. When the definition for a symbol is encountered, the
forward reference list for that symbol is scanned, and the proper address is
inserted.

Chapter 3 Loaders and Linkers

1. Loader
The loader is a program which accepts the object programs, prepares these programs
for execution by the computer, and indicates the execution four functions:
a. Allocation: Allocate space in memory for the program.

4
b. Linking: Resolve symbolic references between object
programs.
c. Relocation: Adjust all address-dependent locations, such as
address constant, to corresponds to the allocate space.
d. Loading: Physically places the machine instructions and data
into memory.

2. Absolute loader
Place machine code into memory at the location prescribed by the assembler.
Allocation: programmer
Linking: programmer
Relocation: assembler
Loading: loader

3. Bootstrap Loader
When a computer is first turned on or restarted, a special type of absolute loader,
called a bootstrap loader, is executed. Who occupies a predefined memory
location, resident in a ROM.

4. Relocating Loader
a. Relocation by modification records
b. Relocation by relocation bits
c. Relocation by base register (segment register)

5. Address Constant (LOC1 - LOC2)


a. Absolute
LOC1 and LOC2 are relocatable address, then the result is absolute.
b. Simple relocatable
one is relocatable and another is absolute.
c. Complex relocatable
both LOC1 and LOC2 are relocatable address and located at different routine.

6. Design a Linking Loader


Pass 1: Assigns addresses to all external symbols.
Pass 2: Performs the actual loading, relocation, and linking.

7. Overlay
The routines can not be required at the same time, thus they can be assigned to the

5
same memory location.

8. Dynamic Linking
A subroutine is load and linked when it is first called, binding of the name
(symbol) to an actual address is delayed from load time until execution
time.

Chapter 4 Macro Processors

1. Macro Call
Each macro invocation statement has been expanded into the statements that form the
body of the macro, with the argument from the macro invocation substituted for
the parameters in the macro prototype. Macro features are machine independent,
also called copy code facility.

2. Macro Processor Algorithm


a. Recognize macro definitions  Macro Name Table (NAMTAB)
b. Save the definition  Save to definition table (DEFTAB)
c. Recognize calls
d. expansion calls and substitute arguments

3. One Pass Macro Processor


Macro must be defined to the processor before it can expand calls to them (every
macro be defined before it is called).

4. Macro Processor Within Language Translator


Macro processor assembler or compiler total passes
1 pass 2 passes 3 passes
2 passes 2 passes 4 passes
1 pass 1 pass 2 passes

Chapter 5 Compilers

1. Lexical Analysis (Lexical Analyzer, Scanner)


Reads the source program one character at a time, carving the source program
into a sequence of atomic units called token. (token type, token value)

6
2. Syntax Analysis (Syntax Analyzer, Parser)
The grammar specifies the form, or syntax, of legal statements in the language.

3. Code Optimalization
Improve the intermediate code, so that the ultimate object program run fast and/or
takes less space.

4. Code Generation
Allocate memory location, select machine code for each imtermediate code, utilize
registers as efficiently as possible.

5. Grammar
Backus Naur Form grammar consists of a set of rules, each which defines the syntax
of some construct in the programming language.

6. Parse Tree
It is often convenient to display the analysis of source statement in terms of a
grammar as a tree. (Syntax Tree)

7. Ambiguous Grammar
There is more than one possible parse tree for a given statement.

8. Top Down Method


Begin with the rule of the grammar, and attempt to construct the tree so that the
terminal nodes match the statements being analyzed.

9. Bottom Up Method
Begin with the terminal nodes of the tree, and attempt to combine these into
successively higher level nodes until the root is reached.

10. Leftmost Derivation


It must be possible to decide which alternative to use by examining the next input
token..

11. Left Recursion Problem


The top down parser can not be directly used with a grammar that contains left
recursion, because unable to decide between its alternatives since both id and

7
<id-list> can begin with id.

12. Static Memory Allocation


Allocate at compiler time.

13. Dynamic Memory Allocation


Allocate at run time.
Auto : Function calls  Stack
Controlled : Malloc(), Free()  Heap

14. Activation Record


Each function call creates an activation record that contains storage for all the
variables used by the procedure, return address, … etc.

15. Prologue
The code to create a new activation record.

16. Epilogue
The code to delete the current activation record.

17. Interpreter
An interpreter processes a source program written in a high level language, just as a
compiler does. The main difference is that interpreters execute a version of the
source directly. An interpreter can be viewed as a set of subroutines, the
execution of these subroutines is driven by the internal form of the program.

18. Compiler-Compiler
A software tool that can be used to help in the task of compiler construction.

Chapter 7 Data Base Management system

1. Data Redundancy
Duplication of data items in different files.

2. Data Dependence
File characteristics are changed, the application program must also be modified.

8
3. Data Base
A collection of interrelated data stored together with as little redundancy as
possible, to serve on or more applications in an optimal fashion. The data
are stored so that they are independent of programs which use the data, a
common and controlled approach is used in adding new data and in
modifying and retrieving existing data within data base.

4. Data Independent
File structure can be changed without affecting the application programs.

5. Typical sequence of actions performed by a DBMS


a. Routine calling by application program (user)
b. Obtain the subscheme (DBMS)
Look up the description of the data.
c. Obtain the scheme (DBMS)
Determines which global data type is needed.
d. Examine physical data base description (DBMS)
Determines which physical record is needed.
e. Issue command to Operating System (DBMS)
f. Get data from secondary device (Operating System)
g. Transfer data to system buffer (Operating System)
h. Reconstruct data are needed by user (DBMS)
According subscheme and routine call.
i. Transfer data to work area of application program (DBMS)
j. Return status to application program (DBMS)
k. Return to application program (DBMS and Operating System)
Complete routine call.

Chapter 8 Software Engineering

1. Requirement Analysis
Determine what the software system must do, not how it will be done.

2. System Specification
Precise description of the desired system (what functions the system must perform).

3. System Design

9
How the software will be constructed and how the various parts will work together to
perform the desired function.

4. Corrective Maintenance
Fixes errors in the original system design and implementation.

5. Perfective Maintenance
Improves the system by addressing problems that do not involve violations of the
original requirements.

6. Adaptive Maintenance
Changes the system in order to meet changing environments and evolving user needs.

7. Enhancement
Adds new facilities to the system that were not a part of the original requirements and
were not planned for in the original design.

8. Data Flow Diagram


A data flow diagram is a representation of the movement of information between
storage and processing steps within a software system.

9. Unit Testing
Individual modules are tested.

10. Black Testing


Test cases are generated from the specification for the module, without considering
the code itself.

11. White Testing


Test cases might be designed that force the module through certain statement or
sequence of statements.

12. Integration Testing


All modules must be tested in combination with each other to be sure that interface
are correct.

13. System Testing


Verify that the entire system meets all of its specifications and requirements.

10
14. Alpha Testing
Before it is released to any outside users.

15. Beta Testing (Field Testing)


Placing the system into actual use in a limited number of environments.

16. Acceptance Testing


To decide whether or not to accept delivery of the system.

11

Potrebbero piacerti anche