2. System Software
â˘The subject introduced the design and
implementation of system software
â˘System software consists of a variety of programs
that support the operation of a computer
â˘operating system, compiler, assembler, macro processor,
loader or linker, debugger, text editor, database
management systems, software engineering tools, âŚ.
3. We Discussed OnâŚ
Machine Architecture
Assemblers
Loaders and Linkers
Editors and Debugging Systems
Macro Processor
Compilers
Lex and Yacc
4. Machine Architecture
This Chapter Gave youâŚ
â˘System Software & Machine Architecture
â˘The Simplified Instructional Computer SIC
and SIC/XE
â˘Traditional (CISC) Machines
Complex Instruction Set Computers
â˘RISC Machines
Reduced Instruction Set Computers
5. System Software & Machine
Architecture
â˘Machine Dependent
â˘Machine Independent
6. Space for
2 inch x 2 inch
size Picture
SIC Machine Architecture
â˘Memory and Registers
â˘Data Formats
â˘Instruction Formats
â˘Addressing Modes
â˘Instruction Set
â˘Input and Output
7. SIC/XE Machine Architecture
â˘Memory and Registers
â˘Data Formats
â˘Instruction Formats
â˘Addressing Modes
â˘Instruction Set
â˘Input and Output
10. Traditional (CISC) Machines
â˘Complex Instruction Set Computers
â˘Has relatively large and complex instruction set
â˘Different instruction formats, different lengths,
different addressing modes
â˘Implementation of hardware is complex
⢠VAX and Intel x86 processors are examples
11. RISC Machines
â˘Reduced Instruction Set Computers
â˘Intended to simplify the design of
processors. Greater reliability, faster
execution and less expensive processors
â˘Standard and fixed instruction length
â˘Number of machine instructions,
instruction formats, and addressing modes
relatively small
12. Comparison of these
â˘Memory
â˘Registers
â˘Data Formats
â˘Instruction Formats
â˘Addressing Modes
â˘Instruction Set
â˘Input and Output
13. Assemblers
This Chapter Gave youâŚ
-Assembler Definition
- Assembler Features
- Machine dependent and machine independent
features
- Design of various assemblers
- One-pass
- Multi-pass
14. Assemblers
⢠Translating source code written in assembly
language to object code.
⢠Assigning machine address to symbolic labels.
15. Assembler Design
⢠Assembler Design can be done in:
â Single pass
â Two pass
⢠Single Pass Assembler:
â Does everything in single pass
â Cannot resolve the forward referencing
16. ⢠Multi pass assembler:
â Does the work in two pass
â Resolves the forward references
⢠First pass:
â Scans the code
â Validates the tokens
â Creates a symbol table
⢠Second Pass:
â Solves forward references
â Converts the code to the machine code
18. Machine independent features
Literals
Symbol defining statements
Expressions
Program blocks
Control Sections and program
linkings
19. Types of Assemblers
One-pass assembler
Multi-pass assembler
Two-pass assembler with overlay
20. Loaders and Linkers
This Chapter Gave youâŚ
- Basic Loader Functions
- Machine-Dependent Loader Features
- Machine-Independent Loader Features
- Loader Design Options
- Implementation Examples
21. Role of Loader
Source Object
Object
Translator Loader program
Program ready for
Program execution
Translator â Assembler/Compiler
Memory
22. Role of Loader
Source Object
Object
Assembler Loader program
Program ready for
Program execution
Memory
23. Role of Loader and Linker
Memory
Source Object
Assembler Linker
Program Program Object
program
ready for
Executable execution
Code
Loader
24. Role of Absolute Loader
1000
Object Absolute Object
Program Loader program
ready for
execution
2000
Memory
25. Machine-Dependent Loader Features
Absolute Loader â Simple and efficient
Disadvantage is â programmer has to
specify the starting address
One program to run â no problem â not for
several
Difficult to use subroutine libraries efficiently
26. Program Linking
⢠Goal - Resolve the problems with EXTREF
and EXTDEF from different control sections
(Sec 2.3.5)
⢠Example - Program in Fig. 3.8 and object
code in Fig. 3.9
⢠Use modification records for both
relocation and linking
- address constant
- external reference
27. Machine-independent Loader Features
Features that are not directly related to
machine architecture and design
- Automatic Library Search
- Loader Options
28. Linking Loaders Object
Program(s) The source
program is first
assembled or
compiled,
producing an
Library Linking
object program.
loader A linking loader
performs all
linking and
loading
operations, and
Memory loads the
program into
memory for
Processing of an Object execution
program using LL
29. Linkage Editors Object
Program(s)
Linkage
Library editor
Linked
program
Relocating
loader
Processing of an Object
program using LE Memory
30. Implementation examplesâŚ
â˘Brief description of loaders and linkers for
actual computers
â˘They are
MS-DOS Linker - Pentium architecture
SunOS Linkers - SPARC architecture
Cray MPP Linkers â T3E architecture
31. Editors and Debugging Systems
This Chapter Gave youâŚ
- Text editors
- Interactive Debugging Systems
32. Text Editors
An Interactive text editor has become
an important part of almost any
computing environment
Text editor acts as a primary interface to the
computer for all type of âknowledge workersâ
as they compose, organize, study, and
manipulate computer-based information
33. Editing Editing
component buffer
Editing
filter
Traveling Main
component memory
input Command
language Viewing
processor Viewing Viewing filter
component buffer
Output
devices Display File
component system
Typical editor structure
34. Editors function in three basic types
of computing environments:
Time sharing
Stand-alone
Distributed
Each type of environment imposes some
constraints on the design of an editor
35. Interactive Debugging Systems
An interactive debugging system provides
programmers with facilities that aid in
testing and debugging of programs
Many such systems are available during
these days
Our discussion was broad in scope, giving the
overview of interactive debugging systems â
not specific to any particular existing system
36. We Discussed
Important functions and capabilities of
IDS
Relationship of IDS to other parts of the
system
The nature of the user interface for IDS
37. Macro Processor
This Chapter Gave youâŚ
- Basic Macro Processor Functions
- Algorithms
- Nested macros
-Comparison of different macro design
- Machine-Independent macro features
- Implementation of conditional macros
38. Macros
â˘A macro instruction (Macro) is a notational
convenience for the programmer
â˘Allows the programmer to write short hand
programs (modular programming).
â˘The macro processor replaces each macro
instruction with its equivalent block of instructions.
â˘The macro processor is not concerned with the
meaning of the involved statements during
expansion.
â˘The design of the macro processor is generally
machine independent.
39. Macro Expansion
Macro Invocation
Two-Pass Macro Processor
Design of two-pass macro processor
Pass 1:
Process all macro definitions
Pass 2:
Expand all macro invocation statements
40. One-Pass Macro Processor
â˘A one-pass macro processor that alternate
between macro definition and macro expansion
in a recursive way is able to handle recursive
macro definition
Data Structure for One-Pass Macro Processor
- DEFTAB (definition table)
- NAMTAB
- ARGTAB
45. MACHINE - DEPENDENT CODE
OPTIMIZATION
There are several different possibilities for
performing machine-dependent code optimization .
ď§ Assignment and use of registers
ď§ Divide the problem into basic blocks.
ď§ Rearrangement of machine instruction to
improve efficiency of execution
47. Lex and Yacc
-LEX is a program generator designed for
lexical processing of character input
streams.
-Yacc provides a general tool for describing
the input to a computer program
48. LEX (LEXical Analyzer Generator)
ď Features
ď Creating a Lexical Analyzer with LEX
ď LEX Source
ď LEX Regular Expressions
ď Functions
49. YACC âYet Another Compiler-Compiler
ď YACC Basic Specification
ď How does the Parser Works?
ď Ambiguity and Conflicts
ď YACC Programs
ď§ simple expression with +, - , /, and *.
ď§ recognize an valid variable.
ď Lex and Yacc
50. Notes for all the topics are available
@
http://forum.vtu.ac.in