SlideShare a Scribd company logo
1 of 6
Download to read offline
Unit I : Introduction To Systems Programming
I.I. Language Processors
1.

Systems Programming: involves developing those programs that interface the
computer system (the hardware) with the programmer and the user. These
programs include compilers, interpreters, assemblers, I/O routines, schedulers,
etc.

2.

How is systems Programming different from other types of programming ?
Systems programs are different from application programs in many ways.
a) Systems programs must deal effectively with unpredictable events or
“exceptions” (such as I/O errors).
b) Systems programs must co-ordinate the activities of various asynchronously
executing programs.
Most systems programming is done with assembly language, but C, C++, and C#
(C Sharp) are also used.

3.

Syntax of Programming Languages: ( syntax ∴ grammar)
The syntax of a programming language is the set of rules and writing
conventions that allow the formation of correct programs in a language. Syntax
deals only with the “representation”; it only controls the structure of a sentence
and nothing more. Syntax has nothing to do with the meaning or runtime
behaviour of a program. E.g., a program may be syntactically correct but not do
anything useful.
The syntax of a language is built from “syntactic elements” or “syntactic units”.
Examples of syntactic units are:
(a) Character set – e.g., English and mathematical symbols,
(b) Identifiers – names for variables, functions, etc.,
(c) Keywords,
(d) Noise words – optional words inserted in programs to improve program
readability,
(e) Comments – for program documentation,
(f) Spaces,
(g) Delimiters – e.g., to mark the beginning and end of a function in C, we use
the pair of curly braces { and }, while in Pascal we use BEGIN and END.
Requirements of syntax: We want a language with a syntax that is:
(a) Easy to read → hence easy to debug.
(b) Easy to write → fewer bugs in program
(c) Easy to verify the correctness of a program
(d) Easy to translate into another language
(e) Not ambiguous.

mukeshtekwani@hotmail.com

Page 1 of 6
Introduction to Systems Programming

4.

Prof. Mukesh N. Tekwani

Semantics: ( semantics ∴ meaning )
Semantics pertains to the meaning of words. The semantics of a language is a
description of what the sentences mean. It is much more difficult to express the
semantics of a language than it is to express the syntax. E.g., the sentence “They
are flying airplanes” has more than one meaning.
In order to implement a programming language we must know what each
sentence means (declaration, expression, etc).
E.g., does the sentence
!" produce an output,
!" take any inputs,
!" change the value stored in a variable,
!" produce an error.

5.

Domain: It refers to the scope or sphere of any activity.

6.

Application Domain: The scope of an application is its application domain.
E.g., the application domain of an inventory program is
!" warehouse and its associated tangibles (goods, machinery, etc),
!" transactions (e.g., receiving goods, purchase orders, locating goods,
shipping of goods, receiving payments, etc),
!" people (e.g., workers, managers, customers).
All the above are objects in the application domain. The application domain can
best be described by a person in that domain. E.g., the warehouse manager in the
above example.

7.

Execution Domain: (also called as the solution domain). The execution domain
is the work of programmers, e.g., program code, documentation, test results,
files, computers, etc.
The solution domain is partitioned into two levels:
!" Abstract, high-level documents, such as flow charts, diagrams
!" Low-level – data structures, function definitions, etc.

8.

Semantic Gap: The difference between the semantics of the application domain
and the execution domain is called the semantic gap.
Semantic Gap

Application
Domain
(problems,
ideas,
methods, to solve these
problems)

Page 2 of 6

Execution
Domain
(machine code, devices,
etc.)

mukeshtekwani@hotmail.com
Prof. Mukesh N. Tekwani

Introduction to Systems Programming

Consequences of semantic gap:
!" Large development times – interaction between designers in application domain and
programmers.
!" Large development efforts.
!" Poor quality of software.
How is the semantic gap reduced?
The semantic gap is reduced by programming languages (PL). The use of a PL
introduces a new domain called the programming language domain (or PL domain).
Execution
gap

Specification gap

Application

Domain

PL Domain

(problems,
ideas,
methods, to solve these
problems)

Execution

Domain

(machine code, devices,
etc.)

The PL domain bridges the gap between the application domain and the execution
domain.
!" Specification gap: It is the semantic gap between the application domain and the PL
domain. It can also be defined as the semantic gap between the two specifications of
the same task. The specification gap is bridged by the software development team.
!" Execution gap: It is the gap between the semantics of programs written in different
programming languages. The execution gap is bridged by the translator or
interpreter.

Advantages of introducing the PL domain:
(a) Large development times are reduced.
(b) Better quality of software.
(c) Language processor provides diagnostic capabilities which detects errors.
9.

Language Processor: It is a software which bridges the specification or execution
gap.

10.

Language Processing: It is any activity performed by a language processor.
Diagnostic capability is a feature of a language processor. The input of a language

mukeshtekwani@hotmail.com

Page 3 of 6
Introduction to Systems Programming

Prof. Mukesh N. Tekwani

processor is the source program. The output of a language processor is the target
program. The target program is not produced if the language processor finds any
errors in the source program.

Source program

Language Processor

Target program

Types of language processors:
(a)

Language Translator: This bridges the execution gap to the machine language
of a computer system. Examples are compiler and assembler.

(b)

De-translator: Similar to translator, but in the opposite direction.

(c)

Preprocessor: This is a language processor whose source and target languages
are both high level, i.e., no translation takes place.

11. Problem-oriented Languages: In case of problem-oriented languages. The the PL
domain is very close to the application domain. The specification gap is reduced in
this case. Such PLs can be used only for specific applications, hence they are called
problem-oriented languages. They have a large execution gap, but the execution gap
is bridged by the translator or interpreter. Using these languages, we only have to do
specify “what to do”. Software development takes less time using problem-oriented
languages, but the resultant code may not be optimized. Examples : Fourth
generation languages (4GL) like SQL.
12. Procedure-oriented languages: These provide general facilities and features which are
required in most applications. These languages are independent of application domains.
Hence, there is a large specification gap. The gap must be bridged by the application
designer. Using these languages, we have to specify “what to do” and “how to do”.
Examples. C, C++, FORTRAN, etc.

13. Compiler: A compiler is a language translator. It translates a source code (programs
in a high-level language) into the target code (machine code, or object code).

Source program

Input

Compiler

Target program

Target program

Output

To do this translation, a compiler steps through a number of phases. The simplest is
a 2-phase compiler. The first phase is called the front end and the second phase is
called the back end.
Page 4 of 6

mukeshtekwani@hotmail.com
Prof. Mukesh N. Tekwani

Introduction to Systems Programming

Front End: The front end translates from the high-level language to a common
intermediate language. The front end is source language dependent but it is
machine-independent. Thus, the front end consists of the following phases: lexical
analysis, syntactic analysis, creation of symbol table, semantic analysis and
generation of intermediate code. The front end also includes error-handling routines
for each of these phases.
Back End: The back end translates from this common intermediate language to the
machine code. The back end is machine dependent. This includes code optimization,
code generation, error-handling and symbol table operations. Thus, a compiler
bridges the execution gap.
14. Interpreter: It is a language processor. It also bridges the execution gap but does
not generate the machine code. An interpreter executes a program written in a high
level language. The essential difference between a compiler and an interpreter is that
while a compiler generates the machine code and is then no longer needed, an
interpreter is always required.

Source program
Interpreter

Output

Input

Characteristics of interpreter:
!" Machine code is not stored.
!" Source code is essential for repeated execution of statements.
!" Statement is analysed during its interpretation.
!" Useful for testing and debugging as overhead of storage is not incurred.
Differences between compiler and interpreter:
COMPILER

INTERPRETER

1.

Scans the entire program first and
then translates it into machine
code.

1.

Translates the program line-by-line.

2.

Converts the entire program to
machine code; when all the syntax
errors
have
been
removed,
execution takes place.

2.

Each time the program is executed,
every line is checked for syntax error
and then converted to equivalent
machine code.

3.

Execution time is less

3.

Execution time is more.

4.

Machine code can be saved and
used; source code and compiler no
longer needed.

4.

Machine code cannot be saved;
interpreter is always required for
translation.

mukeshtekwani@hotmail.com

Page 5 of 6
Introduction to Systems Programming

Prof. Mukesh N. Tekwani

5.

Since source code is not required,
tampering with the source code is
not possible.

5.

Source code can be easily modified and
hence no security of programs.

6.

Slow for debugging.

6.

Fast for debugging.

REVIEW QUESTIONS
1.

Define the term “systems programming”. How is systems programming different from
other types of programming?

2.

Define the term “syntax” in the context of programming languages. What are the
desirable qualities of syntax?

3.

What are syntactic units. Illustrate with examples.

4.

Explain the term “semantics” in the context of programming languages.

5.

Explain the concept of domain; elaborate on the terms “application domain” and
“execution domain”.

6.

What is “semantic gap”?
reduced?

7.

What is the need of introducing the PL domain?

8.

Explain the terms “problem-oriented language” and “procedure-oriented language”.
Give two examples of each. Mention briefly the merits and demerits of each type of
language.

9.

Define the terms “front end” and “back end” as applied to a compiler.

What are the consequences of this gap? How is this gap

10. Explain the difference between preprocessor and language translator.
11. Mention the major differences between compiler and interpreter.
*********

Page 6 of 6

mukeshtekwani@hotmail.com

More Related Content

What's hot

Life cycle of a computer program
Life cycle of a computer programLife cycle of a computer program
Life cycle of a computer programAbhay Kumar
 
Direct linking loader
Direct linking loaderDirect linking loader
Direct linking loaderbabyparul
 
Intermediate code generator
Intermediate code generatorIntermediate code generator
Intermediate code generatorsanchi29
 
Lecture 01 introduction to compiler
Lecture 01 introduction to compilerLecture 01 introduction to compiler
Lecture 01 introduction to compilerIffat Anjum
 
System Programming- Unit I
System Programming- Unit ISystem Programming- Unit I
System Programming- Unit ISaranya1702
 
software cost factor
software cost factorsoftware cost factor
software cost factorAbinaya B
 
Code optimization in compiler design
Code optimization in compiler designCode optimization in compiler design
Code optimization in compiler designKuppusamy P
 
System software - macro expansion,nested macro calls
System software - macro expansion,nested macro callsSystem software - macro expansion,nested macro calls
System software - macro expansion,nested macro callsSARASWATHI S
 

What's hot (20)

Design of a two pass assembler
Design of a two pass assemblerDesign of a two pass assembler
Design of a two pass assembler
 
Unit 3 sp assembler
Unit 3 sp assemblerUnit 3 sp assembler
Unit 3 sp assembler
 
Life cycle of a computer program
Life cycle of a computer programLife cycle of a computer program
Life cycle of a computer program
 
Direct linking loader
Direct linking loaderDirect linking loader
Direct linking loader
 
Intermediate code generator
Intermediate code generatorIntermediate code generator
Intermediate code generator
 
Macro-processor
Macro-processorMacro-processor
Macro-processor
 
Lecture 01 introduction to compiler
Lecture 01 introduction to compilerLecture 01 introduction to compiler
Lecture 01 introduction to compiler
 
Staffing level estimation
Staffing level estimation Staffing level estimation
Staffing level estimation
 
loaders and linkers
 loaders and linkers loaders and linkers
loaders and linkers
 
System Programming- Unit I
System Programming- Unit ISystem Programming- Unit I
System Programming- Unit I
 
Design notation
Design notationDesign notation
Design notation
 
Compiler design
Compiler designCompiler design
Compiler design
 
software cost factor
software cost factorsoftware cost factor
software cost factor
 
Code optimization in compiler design
Code optimization in compiler designCode optimization in compiler design
Code optimization in compiler design
 
ASSIGNMENT STATEMENTS AND
ASSIGNMENT STATEMENTS ANDASSIGNMENT STATEMENTS AND
ASSIGNMENT STATEMENTS AND
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
 
Types of Compilers
Types of CompilersTypes of Compilers
Types of Compilers
 
Two pass Assembler
Two pass AssemblerTwo pass Assembler
Two pass Assembler
 
System software - macro expansion,nested macro calls
System software - macro expansion,nested macro callsSystem software - macro expansion,nested macro calls
System software - macro expansion,nested macro calls
 
Type Checking(Compiler Design) #ShareThisIfYouLike
Type Checking(Compiler Design) #ShareThisIfYouLikeType Checking(Compiler Design) #ShareThisIfYouLike
Type Checking(Compiler Design) #ShareThisIfYouLike
 

Similar to Introduction to systems programming

1.Overview of Programming.pptx
1.Overview of Programming.pptx1.Overview of Programming.pptx
1.Overview of Programming.pptxVishwas459764
 
Intoduction to c language
Intoduction to c languageIntoduction to c language
Intoduction to c languageStudent
 
2 Programming Language.pdf
2 Programming Language.pdf2 Programming Language.pdf
2 Programming Language.pdfKINGZzofYouTube
 
Software programming and development
Software programming and developmentSoftware programming and development
Software programming and developmentAli Raza
 
design intoduction of_COMPILER_DESIGN.pdf
design intoduction of_COMPILER_DESIGN.pdfdesign intoduction of_COMPILER_DESIGN.pdf
design intoduction of_COMPILER_DESIGN.pdfadvRajatSharma
 
Introduction to programming language (basic)
Introduction to programming language (basic)Introduction to programming language (basic)
Introduction to programming language (basic)nharsh2308
 
Algorithm and flowchart(1)
Algorithm and flowchart(1)Algorithm and flowchart(1)
Algorithm and flowchart(1)Suneel Dogra
 
Unit 1_Evaluation Criteria_session 3.pptx
Unit 1_Evaluation Criteria_session 3.pptxUnit 1_Evaluation Criteria_session 3.pptx
Unit 1_Evaluation Criteria_session 3.pptxAsst.prof M.Gokilavani
 
Introduction to compiler
Introduction to compilerIntroduction to compiler
Introduction to compilerA. S. M. Shafi
 
Chap 1-language processor
Chap 1-language processorChap 1-language processor
Chap 1-language processorshindept123
 
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfINTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfSubramanyambharathis
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & LanguagesGaditek
 

Similar to Introduction to systems programming (20)

1.Overview of Programming.pptx
1.Overview of Programming.pptx1.Overview of Programming.pptx
1.Overview of Programming.pptx
 
Intoduction to c language
Intoduction to c languageIntoduction to c language
Intoduction to c language
 
2 Programming Language.pdf
2 Programming Language.pdf2 Programming Language.pdf
2 Programming Language.pdf
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
Software programming and development
Software programming and developmentSoftware programming and development
Software programming and development
 
CS3251-_PIC
CS3251-_PICCS3251-_PIC
CS3251-_PIC
 
design intoduction of_COMPILER_DESIGN.pdf
design intoduction of_COMPILER_DESIGN.pdfdesign intoduction of_COMPILER_DESIGN.pdf
design intoduction of_COMPILER_DESIGN.pdf
 
Ppt 1
Ppt 1Ppt 1
Ppt 1
 
Introduction to programming language (basic)
Introduction to programming language (basic)Introduction to programming language (basic)
Introduction to programming language (basic)
 
Algorithm and flowchart(1)
Algorithm and flowchart(1)Algorithm and flowchart(1)
Algorithm and flowchart(1)
 
Introduction to programming c
Introduction to programming cIntroduction to programming c
Introduction to programming c
 
C.pdf
C.pdfC.pdf
C.pdf
 
Unit 1_Evaluation Criteria_session 3.pptx
Unit 1_Evaluation Criteria_session 3.pptxUnit 1_Evaluation Criteria_session 3.pptx
Unit 1_Evaluation Criteria_session 3.pptx
 
COMPILER DESIGN.docx
COMPILER DESIGN.docxCOMPILER DESIGN.docx
COMPILER DESIGN.docx
 
Unit 1
Unit 1Unit 1
Unit 1
 
Introduction to compiler
Introduction to compilerIntroduction to compiler
Introduction to compiler
 
Chap 1-language processor
Chap 1-language processorChap 1-language processor
Chap 1-language processor
 
C programme presentation
C programme presentationC programme presentation
C programme presentation
 
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfINTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
 

More from Mukesh Tekwani

ISCE-Class 12-Question Bank - Electrostatics - Physics
ISCE-Class 12-Question Bank - Electrostatics  -  PhysicsISCE-Class 12-Question Bank - Electrostatics  -  Physics
ISCE-Class 12-Question Bank - Electrostatics - PhysicsMukesh Tekwani
 
Hexadecimal to binary conversion
Hexadecimal to binary conversion Hexadecimal to binary conversion
Hexadecimal to binary conversion Mukesh Tekwani
 
Hexadecimal to decimal conversion
Hexadecimal to decimal conversion Hexadecimal to decimal conversion
Hexadecimal to decimal conversion Mukesh Tekwani
 
Hexadecimal to octal conversion
Hexadecimal to octal conversionHexadecimal to octal conversion
Hexadecimal to octal conversionMukesh Tekwani
 
Gray code to binary conversion
Gray code to binary conversion Gray code to binary conversion
Gray code to binary conversion Mukesh Tekwani
 
Decimal to Binary conversion
Decimal to Binary conversionDecimal to Binary conversion
Decimal to Binary conversionMukesh Tekwani
 
Video Lectures for IGCSE Physics 2020-21
Video Lectures for IGCSE Physics 2020-21Video Lectures for IGCSE Physics 2020-21
Video Lectures for IGCSE Physics 2020-21Mukesh Tekwani
 
Refraction and dispersion of light through a prism
Refraction and dispersion of light through a prismRefraction and dispersion of light through a prism
Refraction and dispersion of light through a prismMukesh Tekwani
 
Refraction of light at a plane surface
Refraction of light at a plane surfaceRefraction of light at a plane surface
Refraction of light at a plane surfaceMukesh Tekwani
 
Atom, origin of spectra Bohr's theory of hydrogen atom
Atom, origin of spectra Bohr's theory of hydrogen atomAtom, origin of spectra Bohr's theory of hydrogen atom
Atom, origin of spectra Bohr's theory of hydrogen atomMukesh Tekwani
 
Refraction of light at spherical surfaces of lenses
Refraction of light at spherical surfaces of lensesRefraction of light at spherical surfaces of lenses
Refraction of light at spherical surfaces of lensesMukesh Tekwani
 
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGEISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGEMukesh Tekwani
 
TCP-IP Reference Model
TCP-IP Reference ModelTCP-IP Reference Model
TCP-IP Reference ModelMukesh Tekwani
 

More from Mukesh Tekwani (20)

Circular motion
Circular motionCircular motion
Circular motion
 
Gravitation
GravitationGravitation
Gravitation
 
ISCE-Class 12-Question Bank - Electrostatics - Physics
ISCE-Class 12-Question Bank - Electrostatics  -  PhysicsISCE-Class 12-Question Bank - Electrostatics  -  Physics
ISCE-Class 12-Question Bank - Electrostatics - Physics
 
Hexadecimal to binary conversion
Hexadecimal to binary conversion Hexadecimal to binary conversion
Hexadecimal to binary conversion
 
Hexadecimal to decimal conversion
Hexadecimal to decimal conversion Hexadecimal to decimal conversion
Hexadecimal to decimal conversion
 
Hexadecimal to octal conversion
Hexadecimal to octal conversionHexadecimal to octal conversion
Hexadecimal to octal conversion
 
Gray code to binary conversion
Gray code to binary conversion Gray code to binary conversion
Gray code to binary conversion
 
What is Gray Code?
What is Gray Code? What is Gray Code?
What is Gray Code?
 
Decimal to Binary conversion
Decimal to Binary conversionDecimal to Binary conversion
Decimal to Binary conversion
 
Video Lectures for IGCSE Physics 2020-21
Video Lectures for IGCSE Physics 2020-21Video Lectures for IGCSE Physics 2020-21
Video Lectures for IGCSE Physics 2020-21
 
Refraction and dispersion of light through a prism
Refraction and dispersion of light through a prismRefraction and dispersion of light through a prism
Refraction and dispersion of light through a prism
 
Refraction of light at a plane surface
Refraction of light at a plane surfaceRefraction of light at a plane surface
Refraction of light at a plane surface
 
Spherical mirrors
Spherical mirrorsSpherical mirrors
Spherical mirrors
 
Atom, origin of spectra Bohr's theory of hydrogen atom
Atom, origin of spectra Bohr's theory of hydrogen atomAtom, origin of spectra Bohr's theory of hydrogen atom
Atom, origin of spectra Bohr's theory of hydrogen atom
 
Refraction of light at spherical surfaces of lenses
Refraction of light at spherical surfaces of lensesRefraction of light at spherical surfaces of lenses
Refraction of light at spherical surfaces of lenses
 
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGEISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
 
Cyber Laws
Cyber LawsCyber Laws
Cyber Laws
 
XML
XMLXML
XML
 
Social media
Social mediaSocial media
Social media
 
TCP-IP Reference Model
TCP-IP Reference ModelTCP-IP Reference Model
TCP-IP Reference Model
 

Recently uploaded

BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...Nguyen Thanh Tu Collection
 
Sulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesSulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesVijayaLaxmi84
 
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxCLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxAnupam32727
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...DhatriParmar
 
ARTERIAL BLOOD GAS ANALYSIS........pptx
ARTERIAL BLOOD  GAS ANALYSIS........pptxARTERIAL BLOOD  GAS ANALYSIS........pptx
ARTERIAL BLOOD GAS ANALYSIS........pptxAneriPatwari
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQuiz Club NITW
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfChristalin Nelson
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...Nguyen Thanh Tu Collection
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdfMr Bounab Samir
 
Comparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptxComparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptxAvaniJani1
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
How to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineHow to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineCeline George
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationdeepaannamalai16
 
Objectives n learning outcoms - MD 20240404.pptx
Objectives n learning outcoms - MD 20240404.pptxObjectives n learning outcoms - MD 20240404.pptx
Objectives n learning outcoms - MD 20240404.pptxMadhavi Dharankar
 

Recently uploaded (20)

Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
 
Sulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesSulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their uses
 
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxCLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
 
ARTERIAL BLOOD GAS ANALYSIS........pptx
ARTERIAL BLOOD  GAS ANALYSIS........pptxARTERIAL BLOOD  GAS ANALYSIS........pptx
ARTERIAL BLOOD GAS ANALYSIS........pptx
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdf
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdf
 
Comparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptxComparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptx
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
How to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineHow to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command Line
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentation
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
Objectives n learning outcoms - MD 20240404.pptx
Objectives n learning outcoms - MD 20240404.pptxObjectives n learning outcoms - MD 20240404.pptx
Objectives n learning outcoms - MD 20240404.pptx
 

Introduction to systems programming

  • 1. Unit I : Introduction To Systems Programming I.I. Language Processors 1. Systems Programming: involves developing those programs that interface the computer system (the hardware) with the programmer and the user. These programs include compilers, interpreters, assemblers, I/O routines, schedulers, etc. 2. How is systems Programming different from other types of programming ? Systems programs are different from application programs in many ways. a) Systems programs must deal effectively with unpredictable events or “exceptions” (such as I/O errors). b) Systems programs must co-ordinate the activities of various asynchronously executing programs. Most systems programming is done with assembly language, but C, C++, and C# (C Sharp) are also used. 3. Syntax of Programming Languages: ( syntax ∴ grammar) The syntax of a programming language is the set of rules and writing conventions that allow the formation of correct programs in a language. Syntax deals only with the “representation”; it only controls the structure of a sentence and nothing more. Syntax has nothing to do with the meaning or runtime behaviour of a program. E.g., a program may be syntactically correct but not do anything useful. The syntax of a language is built from “syntactic elements” or “syntactic units”. Examples of syntactic units are: (a) Character set – e.g., English and mathematical symbols, (b) Identifiers – names for variables, functions, etc., (c) Keywords, (d) Noise words – optional words inserted in programs to improve program readability, (e) Comments – for program documentation, (f) Spaces, (g) Delimiters – e.g., to mark the beginning and end of a function in C, we use the pair of curly braces { and }, while in Pascal we use BEGIN and END. Requirements of syntax: We want a language with a syntax that is: (a) Easy to read → hence easy to debug. (b) Easy to write → fewer bugs in program (c) Easy to verify the correctness of a program (d) Easy to translate into another language (e) Not ambiguous. mukeshtekwani@hotmail.com Page 1 of 6
  • 2. Introduction to Systems Programming 4. Prof. Mukesh N. Tekwani Semantics: ( semantics ∴ meaning ) Semantics pertains to the meaning of words. The semantics of a language is a description of what the sentences mean. It is much more difficult to express the semantics of a language than it is to express the syntax. E.g., the sentence “They are flying airplanes” has more than one meaning. In order to implement a programming language we must know what each sentence means (declaration, expression, etc). E.g., does the sentence !" produce an output, !" take any inputs, !" change the value stored in a variable, !" produce an error. 5. Domain: It refers to the scope or sphere of any activity. 6. Application Domain: The scope of an application is its application domain. E.g., the application domain of an inventory program is !" warehouse and its associated tangibles (goods, machinery, etc), !" transactions (e.g., receiving goods, purchase orders, locating goods, shipping of goods, receiving payments, etc), !" people (e.g., workers, managers, customers). All the above are objects in the application domain. The application domain can best be described by a person in that domain. E.g., the warehouse manager in the above example. 7. Execution Domain: (also called as the solution domain). The execution domain is the work of programmers, e.g., program code, documentation, test results, files, computers, etc. The solution domain is partitioned into two levels: !" Abstract, high-level documents, such as flow charts, diagrams !" Low-level – data structures, function definitions, etc. 8. Semantic Gap: The difference between the semantics of the application domain and the execution domain is called the semantic gap. Semantic Gap Application Domain (problems, ideas, methods, to solve these problems) Page 2 of 6 Execution Domain (machine code, devices, etc.) mukeshtekwani@hotmail.com
  • 3. Prof. Mukesh N. Tekwani Introduction to Systems Programming Consequences of semantic gap: !" Large development times – interaction between designers in application domain and programmers. !" Large development efforts. !" Poor quality of software. How is the semantic gap reduced? The semantic gap is reduced by programming languages (PL). The use of a PL introduces a new domain called the programming language domain (or PL domain). Execution gap Specification gap Application Domain PL Domain (problems, ideas, methods, to solve these problems) Execution Domain (machine code, devices, etc.) The PL domain bridges the gap between the application domain and the execution domain. !" Specification gap: It is the semantic gap between the application domain and the PL domain. It can also be defined as the semantic gap between the two specifications of the same task. The specification gap is bridged by the software development team. !" Execution gap: It is the gap between the semantics of programs written in different programming languages. The execution gap is bridged by the translator or interpreter. Advantages of introducing the PL domain: (a) Large development times are reduced. (b) Better quality of software. (c) Language processor provides diagnostic capabilities which detects errors. 9. Language Processor: It is a software which bridges the specification or execution gap. 10. Language Processing: It is any activity performed by a language processor. Diagnostic capability is a feature of a language processor. The input of a language mukeshtekwani@hotmail.com Page 3 of 6
  • 4. Introduction to Systems Programming Prof. Mukesh N. Tekwani processor is the source program. The output of a language processor is the target program. The target program is not produced if the language processor finds any errors in the source program. Source program Language Processor Target program Types of language processors: (a) Language Translator: This bridges the execution gap to the machine language of a computer system. Examples are compiler and assembler. (b) De-translator: Similar to translator, but in the opposite direction. (c) Preprocessor: This is a language processor whose source and target languages are both high level, i.e., no translation takes place. 11. Problem-oriented Languages: In case of problem-oriented languages. The the PL domain is very close to the application domain. The specification gap is reduced in this case. Such PLs can be used only for specific applications, hence they are called problem-oriented languages. They have a large execution gap, but the execution gap is bridged by the translator or interpreter. Using these languages, we only have to do specify “what to do”. Software development takes less time using problem-oriented languages, but the resultant code may not be optimized. Examples : Fourth generation languages (4GL) like SQL. 12. Procedure-oriented languages: These provide general facilities and features which are required in most applications. These languages are independent of application domains. Hence, there is a large specification gap. The gap must be bridged by the application designer. Using these languages, we have to specify “what to do” and “how to do”. Examples. C, C++, FORTRAN, etc. 13. Compiler: A compiler is a language translator. It translates a source code (programs in a high-level language) into the target code (machine code, or object code). Source program Input Compiler Target program Target program Output To do this translation, a compiler steps through a number of phases. The simplest is a 2-phase compiler. The first phase is called the front end and the second phase is called the back end. Page 4 of 6 mukeshtekwani@hotmail.com
  • 5. Prof. Mukesh N. Tekwani Introduction to Systems Programming Front End: The front end translates from the high-level language to a common intermediate language. The front end is source language dependent but it is machine-independent. Thus, the front end consists of the following phases: lexical analysis, syntactic analysis, creation of symbol table, semantic analysis and generation of intermediate code. The front end also includes error-handling routines for each of these phases. Back End: The back end translates from this common intermediate language to the machine code. The back end is machine dependent. This includes code optimization, code generation, error-handling and symbol table operations. Thus, a compiler bridges the execution gap. 14. Interpreter: It is a language processor. It also bridges the execution gap but does not generate the machine code. An interpreter executes a program written in a high level language. The essential difference between a compiler and an interpreter is that while a compiler generates the machine code and is then no longer needed, an interpreter is always required. Source program Interpreter Output Input Characteristics of interpreter: !" Machine code is not stored. !" Source code is essential for repeated execution of statements. !" Statement is analysed during its interpretation. !" Useful for testing and debugging as overhead of storage is not incurred. Differences between compiler and interpreter: COMPILER INTERPRETER 1. Scans the entire program first and then translates it into machine code. 1. Translates the program line-by-line. 2. Converts the entire program to machine code; when all the syntax errors have been removed, execution takes place. 2. Each time the program is executed, every line is checked for syntax error and then converted to equivalent machine code. 3. Execution time is less 3. Execution time is more. 4. Machine code can be saved and used; source code and compiler no longer needed. 4. Machine code cannot be saved; interpreter is always required for translation. mukeshtekwani@hotmail.com Page 5 of 6
  • 6. Introduction to Systems Programming Prof. Mukesh N. Tekwani 5. Since source code is not required, tampering with the source code is not possible. 5. Source code can be easily modified and hence no security of programs. 6. Slow for debugging. 6. Fast for debugging. REVIEW QUESTIONS 1. Define the term “systems programming”. How is systems programming different from other types of programming? 2. Define the term “syntax” in the context of programming languages. What are the desirable qualities of syntax? 3. What are syntactic units. Illustrate with examples. 4. Explain the term “semantics” in the context of programming languages. 5. Explain the concept of domain; elaborate on the terms “application domain” and “execution domain”. 6. What is “semantic gap”? reduced? 7. What is the need of introducing the PL domain? 8. Explain the terms “problem-oriented language” and “procedure-oriented language”. Give two examples of each. Mention briefly the merits and demerits of each type of language. 9. Define the terms “front end” and “back end” as applied to a compiler. What are the consequences of this gap? How is this gap 10. Explain the difference between preprocessor and language translator. 11. Mention the major differences between compiler and interpreter. ********* Page 6 of 6 mukeshtekwani@hotmail.com