SOFTWARE HIERARCHY
MACHINE STRUCTURE
Computer and its software have their hierarchy levels as shown above. Application program (eg, Media players, paint, MS word etc) come on the highest level of hierarchy while machine level language come at the lowest hierarchy (not shown in diagram). High level programming languages include C, fortran etc. Operating system include windows, unix, mach os and Assembly level program include MASM, TASM etc.
MACHINE STRUCTURE
Von Neumann was first to propose the general structure of the machines. The current computer hardware technology follows his principle with suitable modifications.
The structure of CPU for a typical Von Neumann Machine is as above and it consists of -
1. Instruction Interpreter
2. Location Counter
3. Instruction Register
4. Working Registers
5. General Register
The Instruction Interpreter Hardware is basically a group of circuits that perform the operation specified by the instructions fetched from the memory. The Location Counter can also be called as Program/Instruction Counter simply points to the current instruction being executed. The working registers are used to store temporary values while calculation is in progress. This CPU interfaces with Memory through MAR & MBR. MAR (Memory Address Register) - contains address of memory location (to be read from or stored into) MBR (Memory Buffer Register) - contains copy of address specified by MAR Memory controller is used to transfer data between MBR & the memory location specified by MAR. The role of I/O Channels is to input or output information from memory.
INTERFACES
Computer hardware, software, or users alone are not sufficient to perform tasks using computers. Some mechanism for communication is necessary between the computer hardware and the user. Similarly, another interface is necessary between the computer hardware and the system software,
User interface
Computer hardware vary from computer to computer but the structure of standard computer remains the same. Users are always interested in compiling their program, executing some packets etc with the help of computer system. Only hardware is insufficient to perform the tasks of users, the interaction between the hardware and the user is very necessary. Operating system and the system software are present or involved for interfacing.
System interface
Hardware is a physical component and software is a logical component of computer system and there has to be a mechanism for interaction between logical and physical environment. This mechanism is known as system interface that works between operating system and the hardware. Also low level set of instruction acts as an system interface.
ADDRESS SPACE
Each byte of physical memory has an address. This addresses are expressed in integer values. This is termed as address space. When it is related to physical memory it is physical address space, and when it is related to address space used by programmer then it is logical address space. Logical address space may start from 0 while physical may not. Logical address appears to be contiguous and physical address may be non contiguous.
In computer program two types of addressing schemes are used. Relative addressing and absolute addressing, relative addressing scheme the code can be loaded at any available space in memory whereas in absolute the code can be loaded into primary memory at specified location but the content of memory can be overloaded
COMPUTER LANGUAGES
Computers understand programs written by user in programming languages so for this there must be an interface between computer hardware and a programming language used by user. Compiler is a interface used for programming languages. Any computer may be programmed differenlty using different languages. Below are the hierarchy of computer languages :-
Diagram shows different types of languages. Above all we have high level language which is machine independent and programmer doesnt have to remember the structure of the machine for the coding. Assembly level language is an improved version of mnemonic language as set of user defined variables is used when coding the program.
Mnemonic language is similar to machine level language, the only difference is instead of 0-1 mnemonic codes are used in this language. Machine language is most fundamental way of communication between programmer and computer. But it is very difficult to write a program in this language as it contains coding program with 0's and 1's.
LIFE CYCLE OF THE SOURCE PROGRAM
Above diagram shows the life cycle of the source program i.e how a source program moves through different stages from one system software to another system software. Above diagram has to be explained block by block. Explanation of every system software is already given in the introduction of system software.
DIFFERENT VIEWS ON THE MEANING OF THE PROGRAM
The output of program translator can have different views on the meaning of the program. Different possible views are shown in the diagram. An assembler views a program as a object code. A programmer views a program as abstract model. The hardware views a program as a machine code. A linker views object programs as a executable code. A loader views executable program in a computer memory for execution.