Low level languages have low-level access to system software and hardware components hence execution of instruction can be done in a low level of abstraction.
Low level programs are close to hardware as compared to high-level language, low-level memory access is the main feature of low-level language along with low-level hardware/software access.
Low level language needs to be converted to machine code to be executed by the CPU. Machine code/byte code is binary based and only binary instructions can be executed by the CPU. Machine-level language is elemental. Machine code is a source code written in machine language.
The complexity of coding in machine-level language as compared to assembly-level language is very high. Machine code is portable, assembly code portability is lower as compared to machine code.
The programming can be done for machine-level languages and assembly languages, both are low levels of abstraction. Machine code is binary hence 0s and 1s are leveraged to carry out machine-level coding.
Machine code –> OPCODE -> OPERANDS
Based on the CPU architecture the program has to be written and the portability is ensured in binary files as binary files can be easily processed by the CPU. Machine-level coding is heavily dependent on the system architecture and specification.
Machine code is processor-dependent and the architecture of the processor matters the most while executing the machine code, it is highly specific and slight unwanted variations can result in errors and faulty code execution.
The machine code is highly advanced, but a simpler a bit higher level abstraction is the assembly-level languages where mnemonics are used which are human readable.
The source code written in HIGH-LEVEL LANGUAGE and ASSEMBLY needs to be compiled to base 2 because the CPU and MEMORY SYSTEM can only process and store BASE 2 operations, instructions, and values.
In assembly language instructions are in human-readable format ASCII, hence it is much more easier to code using assembly than to code via machine-level languages, and the amount of complexity and effort drops significantly.
For Eg to carry out addition ADD command can be used, to carry out subtraction SUB command can be used and to move data from one register to another register, the move command can be used.
Assembly languages have high readability as compared to machine-level language and they require less coding effort as compared to machine code, the learning curve is lower for assembly language as compared to machine-level language.
The hardware is the first level, the second layer is the machine code, and the third layer is the assembly code, assembly code is strongly bounded with the machine code and the machine code is strongly bounded with hardware.
Assembly language code will be converted into machine code, which is binary and this binary data is processed by the processor and stored in the memory.
Assembly is responsible for generating machine code for assembly-level language. The speed of execution is faster for machine code than assembly code, as assembly code needs to be converted to machine code by assembler, hence even the assembly code is translated into binary code which is then processed by the CPU and stored in MEMORY.
Assembly Code --> Assembler --> Machine Code
The majority of the programming is done via leveraging high-level languages, as High-level languages are easy to understand and have a Higher level of abstraction compared to High-level abstraction offered by Low -level-language
High level --> Low level --> Machine level -> Hardware level
hence the languages that the majority of the code is high-level or assembly-level languages, older programs are built on assembly-level languages and even software solutions, nowadays high-level languages are used to render software which are compiled or interpreted to machine code.
High-level languages are the easiest to read and program instructions. High-level languages provide easier CODING SYNTAX, LEXICON, and HIGH LEVEL OF ABSTRACTION.
High-level programs have variables, functions, control statements, constants, libraries, dependencies, classes, interfaces, objects, instances, docker images, and many other vital components. High-level languages offer both procedural and object-oriented approaches.
HIGH-LEVEL LANGUAGE is a HIGHER LEVEL OF ABSTRACTION
Low-level language is a LOWER LEVEL OF ABSTRACTION.
Both the high-level and the low-level languages satisfy industry-specific and domain-specific use cases in an efficient, reliable, and scalable way.
High-level language code base is portable hence it is easier to ship and execute code, as compared to lower-level language which offers Zero portability.
The high-level program needs to be converted to MACHINE CODE / BYTE CODE to be processed by the CPU, the conversion of high-level LEVEL LANGUAGE into machine code is done by two programs.
1) COMPILER
2) INTERPRETER
The compiler will compile the whole code at a time, the interpreter will interpret the code line by line. High-level languages like C++, C, and JAVA utilize compilers, and Languages like php, and js leverage interpreted to render output.
Diagrams
OS Kernel can be referred to as the heart and brain of the OS, the kernel is the core program OS is based upon, the kernel resides in the memory of the hardware (HARD DISK) and is responsible for booting and spinning up the servers, the kernel is a bridge between the hardware and software components.
The kernel is responsible for controlling, monitoring, and operation of hardware devices. The kernel will have device drivers that are responsible for the integration of the hardware with the software system. The OS resource utilization is carried out by the kernel, be it hardware resources or virtual resources, all the major processors, and scheduled tasks that are responsible for the OS operations.
Kernel will manage processes like:
- Computing
- Storage
- Performance Management
- Boot
- System Updates
- Networking
- Inter-Process Communication
- i/o Mapping
- Peripheral Management
- Read / Write
- CPU/LU
- Service Integrations
The kernel Layer in OS is connected with the Hardware Layer : CPU | ALU | CU | RAM | ROM | MEMORY | I/O DEVICES
The critical code of the kernel is loaded into a separate area of memory called critical code, all the user-centric applications are stored in a separate area of memory, kernel critical code is responsible for the processor, memory, I/O ops, task scheduling, and other critical operations. Critical code is kept in kernel space.
Kernel main ops include:
- RAM management
- ROM Management
- I/O Device read/write ops
- Resource allocation and management
- Memory Management
- Device Management
- System Calls
- Interrupts Processing
- Inter-Process Communication
- Security and Protection
- Program Execution.
In early times of computation, the programs were directly loaded on bare metal devices, and no hardware or software level abstraction was used, the bare metal approach is not leveraged as widely as it was during the 1950s and 60s, but nowadays embedded system still utilize the same set of coding process. Modern-day computing is all about OS and kernels.
Diagrams
The article above is rendered by integrating outputs of 1 HUMAN AGENT & 3 AI AGENTS, an amalgamation of HGI and AI to serve technology education globally.