Presentation on theme: "SYSTEM PROGRAMMING & SYSTEM ADMINISTRATION"— Presentation transcript:
1 SYSTEM PROGRAMMING & SYSTEM ADMINISTRATION UNIT-1
2 What Is System Program Some examples of system program are: Compliers System Programs were developed to make computers better adapted to the needs of their users.Some examples of system program are:CompliersLoadersMacro processorsOperating systems
3 Brief IntroductionComplier:- 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.
4 ASSEMBLERSIt 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.
5 ASSEMBLERS cont….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).
6 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 :Mnemonic operation codesSymbolic operandsData declarations
7 Execution of program written in a language L involves the following steps Translation of the program- by translatorLinking of the program with other programs needed for its execution-by linkerRelocation of the program to execute from the specific memory area allocated to itLoading of the program in the memory for the purpose of execution-by loader
8 Program Execution Binary Program Translator Linker Loader DataBinary ProgramTranslatorLinkerLoaderResultsSource ProgramBinary ProgramsObjects ModulesData flowControl flow
9 LOADERSA 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.
10 LOADERS cont…. 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.
11 MACROSMacro 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.
12 COMPLIERSA complier is a program that accepts a program written in a high level language & produces an object program.Example of high-level language are:FORTRANCOBOLALCOLInterpreter : It is a program that appears to execute a source program as if it were machine language.
13 SOFTWARE TOOLSProgram that help in developing & using other programs. These programs, called software tools.Definition:- A software tool is a system program whichInterfaces a program with the entity generating its input data.Interfaces the results of a program with the entity consuming them.
14 A Software tool A Software tool Originator Software Consumer Raw Program or DataTransformed Program or DataA Software tool
15 Software Tools For Program Development Program design, coding, & documentationPreparation of programs in machine readable formProgram translation, linkage & loadingProgram testing & debuggingPerformance tuningReforming the data and/or results of a program to suit other programs.
16 1. Program Design & Coding Two categories of tools used in program design & coding areProgram generators:- It generates a program which performs a set of functions described in its specificationProgramming environments:-It supports program coding by incorporating awareness of the programming language syntax & semantics in the lang. editor
17 2. Program Entry & Editing These are text editors or more sophisticated programs with text editors as front ends.The editor functions in 2 modes:-Command modeData mode
18 Program Testing & Debugging 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 generatorsAutomated test driversDebug monitorsSource code control systems
19 EDITORS Forms of Editors Line Editors Steam Editors Screen Editors Word ProcessorsStructure Editors
20 EDITORS cont…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.
21 EDITORS cont…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.
22 EDITORS cont…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-is-what-you-get principle in editor design. This is very useful while formatting the text to produce printed documents.
23 EDITORS cont…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.
24 EDITORS cont…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.
25 DEBUG MONITORSIt provide the following facilities for dynamic debugging :Setting breakpoints in the programInitiating a debug conversation when control reaches a breakpointDisplay values of variablesAssigning new values to variablesTesting user defined assertions & predicates involving program variables.
26 DEBUG MONITORSThe sequence of steps involved in dynamic debugging of a program is as follows:The user complies the program under the debug option. The compiler produces two files- the compiled code file & the debug information file.The user activates the debug monitor & indicates the name if the program to be debugged .
27 DEBUG MONITORS cont…The debug monitor opens the compiled code & debug information files for the program.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 .
28 DEBUG MONITORS cont…The instrumented program gets control & executes up to a breakpoints.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 .
29 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.Steps 4 & 5 are repeated until the end if the debug session.
30 PROGRAMMING ENVIRONMETS 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 bothA debug monitorA dialog monitor