Module 1 System Software
Module 1 System Software
Construction
CSC 602
Subject Incharge
Varsha Shrivastava
Assistant Professor
email: varshashrivastava@sfit.ac.in
Room No: 407
1
CSC 602 System Programming and
Compiler Construction
Module 1
Introduction of System Software
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 2
Course Outcomes
CO1: Identify the relevance of different system programs and also
distinguish different loaders and linkers, their contribution in
developing efficient user applications.
CO2: Analyze the various data structures and passes of assembler
design
CO3: Identify the need for different features and designing of macros.
CO4: Design Lexical Analyzer of a grammar.
CO5: Construct different parsers for given context free grammars.
CO6: Justify the need synthesis phase to produce object code
optimized in terms of high execution speed and less memory usage
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 3
Text books to refer-
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 4
Term work Distribution
• Lab work (experiments): 15 Marks
• Assignment: 05 Marks
• Attendance : 05 Marks
TOTAL 25 Marks
Final University Marks Distribution
• University final exam 80 Marks
• Internal Assessment 20 Marks
• Term work 25 Marks
• Practical exam 25 Marks
TOTAL 150 Marks
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 5
Contents as per syllabus
Introduction
Concept of System Software
Goals of System Software
System Program And System Programming
Introduction to various system programs such as
Assembler, Macro processor, Loader, Linker,
Compiler, Interpreter, Device Drivers, Operating
system, Editors, Debuggers.
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 6
Introduction to Language Processor
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 7
Introduction to Language Processor
• The designer expresses the ideas in terms related to
the application domain.
• To implement these ideas in terms related to execution
domain.
• The difference between the two domain termed as
semantic gap.
Semantic Gap
Application Execution
Domain Domain
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 8
Introduction to Language Processor
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 9
Introduction to Language Processor
• Now the semantic gap is bridged by the software
engineering steps.
• The first step bridges gap between application domain
and PL domain known as specification gap.
• While the second step bridges the gap between PL
domain and execution domain as execution gap.
Application PL Execution
Domain Domain Domain
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 10
Introduction to Language Processor
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 11
Introduction to Language Processor
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 12
Language Processing Activities
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 13
Language Processing Activities
Errors
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 14
Language Processing Activities
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 15
Language Processing Activities
DATA
M/C
Source Translator language Target
Program Program Program
Errors
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 16
Language Processing Activities
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 17
Language Processing Activities
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 18
Introduction
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 19
Introduction to System Software
• 2 types :
• Application Software
• System Software
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 20
Software's
Software
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 21
Application Software
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 22
System Software
• System software is computer software designed to
operate and control the computer hardware.
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 23
System Software
System Software
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 24
System Software vs Application Software
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 25
System Programs
• Operating Systems
• Device Drivers
• Compilers
• Preprocessor
• Interpreters
• Macro Processors
• Assemblers
• Linkers
• Loaders
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 26
Operating System
• An operating system (OS) is software that manages
computer hardware and software resources and
provides common services for computer programs.
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 27
Device Drivers
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 28
OS and Device drivers
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 29
Compilers
• Preprocessors
• A tool that produces input for compilers.
• Deals with macro-processing, augmentation, file inclusion,
language extension, etc.
• Interpreters
• Similar to compilers (translates high-level language into low-
level machine language)
• An interpreter reads a statement from the input, converts it
to an intermediate code, executes it, then takes the next
statement in sequence.
• If an error occurs, an interpreter stops execution and reports
it.
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 30
Compilers
Source Target
Program
COMPILER Program
Error messages
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 31
Compilers
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 32
Interpreter vs Compiler
Interpreter Compiler
Translates program one statement at a Scans the entire program and translates it as
time. a whole into machine code.
It takes less amount of time to analyze It takes large amount of time to analyze the
the source code but the overall execution source code but the overall execution time is
time is slower. comparatively faster.
Generates intermediate object code which
No intermediate object code is
further requires linking, hence requires more
generated, hence are memory efficient.
memory.
Continues translating the program until It generates the error message only after
the first error is met, in which case it scanning the whole program. Hence
stops. Hence debugging is easy. debugging is comparatively hard.
Programming language like Python, Ruby Programming language like C, C++ use
use interpreters. compilers.
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 33
Macro Processors
• A macro instruction is a notational convenience for
the programmer.
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 34
Macro Processors
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 35
Assemblers
• An assembler translates assembly language
programs into machine code.
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 36
Linkers
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 37
Linkers
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 38
Loaders
• Loader is a part of operating system and is
responsible for loading executable files into
memory and execute them.
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 39
Stages
Source Assembly
Program
COMPILER code
ASSEMBLER
Executabl Object
e Code
LINKER Code
Object
Program
LOADER ready for
execution
Memory
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 40
Compilation steps
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 41
University Questions
What is System Programming? List some system
programs and write their functions.
Difference between Application and system
Software.
Differentiate between application program and
system program . Indicate the order in which
following system programs are used, from
developing programs up to its execution.
Assembler, loader,linker,macroprocessor,compiler,
editor
What is Language Processing? Explain Application,
PL & Execution domain.
St. Francis Institute of Technology 20 July 2020 CSC 602:System Programming & Compiler Construction
Department of Computer Engineering Ms. Varsha Shrivastava 42
THE END!