Importance of Operating Systems in programming
Hardware of a computer system looks somewhat like what is shown in the figure below:
In most installations there is even larger dollar investment in software than in hardware. Software is a collection of programs or data that are used to perform certain tasks. A program is a sequence of instructions. Programs, sometimes loosely called "code", are places into memory and interpreted (executed) by a processor. While not in use, programs are often stored in some secondary storage device, such as a disk, drum, or a tape.
A system may have "prepackaged" programs available to users, e.g in routines to perform square roots, searching, sorting, compiling, assembling and translating. How are these prepackaged routines managed and who keeps track of where they are? Once again it is the operating system.
A lone user facing a formidable system such as the one shown in the figure above might become discouraged. Suppose this lone user is a student from a well known Harvard University who has just learned to program the CPU, and wants to execute a program to add 49 to numbers read from punched cards. How does he do it? Should he also learn how to program the I/O processors? This is obviously too much to expect from a novice. Fortunately, the operating system usually provides routines for the I/O processors and in general the operating system assists in the construction and execution of user programs.
The operating system provides an environment in which particular software packages can execute. An example is a compiler, which is a program that translates a source program, e.g a FORTRAN program, in a high level language to a corresponding machine language program or object program. Most modern compilers interact closely with the operating system both during the compilation of source programs and the execution of the object code. During compilation the compiler needs the operating system to read the source program, print it's listing and punch it's output decks. At execution time the object code produced by compilers such as PL/I requires a sophisticated "run time" environment. ALLOCATE and FREE statements require the assistance of the operating system's memory management facilities. PL/I ON CONDITION need interrupt handlers provided by the operating systems.

No comments:
Post a Comment