systems software. – translator – assembler, cross-assembler and disassembler – compiler,...

22
Systems Software

Upload: mariam-dame

Post on 15-Dec-2015

228 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Systems Software. – Translator – Assembler, Cross-Assembler and Disassembler – Compiler, Cross-Compiler and Decompiler – Interpreters – Pre-processors

Systems Software

Page 2: Systems Software. – Translator – Assembler, Cross-Assembler and Disassembler – Compiler, Cross-Compiler and Decompiler – Interpreters – Pre-processors

Systems Software– Translator– Assembler, Cross-Assembler and Disassembler– Compiler, Cross-Compiler and Decompiler– Interpreters– Pre-processors and Macro Processors– Loaders and Linkers– Device Drivers– Operating System– Various System Tools

• Editors• Debuggers• Integrated Development Environment (IDE)• Profilers• Project Managers

Page 3: Systems Software. – Translator – Assembler, Cross-Assembler and Disassembler – Compiler, Cross-Compiler and Decompiler – Interpreters – Pre-processors

Need for Systems Software

• A computer understands only the language of binary 1s and 0s. To implement even a simple function, several thousand lines of binary code may be required, which is not practical for a computer programmer.

• • So, a semantic gap is said to exist between the

application domain (suitable for a programmer) and execution domain (used by the computer).

Page 4: Systems Software. – Translator – Assembler, Cross-Assembler and Disassembler – Compiler, Cross-Compiler and Decompiler – Interpreters – Pre-processors
Page 5: Systems Software. – Translator – Assembler, Cross-Assembler and Disassembler – Compiler, Cross-Compiler and Decompiler – Interpreters – Pre-processors

This semantic gap is made manageable by introduction of a new domain called the Programming Language (PL) Domain.

The software developer bridges the specification gap by specifying application programs in terms of programming language i.e. a software developer converts the specification of an application into a computer program. The system programmer bridges the execution gap by designing system software to interface with the machine, in machine language itself.

Page 6: Systems Software. – Translator – Assembler, Cross-Assembler and Disassembler – Compiler, Cross-Compiler and Decompiler – Interpreters – Pre-processors

Translator

Page 7: Systems Software. – Translator – Assembler, Cross-Assembler and Disassembler – Compiler, Cross-Compiler and Decompiler – Interpreters – Pre-processors

Assembler : An Assembler is a translator denoted as follows:ATA

A

Imagine an 8086 ALP program (the actual assembler) that reads an input some other 8086 ALP program and generates its

machine code for 8086 machine.

Page 8: Systems Software. – Translator – Assembler, Cross-Assembler and Disassembler – Compiler, Cross-Compiler and Decompiler – Interpreters – Pre-processors

Cross-Assembler: A Cross-Assembler is a translator denoted as follows:ATA

B

A Cross-Assembler runs on one machine, but assembles ALP of another machine and generates machine code for that machine

Page 9: Systems Software. – Translator – Assembler, Cross-Assembler and Disassembler – Compiler, Cross-Compiler and Decompiler – Interpreters – Pre-processors

Disassembler

• it converts machine code of a particular machine back to its assembly language. (Recall: reverse engineering).

• • This idea of reverse engineering is used to

recover some lost source code file using its object file.

Page 10: Systems Software. – Translator – Assembler, Cross-Assembler and Disassembler – Compiler, Cross-Compiler and Decompiler – Interpreters – Pre-processors

A Compiler is a language translator that takes as input a source program in some HLL and converts it into a lower-level language (i.e. machine or assembly language).

Page 11: Systems Software. – Translator – Assembler, Cross-Assembler and Disassembler – Compiler, Cross-Compiler and Decompiler – Interpreters – Pre-processors

Cross-Compiler

A Cross-Compiler runs on one machine, but generates machine or assembly code for another machine.

Page 12: Systems Software. – Translator – Assembler, Cross-Assembler and Disassembler – Compiler, Cross-Compiler and Decompiler – Interpreters – Pre-processors

Decompiler

• Similar to Disassembler for Assembly Language, a Decompiler traces back the machine or assembly code and converts it into source HLL program.

Page 13: Systems Software. – Translator – Assembler, Cross-Assembler and Disassembler – Compiler, Cross-Compiler and Decompiler – Interpreters – Pre-processors

Interpreters

• An Interpreter is similar to a compiler, but one big difference is that it executes each line of source code as soon as its equivalent machine code is g.enerated

Page 14: Systems Software. – Translator – Assembler, Cross-Assembler and Disassembler – Compiler, Cross-Compiler and Decompiler – Interpreters – Pre-processors

Pre-processors

• A Pre-processor converts one HLL / ALP into another HLL/ALP .

• A Macro Processor is an example of pre-processor

Page 15: Systems Software. – Translator – Assembler, Cross-Assembler and Disassembler – Compiler, Cross-Compiler and Decompiler – Interpreters – Pre-processors

Macro Processor

• A Macro is defined as a single-line abbreviation of a small sequence of statements.

• • A Macro Processor expands the macro calls

and removes macro definitions from an as input source code, which contains these macro definitions and calls.

Page 16: Systems Software. – Translator – Assembler, Cross-Assembler and Disassembler – Compiler, Cross-Compiler and Decompiler – Interpreters – Pre-processors

Linker

A Linker (or a Linkage Editor) takes the object file, loads and compiles the external sub-routines from the library and resolves their external references in the main-program.

Page 17: Systems Software. – Translator – Assembler, Cross-Assembler and Disassembler – Compiler, Cross-Compiler and Decompiler – Interpreters – Pre-processors

Loaders Programmers usually define the program to be placed at some pre-defined location in the memory. But this loading address given by the programmer may never be used, as it has not been coordinated with the OS. A Loader does the job of coordinating with the OS to get the initial loading address for the program, prepares the program for execution (i.e. generates an .exe file) and loads it at that address.

Page 18: Systems Software. – Translator – Assembler, Cross-Assembler and Disassembler – Compiler, Cross-Compiler and Decompiler – Interpreters – Pre-processors

Device Drivers

• A Device Driver is a system software that allows the OS and other applications to communicate with a specific hardware device.

• Every different hardware device can understand only its own low-level commands;

• A Device Driver translates high-level commands by OS or other applications into machine code instructions that are directly executable on the hardware device.

Page 19: Systems Software. – Translator – Assembler, Cross-Assembler and Disassembler – Compiler, Cross-Compiler and Decompiler – Interpreters – Pre-processors

Operating System

• An operating system can be viewed as an integration of system programs that act as an interface between the user and his computer.

• An OS manages CPU and different hardware

devices connected to the computer; it also provides system calls for efficient execution of common services needed by the applications.

Page 20: Systems Software. – Translator – Assembler, Cross-Assembler and Disassembler – Compiler, Cross-Compiler and Decompiler – Interpreters – Pre-processors

System Tools• System Tools are not complete systems

software; rather they assist in writing system or application software and perform various actions on it.

1. Editors2. Debuggers3. IDE4. Profilers5. Project manager

Page 21: Systems Software. – Translator – Assembler, Cross-Assembler and Disassembler – Compiler, Cross-Compiler and Decompiler – Interpreters – Pre-processors

Summary

• System programs are needed because it is impractical for a programmer to write, debug and manage huge programs in binary 0s and 1s.

• Translators convert code of one language to another.

• Assembler translates assembly language to machine code; Disassembler performs the reverse function.

• Compiler translates HLL code into machine code; Decompiler uses source HLL information in machine code to do reverse of compilation process.

• Interpreters compile programs “line-by-line”. So, they are traditionally slow. But a main advantage is that chain of errors can be avoided.

Page 22: Systems Software. – Translator – Assembler, Cross-Assembler and Disassembler – Compiler, Cross-Compiler and Decompiler – Interpreters – Pre-processors

• Pre-processors are not translators; input and output languages are the same, only input source is modified to eliminate elements like whitespaces and comments.

• Linker links object files of various subroutines with that of main program and generates .exe file. Loader manages allocation and relocation of this .exe file in main memory.

• Device Drivers convert high-level commands from OS (or other applications) into machine code instructions for direct execution on the device.

• Operating System is an integration of various system programs that act as an interface between a user and his computer.