1
The Introduction of Hard Disk Drives (HDDs) and BIOS
BIOS (Basic Input/Output System) was introduced to start up the computer:
• Initial BIOS: Stored on a ROM chip (Read-Only Memory).
• Modern BIOS: Stored on flash memory (can be updated).
• BIOS configurations are stored in CMOS memory, which can be altered.
Role of the Operating System
An operating system is essential for:
1. Copying itself into RAM: Since modern OSs are very large, only required parts are loaded into RAM for
better performance.
2. Running Applications: Provides an environment for software to execute.
3. Human-Computer Interface (HCI): Makes it easier for humans to interact with computers.
GUI
4. Hiding Hardware Complexity: Users do not need to know how hardware works internally.
Widgets
Jesus
Examples of Operating Systems:
• Microsoft Windows
• Apple macOS
• Google Android
• Apple iOS
2
• GUI: Uses WIMP (Windows, Icons, Menus, and Pointing device).
1. Windows: Open multiple applications.
2. Icons: Visual symbols for software.
3. Menus: Drop-down options.
4. Pointing device: Mouse or touchscreen interaction.
• Post-WIMP Interaction: (Fingers in contact with Screen)
1. Modern devices (smartphones/tablets) use touchscreens.
2. Features like pinch, zoom, rotate, and tap replace mouse functions.
Operating System Tasks
1 Memory management
Efficient allocation and protection
of computer memory
Memory Management is further divided into 3:
1. Memory Protection
2. Memory Optimisation
3. Memory Organization
3
Memory Protection
Ensures two Prevent
applicationsdoes Data loss
not use some Systemcrash
memorylocation Incorrectresults
Security issue
memory optimisation
Decides how memory is allocated to application
2
Also ensures to free memory after execution
3 Tracks used and unusedmemory 18
Swaps data b w RAM and HDD SDD
to optimise memory storage
4
Memory Organization
Memory organization determines how memory is allocated to applications efficiently. Common
methods include:
1. Single (Contiguous) Allocation: All memory is assigned to one application (e.g., MS-DOS,
embedded systems).
2. Partitioned Allocation: Memory is split into contiguous partitions, allocated based on application
needs, with variable sizes.
3. Paged Memory: Memory is divided into fixed-size pages, commonly used in virtual memory
systems.
non contiguous
4. Segmented Memory: Non-contiguous blocks (segments) are allocated logically, grouping related
data like arrays.
code data stock
1 Memory 2 Memory
Tom awesomeness
Instagram
Chrome
Writing a
wordfile 640M a Zoom
12omb 520Mb
External Internalfragmentation
fragmentation Mem
3 Memory 4
2 App 107
IMS
Busegment
page deteftable
2ms 1 y 7 Stack
5
Security Management
Security management is a key function of an operating system to ensure data integrity,
confidentiality, and availability. This involves:
• Performing regular operating system updates.
Windowsupdate bugs
• Keeping antivirus and other security software up-to-date.
• Using firewalls to monitor and manage network traffic.
• Restricting access through user accounts, passwords, and privileges.
• Managing user access rights. admin Dish C read write execute
• Supporting data recovery and system restore.
• Preventing unauthorized access to maintain data privacy.
Intrusion Detection
software
6
Process Management
Manages running programs by allocating resources and synchronizing processes (e.g., scheduling,
resolving conflicts, using queues).
Os process RPUtime some PI writeinto a file
9 0 devices
Readfrom a
Memory P2
file
Waitingqueue P3
Mem Printing
1 PII
PI Pl Printer
1 P23 S P2 P2 Printer
1 P3
Runningqueue
FEES
SJF
Hardware Management
• Handles input/output devices via device drivers.
keyboard Mouse
• Translates file data into a device-compatible format.
• Manages device priorities, queues, and buffers (e.g., printing involves driver loading, buffering,
queuing, sending commands, and handling errors).
910tasks
keyboard Mem
QWERTY
drivers
ward Printerdriver
format't Datais senttobuffer
file file iscorrectprinter P3
usingdevice
drivers Busy
7
File Management
Defines file naming conventions (e.g., .docx, .txt).
Store access protected
Performs tasks like creating, opening, deleting, renaming, and moving files. dataintegrity
Maintains directory structures and access controls (e.g., permissions, passwords).
readonly
Specifies storage formats (e.g., FAT, NTFS) and allocates memory for files.
New
technology filesystem
HDD RAM
Utility Software
Utility software enhances system functionality and performance. These tools can be part of the
operating system or installed separately, with some running in the background (e.g., antivirus). Key
utilities include:
1. Hard Disk Formatter: Prepares new drives for use, organizing storage into partitions and
formatting them with file systems (e.g., NTFS). It also detects and flags bad sectors.
Initialization and Partition Petite contiguous
file
formatting Partitions
full formatting on as
8
Badsector management non destructivetests
Hard bad sector Physicaldamage or companybaseddefects
Softbadsector Powerloss system crash leads to data
corruption
2. Virus Checkers: Scans for and removes malware by comparing files against virus databases and
using heuristic checks. Regular updates and scans are essential.
Is protect computer Malware viruses wormstrojans
1 Pre emptive scanning
archon
2 Virus database Comparison
hacker
Mcafee
full systemscans 3 HeuristicAnalysis
4 Quarantinefunctionality
Limitations
Isolates potentiallyinfected
Falsepositives
files
Impacts systemperformance Automatic deletion
by running itself in background User decision
9
3. Defragmentation Software: Rearranges fragmented files on HDDs for faster access. Less
relevant for SSDs due to their design.
sectors 1 2 3 4 5 6 7 8 9
1 pdf 2 pdf 3 pdf
Track
File 2 is deleted file I hes more data added
sectors 1 2 3 4 5 6 7 8 9
Track 1 pdf 3 pdf 1pdf
file 01278 File 3 is appended
Before Sectors 1 2 3 4 5 6 7 8 9
1 pdf 3 pdf 1pdf 1sec
Trackto
Track11 3 pdf
After
sectors 1 2 3 4 5 6 7 8 9
1 pdf 1 pdf 3 pdf 3 pdf
Track o o see
I
Trackll
10
4. Disk Analysis/Repair: Examines and repairs disk issues while identifying space usage and
removing unnecessary files (cache etc).
Disk usageandfile analysis
Seen entiredish identify and analysefiles folders
and directories
Istalspaceused
Large files duplicate old and unusedfiles
Empty space identification unused or wastedspace
Temporarysystemfiles
fragmented files
files that have not beenaccessed
for a long
time
Report Generation
files anddirectories consuming the mostspace
files that could besafetyremoved
Unused
Spacethat can be recoveredfromtemp
Cleanup
file 24ᵗʰ
2b
Tempfiles cookies
Repair grouped
fix Badsectors soft bed
assectors
Marking Reallocating an
Error Checking and Recovery Attempt to recover
corrupted files
11
5. File and Disk Compression: Saves storage space and accelerates file transfers by reducing data
size. Disk compression is rare today due to large storage capacities.
Lossless compression RLE Identify repeating patterns
redundantdata and unnecessary
Zip Rar PNG
elements
Lossycompression Tools
JPEG MP3 MPY Peczip Winror
2042 20kHz Mac OS finder
6. Backup Software: Automates file backups with options for local, external, and cloud storage.
Features include version history (e.g., Windows File History, Mac Time Machine) and restore points
for recovery.
Automated
1
Backup scheduling daily weekly monthly
2 Selective File Backup Confidential data
3 VersionedBackups
4 Cloud and Remote Backups Ensures thatdata is backed
up on a cloud storage to
avoid data loss
Versioned Backups Example:
Example: If a user accidentally overwrites a file with incorrect data, the backup software might allow
them to restore a previous version of the file from an earlier backup.
12
Program Libraries
Program libraries are essential in software development, offering reusable pre-written
routines that save time, enhance efficiency, and ensure consistency. error freecodes
Efficient Reliability Scalability Collaboration
Security issues run time issue
Purpose:
• Provide reusable subroutines (library routines) to simplify development.
• Include tools like Dynamic Link Libraries (DLLs) for efficient runtime execution.
Terminology:
tuts spell checker
Programstored in a programlib
• Library Program: A reusable, stored program.
• Library Routine: A subroutine stored for integration into other software.
Sortingalgorithm
Animatedgraphics
Music routines
Sishing card
13
Static Libraries:
• Linked during compilation; routines are embedded in the executable.
• Results in larger files but ensures the program is self-contained. math lib
Dynamic Libraries (DLLs):
• Linked and loaded at runtime, reducing executable size and memory use. RAM
• Shared across applications, but dependent on DLL availability at runtime.
14
Language Translators
Language translators are systems software that convert programming instructions written in a
language other than machine code into executable machine code.
Types of Translators
Assemblers:
• Translate assembly language into machine code.
• Programs are machine-dependent and not portable across different systems.
• Examples: MASM (for x86 chips), PIC, GENIE (for microcontrollers).
Compilers:
python
• Translate high-level source code into machine code or intermediate code.
• Store the translated program (object code) for repeated use without re-translation.
• Faster execution after compilation since no translation occurs during runtime. loader
Interpreters:
• Execute high-level source code line-by-line.
• Do not produce a stored machine code file, so translation happens at runtime every time.
• Useful during development for immediate error detection and debugging.
15
exe
16
Partial Compilation and Interpretation
• Intermediate Code: Programs like Java and Python use a mix of compilation and interpretation.
• Process:
• High-level source code is compiled into bytecode (intermediate machine-independent code).
• Bytecode is interpreted or compiled further for execution.
• Example: Java bytecode runs on the Java Virtual Machine (JVM); Python bytecode runs on the
Python interpreter.
low level
language machinecode
Shorter executiontimes to compiler objectcode
Interpreter
17
Integrated Development Environment (IDE)
1. Source Code Editor
• Purpose: Allows programmers to write and edit their code efficiently without switching to a
separate text editor.
Key Features:
• Syntax Highlighting: Different code elements (e.g., keywords, variables, strings) are color-coded
for better readability. For example:
• Strings might appear in green.
• Integers in blue.
• Context-Sensitive Prompts: Suggests variable names, functions, or keywords as you type,
speeding up development.
• Dynamic Syntax Checking: Highlights syntax errors as the code is written, enabling corrections
before running the program.
• Code Collapsing: Allows collapsing code blocks to focus on specific sections of the program.
2. Compiler and Interpreter
Purpose: Translates source code into machine-readable code for execution.
Usage in IDEs:
An interpreter is typically used during development for real-time testing and debugging.
A compiler is used to produce the final, optimized object code.
18
3. Run-Time Environment with Debugger
Purpose: Executes the program and assists in identifying and fixing errors.
Debugger Features:
• Single Stepping: Executes the program one line at a time, allowing detailed inspection.
• Breakpoints: Stops program execution at specific points in the code to examine variables and
expressions.
• Variable and Expression Inspection: Displays the type and contents of variables or evaluates
expressions at different points during execution.
4. Auto-Documenter
• Purpose: Automatically generates documentation for the program, explaining the function and
purpose of various code sections.
• Benefit: Saves time and ensures the program is well-documented for future reference or
collaboration.
Benefits of Using an IDE
• Increased Productivity: Combines multiple tools into one, reducing the need to switch between applications.
• Error Reduction: Features like dynamic syntax checking and debugging tools help identify and fix errors early
in development.
• Code Readability: Pretty-printing and syntax highlighting improve code organization and readability.
• Efficient Debugging: Debugger tools make it easier to pinpoint logic errors and inspect program behavior.