What is Systems Programming?

System programming
Computer programming could be categorized into two groups .i.e while designing software program the programmer might determine the required inputs for that scheduled system, the wanted outputs and the processing the program would perform to be able to give those wanted outputs. The implementation of the digesting part is connected with application programming. Software programming facilitates the implementation of the mandatory processing that software is meant to perform; everything that's left is facilitated by system programming now. 

Systems programming may be the scholarly study of techniques that facilitate the acquisition of data from insight devices, these methods also facilitates the result of data which might be the total result of processing performed by a credit card application.

3-Layered Approach

A operational program programmer might use a three layered approach for systems programming. As you can plainly see in the figure the user may directly access the programmable hardware in order to perform I/O operations. An individual may use the trivial BIOS routines to be able to carry out I/O in which particular case the programmer do not need to know the internal operating of the hardware and require only the data BIOS routines and their parameters. 

In this instance the BIOS courses the hardware for needed I/O operation which is hidden to an individual. In the 3rd case the programmer may invoke OS routines in order to perform I/O functions. The operating-system in turn use BIOS routines or may system the hardware directly to be able to perform the operation. 

Methods of I/O 

In the three layered approach if we are following a first approach we have to plan the hardware. The hardware could be programmed to execute I/O in 3 ways i.e

· Programmed I/O
· Interrupt driven I/O
· Direct Memory Access

In case of programmed We/O the CPU constantly checks the I/O device if the We/O procedure can be performed or not. If the I/O operations can be carried out the CPU performs the computations necessary to total the I/O operation and again starts waiting for the I/O device in order to perform following I/O procedure. In this way the CPU remains tied up and isn't doing other things besides looking forward to the I/O device to become idle and performing computations limited to the slower I/O gadget.

In the event of interrupt driven the flaws of programmed powered We/O are rectified. The processor does not examine the I/O device for the ability of carrying out I/O operation rather the I/O gadget informs the CPU that it’s idle and it could perform I/O operation, consequently the execution of CPU is definitely interrupted and an Interrupt Support Routine (ISR) can be invoked which performs the computations necessary for I/O operation. Following the execution of ISR the CPU proceeds with whatever it had been doing prior to the interruption for I/O procedure. In this manner the CPU will not remain tangled up and may perform computations for additional processes as the I/O products are busy executing I/O and therefore is more optimal. 

Usually it requires two bus cycles to transfer data from some I/O slot to memory or vice versa if that is carried out via some processor chip register. This transfer period can be decreased bypassing the CPU as ports and memory space gadget are also interconnected by system bus. This is finished with the support of DMA controller. The DMA controller can controller the buses and therefore the CPU can be bypassed data item could be transferred from storage to ports or vice versa in one bus cycle. 

via Lectures of VU-pakistan




Administrator
Administrator