1. Operating System (OS) Basics
Definition:
Software that manages hardware/resources and provides a user interface.
Key Functions:
- Process Management
- Multitasking (time-slicing, scheduling).
- Interrupt handling (prioritization, ISRs).
- Memory Management
- RAM allocation, virtual memory, paging.
- File Management
- Directory structures, permissions (read/write/execute).
- Security
- User authentication, encryption, firewalls.
Examples: Windows, Linux, macOS.
2. Utility Software
Utility | Purpose | Performance Impact |
---|---|---|
Defragmentation | Reorganizes fragmented files on HDDs. | Faster file access. |
Disk Cleanup | Deletes temporary/unused files. | Frees storage space. |
Backup | Creates copies of data for recovery. | Prevents data loss. |
Antivirus | Scans for malware. | Improves system security. |
Note: SSDs do not need defragmentation (wear-leveling instead).
3. Language Translators
Translator | Operation | Pros | Cons |
---|---|---|---|
Compiler | Translates entire program → executable. | Fast execution; standalone file. | Slower debugging; no line-by-line. |
Interpreter | Executes code line-by-line. | Immediate feedback; easier debug. | Slow execution; no executable. |
Assembler | Converts assembly → machine code. | 1:1 translation; low-level control. | Platform-dependent. |
Hybrid Approach (e.g., Java):
- Compiled to bytecode → interpreted by JVM.
4. Integrated Development Environment (IDE)
Features:
- Debugging Tools:
- Breakpoints
- Single-stepping
- Variable watchers.
- Editing Tools:
- Syntax highlighting
- Auto-completion (context-sensitive prompts).
- Dynamic Syntax Checks:
- Real-time error detection (e.g., missing semicolons).
Why Use an IDE?
- Streamlines coding
- Debugging
- Testing in one interface.
5. Program Libraries & DLLs
Program Libraries
Definition: Collections of pre-written code (functions, classes, or modules) for common tasks.
5 Key Benefits:
- Time-Saving
- Eliminates the need to write code from scratch (e.g.,
math.h
for complex calculations).
- Eliminates the need to write code from scratch (e.g.,
- Error Reduction
- Pre-tested code minimizes bugs (e.g., standard libraries like
Python’s NumPy
).
- Pre-tested code minimizes bugs (e.g., standard libraries like
- Modularity
- Code can be updated independently without rewriting entire programs.
- Consistency
- Ensures uniform implementation of algorithms (e.g., encryption in
OpenSSL
).
- Ensures uniform implementation of algorithms (e.g., encryption in
- Cross-Platform Support
- Libraries often work across OSes (e.g.,
Java’s Swing
for GUIs).
- Libraries often work across OSes (e.g.,
Dynamic Link Libraries (DLLs)
Definition: Shared libraries loaded at runtime, not compile time.
5 Key Benefits:
- Reduced Executable Size
- Code is stored separately (e.g.,
.dll
files in Windows) → smaller main program.
- Code is stored separately (e.g.,
- Memory Efficiency
- Multiple programs share the same DLL in RAM (e.g.,
Windows API
DLLs).
- Multiple programs share the same DLL in RAM (e.g.,
- Easier Updates
- Update DLLs without recompiling the main program (e.g., security patches).
- Modular Design
- Plug-in architectures (e.g., Photoshop filters as DLLs).
- Faster Development
- Teams can work on separate DLLs concurrently.
Comparison Table
Aspect | Program Libraries | DLLs |
---|---|---|
Usage | Linked at compile time (static). | Linked at runtime (dynamic). |
Memory | Each program loads its own copy. | Shared across programs. |
Updates | Requires recompilation. | Independent updates. |
Examples | math.h , Python’s pandas . | kernel32.dll , msvcrt.dll . |
6. Interrupt Handling
Types:
- Hardware Interrupts: External events (e.g., keyboard press).
- Software Interrupts: Generated by programs (e.g., division by zero).
Handling Process:
- CPU finishes current instruction.
- Saves state (registers) to the stack.
- Jumps to Interrupt Service Routine (ISR).
- Restores state and resumes original task.
Priority Levels:
- Non-maskable interrupts (NMIs) > Maskable interrupts.
8. Cache Memory & Performance
Why Increase Cache Size?
- Stores frequently used instructions/data closer to CPU.
- Reduces cache misses → fewer RAM accesses → faster execution.
Hierarchy:
L1 (fastest, smallest) → L2 → L3 (shared, largest).
9. AI in System Software
Applications:
- Voice Recognition: Converts speech to commands (e.g., Siri).
- Predictive Caching: Anticipates data needs (e.g., OS prefetching).
Impact:
- Improves efficiency but requires significant resources.
Exam-Style Questions
- Compare compilers and interpreters (4 marks).
- Explain how defragmentation improves HDD performance (3 marks).
- Describe the role of the OS in memory management (4 marks).
Key Terms Glossary
- ISR: Interrupt Service Routine – handles interrupts.
- DLL: Dynamic Link Library – shared code module.
- IDE: Integrated Development Environment – coding toolkit.