blog

Home / DeveloperSection / Blogs / How do Programming Languages run on OS?

How do Programming Languages run on OS?

How do Programming Languages run on OS?

Mukul Goenka195 05-Apr-2024

Before delving into the topic of how programming languages run on operating system, lets understand what is operating system? The operating system (OS) is the foundational platform of modern computing devices, which acts as the interface between the system hardware and the software applications used by the end users. It is like a bridge between the computer and the human. 

 

The Operating systems provide a means of resource management like the central processing unit (CPU), memory, storage, and input/output device. Operating systems are the foundations of all computer systems because they do not just run them but also unify their functioning by establishing the level of control and coordination of the components. There are different kinds of operating system nowadays like Windows, Linux etc.




Machine Language and Higher-Level Languages

 

The simplest level of interaction between computers is currently through machine language that is, also known as object code. It is arranged from the basic binary digits (0s and 1s) that are interpreted by the computer's processor to execute the corresponding particular instruction. On the contrary, a direct program in machine language is too difficult and time consuming as it requires deep expertise of the architecture and an arduous coding. 

The need for simpler mechanism to execute the programs was the solitary reason that made developers to create the high-level languages. These languages, such as Java, Python, and C++, are high level languages that are written in human readable syntax and are much more efficient.



Compilation Process



With the usage of a higher-level language, a programmer composes its code in a manner that is easy to comprehend and intuitive for the humans to read. Code is fed to the compiler then stored in a normal text file known as source file. Nevertheless, the computer cannot beneath its own power run the source code; it must be rather first translated to the machine code that the CPU can recognize. Here is when the arrangement work starts. 

 

 

In the realm of programming, a compiler is a layman program that decodes the source code and transform it into machine code for hardware of computer. Consequently, a computer language is translated to a sequence of machine-specific instructions which are typically stored in an executable file that is directly run by the operating system.

 

 



Additional Steps: By using link and deploying

 


In some instances, the connection process may involve other procedures apart from linking. Some sort of linking is necessary for the process of combining the compiled code with external libraries or modules that provide additional functionality. An important part of these libraries is pre-written code that can be utilized in a multitude of programs at various levels, eradicating the rebuilding and increasing the speed of a program. 

 

When done, the program will be compiled together with the linker and will be rolled out as ready. Implementation process is defining the environment(s) in which the executables will be installed, and the starter code or files deployed, and finally the users to start the software program.




Accomplishment by the Operating System

 


An operating system readies the computer and takes over when a user runs a program command. It completes the execution sequence. The operation system is then made to trace out the executable associated with the program or document and will proceed to lodge it in the memory. 

 

 

Then it switches on the CPU, which begins following the binary instructions that are written in the file file, performing the operations in the proper sequence that programmer set up. What's interesting is that throughout this procedure OS manages to satisfy the program requests on these resources – CPU time, memory allocation, and input/output operations.




Compilation: A One-Time Process



It is however, vital to get the concept that a compilation is carried out just once to produce a particular variant of the code based on the source made available. Compilation of the source code into an executable file will not affect any architectural changes or alterations made to the previous versions of the source code. Alternatively, if the programmer wants to pen down amendments, the program has to be recompiled from the beginning. A compilation check is thus accomplished where the generated code's state matches the source code and any changes made by the programmer.



Conclusion



The whole process of opening apps written in high-level languages using the operating system goes through various steps such as the source code writing, the compilation, linking, and deployment processes which are all handled by specific computer programs. These stages hold a particularly significant place, and although different, they all work in unison to transform human readable code into machine executable instructions. Regardless of the intricate nature of the process mentioned, nowadays, high-level programming languages and operating systems simplify most of the underlying complication, letting developers concentrate on the more sophisticated and reliable software development.

 

 


An MBA in finance imparts and improves management aptitude, inventive ability, critical thinking ability, and so forth. It offers a real-time experience that fabricates a staunch career foundation for students and working professionals. It helps them to thoroughly understand the financial sector.

Leave Comment

Comments

Liked By