Back to Topics

5. System Software

Memory Management

Efficiently manages system memory and ensures proper data allocation.

  • Stores data from all currently running programs concurrently in RAM
  • Prevents data overwriting in RAM/primary storage
  • Decides which processes should be in main memory
  • Makes efficient use of memory
  • Manages virtual memory between RAM and storage device

Process Management

Handles program execution and resource allocation.

  • Manages the scheduling of processes
  • Enables multi-tasking / multi-processing
  • Ensures fair access by round-robin
  • Handles process priorities
  • Manages required process resources
  • Enables process information sharing
  • Prevents interference between processes

Hardware Management

Controls and coordinates all hardware components.

  • Installs and manages device drivers
  • Facilitates communication between peripherals and computer
  • Handles data transfer to/from peripherals
  • Manages data buffers for smooth transfer
  • Handles device interrupts and signals

File Management

Organizes and maintains file systems and storage.

  • Divides storage space into file allocation units
  • Allocates space to files
  • Maintains directory structures
  • Implements file systems (FAT, NTFS)
  • Manages file naming conventions
  • Controls file access rights and sharing
  • Handles file operations (open, close, delete, etc.)

Security Management

Ensures system security and user authentication.

  • Manages user accounts and passwords
  • Provides firewall and anti-malware protection
  • Validates users and process authenticity
  • Implements access control
  • Monitors system security

User Interface

Provides interface between users and hardware.

  • Facilitates user-hardware communication
  • Simplifies system navigation
  • Provides data input facilities
  • Manages output display
  • Supports various interface types (CLI, GUI, Menu-driven)

Purpose of Operating System

The operating system (OS) serves as the backbone of a computer, providing essential services and managing hardware and software resources. Its primary purposes include:

  • Providing a user interface for interaction with the computer.
  • Offering a platform for software applications to run efficiently.
  • Hiding the complexities of hardware from users, making the system easier to use.

Management of Tasks in Operating Systems

The OS manages various tasks to ensure smooth operation of the computer system. Key tasks include:

  • Memory management: Allocating and deallocating memory to processes.
  • File management: Organizing and maintaining files on storage devices.
  • Security management: Protecting the system from unauthorized access and malware.
  • Process management: Scheduling and managing running processes.
  • Error checking and recovery: Detecting and resolving system errors.
  • Hardware management: Controlling and coordinating hardware components.

Utility Software

Utility software helps setup, optimize, and maintain the computer. Examples include:

  • Virus checker: Protects the system from malware.
  • Defragmentation software: Improves disk performance by reorganizing fragmented files.
  • Disk repair software: Identifies and fixes disk errors.
  • File compression: Reduces file size for storage and transmission efficiency.
  • Backup software: Creates copies of data for recovery purposes.

Program Libraries

Program libraries consist of pre-written code, functions, or routines that can be called in another program. These libraries are typically installed or imported into a project to provide reusable functionality.

Advantages

  • Saves Programming and Testing Time: Code does not have to be written or rewritten from scratch, and it does not need to be tested.
  • Robust and Tested Code: Library code is already tested, making it more reliable and likely to work.
  • No Programmer Maintenance: The programmer does not need to maintain the library, as library routines are updated automatically.
  • Complex Calculations: Libraries can perform complex calculations that the programmer may be unable to implement.
  • Improved Code Readability: Using libraries makes code more modular and easier to read.

Dynamic Link Library (DLL)

A Dynamic Link Library (DLL) is a collection of self-contained shared library programs that are already compiled. DLLs are linked to the main program during execution, and their code is separated from the executable (.exe) file. DLLs are loaded into memory only when required at runtime.

Advantages

  • Reduced Memory Requirements: The DLL is loaded only once or when required, reducing memory usage.
  • Smaller Executable File Size: The executable file does not contain all the library routines, making it smaller.
  • No Need to Recompile: Changes, improvements, or error corrections to the DLL file are done independently of the main program, so the main program does not need to be recompiled.
  • Shared Across Applications: A single DLL file can be used by multiple applications, saving memory and easing pressure on system resources.

Disadvantages

  • Not Self-Contained: The executable code is not self-contained; the DLL file must be included at runtime.
  • Linking Software Required: Appropriate linking software must be available at runtime to import the DLL file.
  • Dependency on DLL File: The DLL file must be present, or the program will fail to run.
  • Unexpected Changes: Changes to the DLL file could cause the program to stop working as expected.
  • Security Risks: Malicious changes to the DLL file could install a virus on the user's computer.

Partial Compilation & Interpretation

Some high-level languages, like Java, use a two-step translation process:

  • Source code is first compiled into bytecode.
  • Bytecode is interpreted by a virtual machine (e.g., JVM) to produce machine code.

Advantages

  • Platform independence: Bytecode can run on any system with a compatible interpreter.
  • Optimized machine code: Generated at runtime for specific CPUs.

Disadvantages

  • Slower execution due to interpretation.
  • Higher CPU resource usage.

Interpreters

Interpreters translate and execute code line by line. Key features include:

Advantages

  • Easier debugging: Errors are reported immediately.
  • Immediate feedback: Changes can be seen in real-time.
  • Partial execution: Incomplete programs can be tested.

Disadvantages

  • Slower execution compared to compiled code.
  • Higher CPU and memory usage.

Compilers

Compilers translate the entire source code into machine code. Key features include:

Advantages

  • Faster execution: Code is pre-compiled.
  • Platform-specific optimization: Code is tailored to the target hardware.
  • Protection of source code: Executable files cannot be easily reverse-engineered.

Disadvantages

  • Longer development cycle: Code must be recompiled after changes.
  • Platform dependence: Executables are tied to specific hardware.

IDE (Integrated Development Environment)

An IDE (Integrated Development Environment) is a software application that combines common developer tools into a single graphical user interface. It provides a comprehensive environment for writing, testing, and debugging code.

Visual Features

  • Prettyprint: Automatic indentation and color-coding of keywords to improve code readability.
  • Expand/Collapse Code Blocks: Allows developers to expand or collapse sections of code, saving excessive scrolling. Collapsed blocks make it easier to see global variable declarations and the main program body.
  • Context-Sensitive Prompts: As the code is being written, the IDE provides options to complete statements, making coding faster and more efficient.
  • Dynamic Syntax Checks: Automatically checks and highlights syntax errors as soon as a line is typed, helping developers catch mistakes in real-time.

Debugging Tools

  • Single Stepping: Allows the programmer to execute the program one line at a time, so the effects of each statement and the values of variables can be observed.
  • Breakpoints: Pauses the program at a specific line to ensure the program operates correctly up to that point. Developers can check current values and debug issues.
  • Report Window: Outputs the contents of variables and data structures, providing insights into the program's state during execution.

Advantages of Using an IDE

  • Improves productivity by providing all necessary tools in one place.
  • Enhances code readability and maintainability through features like prettyprint and code folding.
  • Reduces errors with dynamic syntax checking and real-time feedback.
  • Simplifies debugging with tools like single stepping and breakpoints.
  • Supports collaboration through integrated version control systems.

Practice Questions

Which of the following is a primary responsibility of memory management in an operating system?

What is the purpose of virtual memory in an operating system?

Which of the following is a key function of process management?

What is the role of a file system in an operating system?

Which of the following is a task performed by security management in an operating system?

What is the purpose of utility software in a computer system?

Which of the following is a characteristic of a Dynamic Link Library (DLL)?

What is a disadvantage of using DLLs?

Which of the following is a feature of an Integrated Development Environment (IDE)?

What is the purpose of debugging tools in an IDE?