What is System Programming?

Overview of System Programming

A modern computer has powerful capabilities such as a fast CPU, large memory, sophisticated input-output devices, and networking support. However, it has to be instructed through the machine language(system programming), which has strings of 0s and 1s as its instructions. A typical computer user does not wishto interact with the computer at this level. The system software is a collection of programs that bridge the gap between the level at which user wish to interact with the computer and the level at which computer is capable of operating where system programming is necessary. System programming forms a software layer which acts as an intermediary between the user and computer.

 

What is system programming?

 

System programming performs two functions: It translates the need of user into a form that the computer can understand so that the user’s program can actually get executed on the computer. However the computer has more resources than needed by a program, many of its resources would remain idle while it is serving one program. To avoid this problem, the software layer gives the idle resources to some other programs and interleaves execution of all these system programs on the computer. This way, the computer can provide service to many users simultaneously.

 

Each program in the system software is called a system program. System programs perform various tasks such as editing a program, compiling it, and arranging for its execution. They also perform various tasks that a user is often unaware of, such as reading a program for execution by linking it with other programs and with functions from libraries and protecting a program a program against interference from other programs and users. The term system programming is used to describe the collection of techniques used in the design of system programs.

 

Language processor (for system programming)

A language processor is a system programming that bridges the gap between how a user describes a computation and how a computer executes a program.

Two kinds of language processors are used to implement a user’s computation. A System programming program generator converts the specification written by the user into a program in a procedure-oriented language, whereas a compiler or interpreter helps in implementing a program written in a system programming language.

 

We assume that each domain has a specification language. A specification written in a specification language is a program in that language. The specification language of execution domain is the machine language of the computer system. We use the terms specification gap and execution gap as follows:

  • Specification gap is the semantic gap between two specifications of the same task.
  • Execution Gap is the semantic gap between the semantics of programs that perform the same task but are written in different programming languages.

 

A semantic gap is bridged by converting a specification in one domain into a specification in another domain.

Program generation:

The program generator is a system programming program which accepts the specification of a programming some language and generates a program in the target language that fulfills the specification. The execution gap between the target language and the execution domain is bridged by a compiler or interpreter for the system programming language.

A practical arrangement of language processors

 A practical arrangement of language processors

Important features of this arrangement are described below.

  • Pre-processors: one or more preprocessors may be used along with a translator for a system programming language to provide a superset of the system programming language’s features. The use of C++ pre-processors along with a C compiler enables the use of C++ language without having to develop a C++ compiler.
  • Using a sequence of translators: translation from a programming language to a machine language may be achieved by using two or more translators. The translator used in 1st step produces a target program that is not in the machine language(system programming). This targeted program is input to another translator, and son on until we obtain a target program that is that is in the machine language.
  • Linking and Loading: target program obtained by translating a program written in a programming language requires the help of some other programs during its execution, eg., programs that perform input-output or standard mathematical functions. The linker is a system program that puts all these programs together so that they can execute meaningfully. Loader is a program that loads a ready-to-run program from a file into the computer’s memory for execution

Front end of toy compiler

 

Front end of toy compiler

Fig shows how tables and intermediate system programming codes are generated and used in the front end. Scanning and parsing are technical terms for lexical analysis and syntax analysis.

Lexical analysis (Scanning)

The lexical analysis considers the source program as a string of characters. It identifies strings that are lexical units, classifies them into different lexical classes, eg, operators, identifiers, or constants; and enters them into relevant tables. The classification is based on the specification of the source language. For example, an integer constant is a string of digits with an optional sign, an identifier is a string of letters, digits and special symbols whose first character is a letter, whereas a reserved word is a string that has a fixed meaning in the language. It builds an intermediate code that is a sequence of intermediate units called tokens, where a token is a descriptor for a lexical unit. A token contains 2 fields- lexical class and number in the class.

The back end performs memory allocation and code generation.

 

        the back end of toy compiler

 

Memory allocation

The back end computes the memory requirement of a variable from its type, length and dimensionality information found in the symbol table, and allocates memory to it. The address of the allocated memory area is entered in the symbol table.

Code generation

Complex decisions are involved in generating target code. Two decisions are as follows:

  1. What instructions should be used for each of the actions in the intermediate code?
  2. What CPU register should be used for evaluating expressions?

Basically, all these things count together and system programming part is formed. Speaking in simple words system programming language is the language that is used for system programming. System software is written by such language which requires different approach towards development as compared to application software. One fine example of system software is an operating system, drivers, linkers, and loaders.

System programming software provides more direct access to system hardware. A typical programming language was BCPL. System programming languages often lack in built-in input and output devices.

Also, read more about system programming and operating system

Basic Processing Unit: Computer Organization

Viva Questions: Operating System

File System Interface In Operating System…

Like us on Facebook

EntcEngg

Leave a Reply


Are You in Search
of A Job?

Subscribe to get job Alerts straight to your email inbox absolutely Free!

Thank you for subscribing.

Something went wrong.