Programming C 1.3
Programming C 1.3
Programming C 1.3
3 - Types of Software
Created By (ANUSHKASIF TRIPTION) or tech.nap
In general, software can be categorized into two basic types: System Software and Application
Software.
System Software: System software facilitates easy operation and interaction between the hardware
and the user. It acts as an intermediary between the user and the hardware, controlling how the
hardware behaves and providing fundamental functions required by the user. It initializes and loads
into the system's memory once the computer is powered on, running in the background without
direct user interaction.
• Complex design
• Challenges in manipulation
• Smaller in size
• Difficult to understand
Operating System
An Operating System (OS) is the most basic type of system software that controls computer
hardware and software, ensuring the effective operation of each computer device. Key OS types
include MacOS, Linux, Android, and Microsoft Windows.
•
• File management
CPU management
• Process scheduling
• Hardware activation
• Network access
Programming Language Translators convert high-level languages into machine language, which
consists of binary code (0s and 1s). Translators include compilers, interpreters, and assemblers.
Function:
• Converts high-level languages (e.g., Java, Python) into machine code for CPU processing.
Device Drivers
Device Drivers are system software components that manage communication between the operating
system and hardware components. Most drivers are pre-installed by the manufacturer.
Function:
Firmware Software
Firmware is a type of software installed on computer boards to manage and regulate device
operations. It is stored in non-volatile chips like Flash or ROM.
Types:
Utility Software assists in maintaining and optimizing computer systems. It often comes bundled
with the operating system and helps manage system performance and security.
Functions:
• Disk defragmentation
• Data recovery
• Antivirus protection
Application Software
Application Software refers to programs used by end-users to perform specific tasks, such as internet
research, note-taking, graphic design, and more.
Common Features:
• Data manipulation
• Information control
• Calculations
• Visual development
• Resource management
• Report writing
• Spreadsheet creation
• Image editing
• Website development
Examples:
•
• Graphics Software: Adobe Photoshop, PaintShop
Freeware: Free to use, but source code cannot be modified (e.g., Skype).
Shareware: Free to try, but requires payment for continued use (e.g., WinZip).
• Simulation Software: Used for monitoring and simulating actions (e.g., MATLAB).
• Open Source: Source code is accessible for modification and enhancement (e.g., Linux).
• Closed Source: Source code is proprietary and not accessible for modification (e.g., Microsoft
Windows).
• Database Management Systems (DBMS): Manages, stores, and retrieves organizational data.
Definition: A compiler is a specialized computer application that translates the source code of a
highlevel programming language (e.g., Java, C++) into machine code, bytecode, or another
programming language.
Function:
• Platform-dependent.
• Slower operating time compared to interpreters due to the need to process the entire code
in one go.
Types of Compilers:
1. Cross-compiler:
o Operates on one platform (Platform A) and produces executable code for another
platform (Platform B).
2. Source-to-source Compiler:
o Translates source code from one programming language to the source code of
another language.
• Compilation Process:
4. Linking: Connects function calls to their definitions and adds necessary startup and
shutdown code.
• Common C Compilers:
o Tiny C Compiler (TCC): Designed for minimal systems, with a focus on fast
compilation.
o Portable C Compiler (PCC): Used widely in the 1970s, known for its validity checks.
Example of C Compilation:
#include <stdio.h>
int main(void) {
printf("Hello, World!\n");
return 0;
Command to compile: gcc main.c Executable output: a.out Run the program: ./a.out Interpreters
Definition: An interpreter is a computer program that translates high-level language into machine
language, executing it line by line.
Function:
•
•
• Converts and executes statements one at a time.
Typically faster for development and debugging but slower for overall execution compared to
compilers.
Types of Interpreters:
3. Bytecode Interpreter: Translates code into bytecode, which is then executed by a virtual
machine.
Definition: An assembler is a tool that translates assembly language code, which uses mnemonics
and symbolic names, into machine code that the CPU can execute directly.
• Translation Process: Converts assembly code into binary machine code through a process
called assembling.
• Registers and Memory: Provides access to CPU registers and system memory.
• Direct Mapping to Machine Code: Each assembly instruction maps one-to-one with machine
code instructions.
• Efficiency and Control: Allows fine-grained control and optimization of hardware, suitable for
performance-critical applications.
• Learning and Teaching: Serves as a tool for understanding computer architecture and
lowlevel programming.
Linker
Definition: A linker is a utility that combines multiple object files generated by the compiler into a
single executable program, resolving references between them.
• Object Files: Contains machine code and data, produced from source code compilation.
• Symbol Resolution: Links function and variable references across object files.
• Static Linking: Combines object files and libraries into a standalone executable before
runtime.
• Dynamic Linking: Links libraries at runtime, allowing the use of shared libraries (DLLs).
• Library Linking: Integrates external libraries, resolving references to their functions and
variables.
• Relocation: Adjusts addresses in object files to match the final memory layout.
• Executable Output: Produces the final executable file or a program ready to use shared
libraries.
Loader
Definition: A loader is a system utility that loads an executable file into memory, preparing it for
execution by the operating system.
• Loading Process: Transfers the executable file from storage (disk) to RAM for execution.
• Executable File Formats: Supports various executable formats (e.g., ELF, PE).
• Relocation: Adjusts code and data addresses to reflect their memory location.
• Linking Libraries: Resolves references to external libraries, making their functions available.
• Initialization: Sets up the program's stack, initializes global variables, and prepares the
execution environment.
• Program Execution: Transfers control to the program's entry point to start execution.
• Loader Types: Includes absolute loaders, relocatable loaders, and dynamic loaders.
• Loader Error Handling: Identifies and manages issues like missing files or address conflicts.
•