Compilers

We continue this until we have completed last instruction from each of the programs. In this way we can make a user believe that the programs are running concurrently. Contrast the notion of multiprogramming from serial (batch) programming, where, we would have executed all the instructions from one program and then would have started to execute the first instruction from second program. Hence, some programs would have needed to wait for others to finish. Moreover, processes like printing don’t involve processor interaction after processor has fed the data to the printer controller. So, the program would have to wait for printer to finish its job, and so would have other important programs. This is where multiprogramming comes to the rescue. After the data is fed to the printer controller, processor can switch to other program to execute its instruction, and hence, other programs may not starve.

Operating system also helps one program not write an instruction that could use other program’s data. But operating system allows two programs to interact in a controlled manner (controlled by the operating system itself) and share data via various mechanisms.


4. COMPILERS

Like we outsourced our boiler plate program instructions (code) into an operating system (to interact with hardware), we could also outsource a set of instructions that interacts with the operating system into a program called a compiler. We will leave what this set of instructions constitutes for further sections. The purpose of a compiler will be clearer as we divulge into details.

There is a property of a compiler that makes it a daunting task to write a compiler. We interact with a compiler by writing instructions in a language similar to a natural language (like English). Thus, a compiler understands a simple language and produces the program (that we want should interact with an operating system) in an arcane binary number format.

0 Response to "Compilers"

Post a Comment