SYSTEM PROGRAMMING SYSTEM ADMINISTRATION UNIT1 What Is System

  • Slides: 30
Download presentation
SYSTEM PROGRAMMING & SYSTEM ADMINISTRATION UNIT-1

SYSTEM PROGRAMMING & SYSTEM ADMINISTRATION UNIT-1

What Is System Programs were developed to make computers better adapted to the needs

What Is System Programs were developed to make computers better adapted to the needs of their users. v Some examples of system program are: • Compliers • Loaders • Macro processors • Operating systems v

Brief Introduction n n Complier: - They are systems programs that accept people-like languages

Brief Introduction n n Complier: - They are systems programs that accept people-like languages & translate them into machine language. Loaders: - They prepare machine language program for execution. Macro processors: - They allow programmers to use abbreviations. Operating Systems & file system: -They allow flexible storing & retrieval of information.

ASSEMBLERS n n n It is difficult for programmers to write or read programs

ASSEMBLERS n n n It is difficult for programmers to write or read programs in machine language. So they began to use a mnemonic (symbol) for each machine instruction , which they would subsequently translate into machine language. Such a mnemonic language is known as ASSEMBLY LANGUAGE.

ASSEMBLERS cont…. n n n Assemblers are programs written to automate the translation of

ASSEMBLERS cont…. n n n Assemblers are programs written to automate the translation of assembly language in to machine language. The input to an assembler program is called the source program. The output is a machine translation (object program).

ASSEMBLERS cont…. An assembly language is a machine dependent, low level programming language which

ASSEMBLERS cont…. An assembly language is a machine dependent, low level programming language which is specific to a certain computer system. Three basic features which simplify programming : 1. Mnemonic operation codes 2. Symbolic operands 3. Data declarations n

Execution of program written in a language L involves the following steps Translation of

Execution of program written in a language L involves the following steps Translation of the program- by translator 2. Linking of the program with other programs needed for its execution-by linker 3. Relocation of the program to execute from the specific memory area allocated to it 4. Loading of the program in the memory for the purpose of execution-by loader 1.

Program Execution Data Translator Linker Loader Binary Program Results Source Program Objects Modules Binary

Program Execution Data Translator Linker Loader Binary Program Results Source Program Objects Modules Binary Programs Data flow Control flow

LOADERS n n n A loader is a program that places programs into memory

LOADERS n n n A loader is a program that places programs into memory & prepares them for execution. In a simple loading scheme, the assembler outputs the machine language translation of a program on a secondary device & a loader is placed in core (memory). Subroutines: - It is a body of computer instruction designed to be used by others routines to accomplish a task.

LOADERS cont…. n Ø Ø Two types of subroutines are Closed subroutines: It can

LOADERS cont…. n Ø Ø Two types of subroutines are Closed subroutines: It can be stored outside the main routine &control transfers to the subroutine. Open subroutines : It is one whose code is inserted into main program.

MACROS n n Macro processing facility which permits the programmer to define an abbreviation

MACROS n n Macro processing facility which permits the programmer to define an abbreviation for a part of his program & to use the abbreviation in his program. The macro processor treats the identical parts of program defined by the abbreviation as a macro definition & saves the definition.

COMPLIERS A complier is a program that accepts a program written in a high

COMPLIERS A complier is a program that accepts a program written in a high level language & produces an object program. n Example of high-level language are: Ø FORTRAN Ø COBOL Ø ALCOL q Interpreter : It is a program that appears to execute a source program as if it were machine language. n

SOFTWARE TOOLS Program that help in developing & using other programs. These programs, called

SOFTWARE TOOLS Program that help in developing & using other programs. These programs, called software tools. n Definition: - A software tool 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. n

A Software tool Originator Software Raw Program or Data Consumer Transformed Program or Data

A Software tool Originator Software Raw Program or Data Consumer Transformed Program or Data A Software tool

Software Tools For Program Development 1. 2. 3. 4. 5. 6. Program design, coding,

Software Tools For Program Development 1. 2. 3. 4. 5. 6. Program design, coding, & documentation Preparation of programs in machine readable form Program translation, linkage & loading Program testing & debugging Performance tuning Reforming the data and/or results of a program to suit other programs.

1. Program Design & Coding Two categories of tools used in program design &

1. Program Design & Coding Two categories of tools used in program design & coding are 1. Program generators: - It generates a program which performs a set of functions described in its specification 2. Programming environments: -It supports program coding by incorporating awareness of the programming language syntax & semantics in the lang. editor n

2. Program Entry & Editing n n 1. 2. These are text editors or

2. Program Entry & Editing n n 1. 2. These are text editors or more sophisticated programs with text editors as front ends. The editor functions in 2 modes: Command mode Data mode

Program Testing & Debugging n n 1. 2. 3. 4. Main steps in this

Program Testing & Debugging n n 1. 2. 3. 4. Main steps in this are selection of test data for the program, analysis of test results to detect errors, & debugging i. e. localization & removal of errors. Software tools to assist the programmer in these steps are: Test data generators Automated test drivers Debug monitors Source code control systems

EDITORS n 1. 2. 3. 4. 5. Forms of Editors Line Editors Steam Editors

EDITORS n 1. 2. 3. 4. 5. Forms of Editors Line Editors Steam Editors Screen Editors Word Processors Structure Editors

EDITORS cont… n Line Editors: - The scope of edit operations in a line

EDITORS cont… n Line Editors: - The scope of edit operations in a line editor is limited to a line of text. The line is designed positionally, e. g. by specifying its serial number in the text, or contextually, e. g. by specifying a context which uniquely identifies it.

EDITORS cont… n Stream Editors: - A stream editor views the entire text as

EDITORS cont… n Stream Editors: - A stream editor views the entire text as a stream of characters. They typically supports characters, line, & context oriented commands based on the current editing context indicated by the position of a text pointer.

EDITORS cont… n Screen Editors: - A line or stream editors does not display

EDITORS cont… n Screen Editors: - A line or stream editors does not display the text in the manner it would appear if printed. A screen editor uses the what-you –see-iswhat-you-get principle in editor design. This is very useful while formatting the text to produce printed documents.

EDITORS cont… n Word processors: - They are document editors with additional features to

EDITORS cont… n Word processors: - They are document editors with additional features to produce well formatted hard copy output. Essentials features are commands for moving sections of text from one place to another, merging of text, & searching & replacement of words. Many word processor support a spell-check option.

EDITORS cont… n Structures Editors: - A structure editor incorporates an awareness of the

EDITORS cont… n Structures Editors: - A structure editor incorporates an awareness of the structure of a document. This is useful in browsing through a document , e. g. if a programmer wishes to edit a specific function in a file.

DEBUG MONITORS n 1. 2. 3. 4. 5. It provide the following facilities for

DEBUG MONITORS n 1. 2. 3. 4. 5. It provide the following facilities for dynamic debugging : Setting breakpoints in the program Initiating a debug conversation when control reaches a breakpoint Display values of variables Assigning new values to variables Testing user defined assertions & predicates involving program variables.

DEBUG MONITORS The sequence of steps involved in dynamic debugging of a program is

DEBUG MONITORS The sequence of steps involved in dynamic debugging of a program is as follows: 1. The user complies the program under the debug option. The compiler produces two files- the compiled code file & the debug information file. 2. The user activates the debug monitor & indicates the name if the program to be debugged. n

DEBUG MONITORS cont… The debug monitor opens the compiled code & debug information files

DEBUG MONITORS cont… The debug monitor opens the compiled code & debug information files for the program. 3. The user specifies his debug requirements – a list of breakpoints & actions to be performed at breakpoints. The debug monitor instruments the program, & builds a debug table containing the pairs. 2.

DEBUG MONITORS cont… The instrumented program gets control & executes up to a breakpoints.

DEBUG MONITORS cont… The instrumented program gets control & executes up to a breakpoints. 5. A software interrupt is generated when the <SI_instrn> is executed. Control is given to the debug monitor which consults the debug table & performs the debug actions specified for the breakpoints. 4.

DEBUG MONITORS cont… A debug conversation is now opened during which the user may

DEBUG MONITORS cont… A debug conversation is now opened during which the user may issue some debug commands or modify breakpoints & debug actions associated with breakpoints. 6. Steps 4 & 5 are repeated until the end if the debug session.

PROGRAMMING ENVIRONMETS n 1. 2. 3. 4. A programming environment is a software system

PROGRAMMING ENVIRONMETS n 1. 2. 3. 4. A programming environment is a software system that provides integrated facilities for program creation, editing, execution , testing, & debugging. It consists of the following components : A syntax directed editor (which is a structure editor) A language processor –a complier, interpreter, or both A debug monitor A dialog monitor