0% found this document useful (0 votes)
63 views22 pages

CAPE Computer Science Unit 2 - Detailed Study Notes

The document provides detailed study notes on CAPE Computer Science Unit 2, focusing on data structures and software engineering. It covers abstract data types (ADTs), their operations, basic algorithms for sorting and searching, and the software development life cycle phases. Additionally, it discusses the importance of structured approaches in software development, attributes of well-engineered software, and various software process models.

Uploaded by

khaleelali2007
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views22 pages

CAPE Computer Science Unit 2 - Detailed Study Notes

The document provides detailed study notes on CAPE Computer Science Unit 2, focusing on data structures and software engineering. It covers abstract data types (ADTs), their operations, basic algorithms for sorting and searching, and the software development life cycle phases. Additionally, it discusses the importance of structured approaches in software development, attributes of well-engineered software, and various software process models.

Uploaded by

khaleelali2007
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CAPE Computer Science Unit 2: Detailed Study Notes

UNIT 2 MODULE 1: DATA STRUCTURES

General Objective 1: Appreciate the use of abstract data types (ADTs) in the efficient
manipulation of data

1. Describe the concept of abstract data types (ADTs)

An Abstract Data Type is a mathematical model for data types where the data type is defined
by its behaviour from the perspective of the user, not its implementation. ADTs separate the
interface (what operations can be performed) from the implementation (how those
operations are carried out), allowing programmers to focus on what the data structure does
rather than how it works internally.

This abstraction enables modular programming, code reusability, and the ability to change
implementation details without affecting the rest of the program. For example, a stack ADT
specifies operations like push and pop, but whether it is implemented using arrays or linked
lists is irrelevant to the user of the stack.

2. Distinguish among ADTs

Stack (LIFO - Last In, First Out): Elements are added and removed from the same end (top).
The last element inserted is the first element removed. Real-world analogy: a stack of plates
where you add and remove plates from the top only.

Queue (FIFO - First In, First Out): Elements are added at the rear and removed from the
front. The first element inserted is the first element removed. Real-world analogy: a line of
customers at a bank where the first person in line is served first.

Singly Linked List: A linear collection of nodes where each node contains data and a pointer
to the next node. Unlike arrays, linked lists are dynamic and can grow or shrink during
runtime. Insertion and deletion operations are efficient (O(1) at known positions) but
accessing elements requires sequential traversal (O(n)).
3. Perform basic operations on standard ADTs using diagrams and algorithms

Stack Operations:
- Push: Add an element to the top of the stack
```
if top < maxSize - 1
top = top + 1
stack[top] = value
else
stack is full (overflow)
```

- Pop: Remove and return the top element


```
if top >= 0
value = stack[top]
top = top - 1
return value
else
stack is empty (underflow)
```

- Empty: Check if stack contains no elements


```
return top == -1
```

- Full: Check if stack has reached maximum capacity


```
return top == maxSize - 1
```

Queue Operations:
- Enqueue: Add an element to the rear of the queue
```
if rear < maxSize - 1
rear = rear + 1
queue[rear] = value
if front == -1
front = 0
else
queue is full
```

- Dequeue: Remove and return the front element


```
if front != -1 and front <= rear
value = queue[front]
front = front + 1
if front > rear
front = -1, rear = -1
return value
else
queue is empty
```

Singly Linked List Operations:


- Insert at beginning: Create new node, set its next pointer to current head, update head to
new node
- Insert at end: Traverse to last node, set its next pointer to new node, set new node's next to
NULL
- Delete a node: Locate node, adjust previous node's next pointer to skip the node being
deleted, free memory
4. Implement basic ADTs using one-dimensional arrays

Stack Implementation using Array:


```c
define MAX 100
int stack[MAX];
int top = -1;

void push(int value) {


if (top < MAX - 1) {
stack[++top] = value;
}
}

int pop() {
if (top >= 0) {
return stack[top--];
}
return -1; // error value
}

int isEmpty() {
return top == -1;
}
```

Queue Implementation using Array (Circular):


```c
define MAX 100
int queue[MAX];
int front = -1, rear = -1;

void enqueue(int value) {


if ((rear + 1) % MAX != front) {
if (front == -1) front = 0;
rear = (rear + 1) % MAX;
queue[rear] = value;
}
}

int dequeue() {
if (front != -1) {
int value = queue[front];
if (front == rear) {
front = rear = -1;
} else {
front = (front + 1) % MAX;
}
return value;
}
return -1;
}
```

Circular queues prevent the "false overflow" problem where a linear queue appears full even
though positions at the beginning become available after dequeuing. The modulo operator
(%) wraps indices around to reuse vacated spaces.
General Objective 2: Understand basic algorithms for sorting and searching

5. Describe searching and sorting algorithms using one-dimensional arrays

Linear Search: Sequentially checks each element in the array until the target is found or the
end is reached. Works on both sorted and unsorted arrays. Time complexity: O(n) worst
case, O(1) best case. Simple to implement but inefficient for large datasets.

Binary Search: Repeatedly divides the search interval in half. Requires a sorted array.
Compares target with middle element; if equal, search is successful; if target is less, search
left half; if greater, search right half. Time complexity: O(log n). Much more efficient than
linear search for large sorted datasets.

Bubble Sort: Repeatedly steps through the array, compares adjacent elements, and swaps
them if they are in the wrong order. Each pass "bubbles" the largest element to its correct
position at the end. Time complexity: O(n²) worst and average case, O(n) best case when
array is already sorted. Simple but inefficient for large datasets.

Selection Sort: Divides array into sorted and unsorted regions. Repeatedly selects the
smallest (or largest) element from the unsorted region and swaps it with the first element of
the unsorted region. Time complexity: O(n²) in all cases. Makes fewer swaps than bubble
sort but same number of comparisons.

---

6. Implement searching and sorting algorithms

Linear Search Implementation:


```c
int linearSearch(int arr[], int n, int target) {
for (int i = 0; i < n; i++) {
if (arr[i] == target) {
return i; // return index of target
}
}
return -1; // target not found
}
```

Binary Search Implementation (Iterative):


```c
int binarySearch(int arr[], int n, int target) {
int left = 0, right = n - 1;

while (left <= right) {


int mid = left + (right - left) / 2; // prevents overflow
if (arr[mid] == target) {
return mid;
} else if (arr[mid] < target) {
left = mid + 1;
} else {
right = mid - 1;
}
}
return -1; // target not found
}
```

Binary Search Implementation (Recursive):


```c
int binarySearchRecursive(int arr[], int left, int right, int target) {
if (left <= right) {
int mid = left + (right - left) / 2;

if (arr[mid] == target) {
return mid;
} else if (arr[mid] < target) {
return binarySearchRecursive(arr, mid + 1, right, target);
} else {
return binarySearchRecursive(arr, left, mid - 1, target);
}
}
return -1;
}
```

Bubble Sort Implementation:


```c
void bubbleSort(int arr[], int n) {
for (int i = 0; i < n - 1; i++) {
int swapped = 0; // optimization flag

for (int j = 0; j < n - i - 1; j++) {


if (arr[j] > arr[j + 1]) {
// swap adjacent elements
int temp = arr[j];
arr[j] = arr[j + 1];
arr[j + 1] = temp;
swapped = 1;
}
}

// if no swaps occurred, array is already sorted


if (!swapped) break;
}
}
```

Selection Sort Implementation:


```c
void selectionSort(int arr[], int n) {
for (int i = 0; i < n - 1; i++) {
int minIndex = i;

// find index of minimum element in unsorted part


for (int j = i + 1; j < n; j++) {
if (arr[j] < arr[minIndex]) {
minIndex = j;
}
}

// swap minimum element with first unsorted position


if (minIndex != i) {
int temp = arr[i];
arr[i] = arr[minIndex];
arr[minIndex] = temp;
}
}
}
```

Additional Study Material for Module 1

Complexity Analysis:
- Time Complexity: Measures how execution time grows as input size increases
- Space Complexity: Measures how memory usage grows as input size increases
- Big O notation describes upper bound (worst case), Omega describes lower bound (best
case), Theta describes tight bound
ADT Comparison Table:

| ADT | Access Pattern | Insert/Delete Complexity | Search Complexity | Use Cases |


|-----|----------------|-------------------------|-------------------|-----------|
| Stack | LIFO | O(1) at top | O(n) | Function calls, undo operations, expression evaluation |
| Queue | FIFO | O(1) at ends | O(n) | Print spooling, breadth-first search, buffering |
| Linked List | Sequential | O(1) at head, O(n) elsewhere | O(n) | Dynamic memory allocation,
polynomial manipulation |

Common Pitfalls to Avoid:


1. Forgetting to check for empty/full conditions before operations
2. Off-by-one errors in array indices
3. Memory leaks when deleting nodes from linked lists
4. Using binary search on unsorted arrays
5. Not handling the circular queue wrap-around correctly
UNIT 2 MODULE 2: SOFTWARE ENGINEERING

General Objective 1: Understand the phases of the software development life cycle

1. Explain the reasons for a structured approach to the software development process

A structured approach to software development is essential because modern organisations


increasingly depend on complex computer systems where failure can have catastrophic
financial or safety consequences. Historical software crises demonstrated that unstructured
"code-and-fix" approaches led to budget overruns, missed deadlines, unreliable software,
and dissatisfied users who received products that did not meet their needs.

Structured methodologies provide visibility into the development process, enabling better
management control, risk assessment, and resource allocation. They establish clear
milestones, deliverables, and quality checkpoints while ensuring appropriate documentation
is created. Furthermore, structured approaches facilitate standardisation across projects,
improve communication among team members, and formally incorporate end-users and
management throughout the development lifecycle to ensure the final product truly
addresses business requirements.

2. Explain the attributes of a well-engineered software product

Maintainability: Software should be written in a way that makes it easy to modify, correct
defects, adapt to new requirements, and change environments. This requires clear
documentation, consistent coding standards, modular design, and meaningful variable
names. Maintainable software reduces long-term costs and extends the useful life of the
system.

Dependability: The software must be reliable, available, and secure. It should perform its
required functions under stated conditions for a specified period, remain accessible when
needed, and protect against unauthorized access or data corruption. Dependability inspires
user confidence and prevents business disruptions.

Efficiency: Well-engineered software makes appropriate use of system resources including


processor time, memory, disk space, and network bandwidth. It should not waste resources
unnecessarily while still meeting performance requirements. Efficiency balances speed,
memory usage, and other constraints.

Usability: The software must be intuitive, easy to learn, and efficient to use for its intended
audience. This includes appropriate user interface design, clear error messages, consistent
navigation, and accessibility features. High usability reduces training costs and user errors.

Portability: Software should be easily transferable to different environments, platforms, or


hardware configurations with minimal modification. This requires avoiding platform-specific
dependencies and using standard programming languages and protocols. Portable software
protects investment when technology changes.
Appropriate Documentation: Comprehensive documentation including user manuals,
technical specifications, design documents, and inline code comments ensures that both
users and future developers can understand and work with the software effectively.

3. Identify different generic software process models and examine their strengths and
weaknesses

Waterfall Model: A linear sequential approach where each phase must be completed before
the next begins: requirements, design, implementation, testing, deployment, maintenance.
Strengths include simple management, clear milestones, and thorough documentation.
Weaknesses include inflexibility, late detection of errors, and difficulty accommodating
changing requirements. Best suited for projects with stable, well-understood requirements.

Evolutionary Development (including Rapid Prototyping): An iterative approach where a


preliminary version is built, then refined based on user feedback. Strengths include rapid
delivery of functionality, user involvement throughout, and accommodation of changing
requirements. Weaknesses include potential for poor structure, difficult project management,
and risk of indefinite evolution. Best suited for projects with unclear or rapidly changing
requirements.

Fountain Model: An object-oriented variant where phases overlap and iteration occurs within
and between phases. Objects and classes are developed incrementally. Strengths include
support for reuse, flexibility, and object-oriented paradigm alignment. Weaknesses include
complex project tracking and management difficulty.

Formal Transformation: A mathematical approach where formal specifications are


systematically transformed into executable programs. Strengths include high reliability and
correctness proofs. Weaknesses require specialised mathematical skills, are
time-consuming, and impractical for most business applications. Used primarily for
safety-critical systems.

Reuse-Oriented Approach: Focuses on assembling systems from existing components,


frameworks, or commercial off-the-shelf (COTS) software. Strengths include reduced
development time and cost, lower risk, and proven reliability. Weaknesses include
dependency on external suppliers, potential integration difficulties, and less control over
features and evolution.

4. Outline the main activities, tools, techniques, and deliverables of the analysis phase

Activities:
- Feasibility Study: Determines whether the proposed system is technically feasible,
economically viable, and operationally acceptable. Assesses costs, benefits, risks, and
alignment with organisational strategy.
- Requirements Analysis: Elicits, documents, validates, and manages stakeholder
requirements. Identifies what the system must do, constraints it must operate under, and
quality attributes it must exhibit.
Tools and Techniques:
- Data Gathering: Interviews (structured/unstructured), questionnaires, direct observation,
document analysis, and joint application development (JAD) sessions
- Data Flow Diagrams (DFD): Graphical representation showing how data moves through the
system using symbols for external entities, processes, data stores, and data flows
- Entity-Relationship Diagrams (ERD): Illustrates data entities, their attributes, and
relationships between entities
- Object Models: UML diagrams (class diagrams, use case diagrams) showing system
objects and their interactions
- Data Dictionary: Central repository containing definitions, structures, and relationships of all
data elements
- CASE Tools: Computer-Aided Software Engineering tools that automate diagramming,
consistency checking, and documentation generation
- Prototyping: Building working models to clarify requirements and validate understanding
with users

Deliverables:
- Feasibility Report: Document presenting findings and recommendations regarding project
viability
- Requirements Specification: Comprehensive document detailing functional requirements
(what the system does) and non-functional requirements (performance, security, usability,
reliability constraints)
- Validated Requirements: Requirements that have been reviewed and approved by
stakeholders

5. Outline the main activities, tools, techniques, and deliverables of the design phase

Activities:
- Architectural Design: Identifies overall system structure, components, their relationships,
and allocation to hardware/software platforms
- Interface Design: Specifies how users interact with the system, including screens, reports,
input forms, and navigation
- Data Structure Design: Defines database schemas, file structures, and data organisation
- Algorithm Design: Develops detailed logic for each program module

Tools and Techniques:


- Structure Charts: Hierarchical diagrams showing program modules and their calling
relationships
- HIPO Charts (Hierarchy plus Input-Process-Output): Combines visual hierarchy with IPO
descriptions for each module
- CASE Tools: Automated design tools supporting diagram creation, consistency checking,
and code generation
- Design Methods: Top-down (starting with high-level modules and decomposing) versus
bottom-up (designing low-level modules first and composing upward)
- System Structuring: Partitioning system into subsystems, modules, and programs with
clearly defined interfaces
- Design Strategies: Functional decomposition (dividing system by functions) versus
object-oriented design (identifying objects and their interactions)

Design Guidelines:
- Screen design should maintain consistency, use appropriate fonts and colours, provide
clear labels and instructions, group related items logically
- Report design should consider audience needs, include appropriate headers/footers, use
meaningful column headings, provide summary information
- User interfaces should be intuitive, minimise user memory load, provide feedback, support
error prevention and recovery

Deliverables:
- System Architecture: Documentation of overall system structure, hardware/software
platform decisions, and component allocation
- Design Specification: Detailed description of modules, interfaces, data structures, and
algorithms sufficient for implementation

6. Outline the main activities, tools, techniques, and deliverables of the implementation
phase

Activities:
- Coding: Translating design specifications into executable programs using appropriate
programming languages
- Unit Development: Creating individual program modules according to design specifications
- Code Reviews: Systematic examination of source code by peers to identify defects and
ensure adherence to standards
- Documentation: Producing technical documentation and user manuals

Tools and Techniques:


- Integrated Development Environments (IDEs): Provide code editing, debugging, and
compilation tools
- Version Control Systems: Manage changes to source code and track different versions
- CASE Tools: Some tools can generate code directly from design specifications
- Programming Standards: Coding conventions regarding naming, formatting, commenting,
and structure

Deliverables:
- Source Code: Complete program code written in the specified programming language
- Executable Program: Compiled/interpreted software ready for testing
- Technical Documentation: Comments, module descriptions, and programmer guides
- User Documentation: Manuals, help systems, and training materials
7. Outline the main activities, tools, techniques, and deliverables of the validation phase

Activities:
- Test Planning: Developing comprehensive test strategies, test cases, and test data
- Software Inspection: Formal, systematic review of requirements, design, or code without
executing the program
- Testing: Executing the program with various inputs to discover defects
- Defect Tracking: Recording, managing, and monitoring resolution of identified defects

Tools and Techniques:


- Test Plans: Documents describing test objectives, resources, schedule, and test cases
- Unit Testing: Testing individual components in isolation
- Integration Testing: Testing interactions between components
- System Testing: Testing the complete, integrated system
- Acceptance Testing: Validating with end-users that the system meets their needs
- Test Case Design: Techniques including equivalence partitioning (dividing input domain into
classes), boundary value analysis (testing at boundaries), and decision tables
- Automated Testing Tools: Software that automates test execution and comparison of actual
versus expected results

Deliverables:
- Test Plan Document: Comprehensive testing strategy and schedule
- Test Reports: Documentation of test results, defects found, and resolution status
- Verified Software: Software that has been tested and confirmed to meet requirements
- Defect Log: Complete record of identified defects and their resolution

8. Outline the main activities, tools, techniques, and deliverables of the evolution phase

Activities:
- Maintenance: Correcting defects discovered after deployment
- Adaptation: Modifying software to operate in changed environments (new hardware,
operating systems, regulations)
- Enhancement: Adding new features or improving existing functionality
- Re-engineering: Restructuring or rewriting parts of the system to improve quality while
preserving functionality
- Retirement: Planned removal of the system from operation

Tools and Techniques:


- Change Management Systems: Process for requesting, evaluating, approving, and tracking
changes
- Configuration Management: Controlling and tracking versions of software components
- Impact Analysis: Assessing effects of proposed changes on other system parts
- Reverse Engineering: Analysing existing software to understand its design and
specification
- Refactoring: Improving code structure without changing external behaviour
Deliverables:
- Change Requests: Formal documentation of proposed modifications
- Updated Software: Modified versions of the system
- Maintenance Reports: Records of maintenance activities and effort
- Release Notes: Documentation describing changes in each software version

General Objective 2: Appreciation for methods, processes, tools and techniques in software
engineering

Additional Tools and Techniques:

Data Flow Diagrams (DFD) - Detailed:


- Context Diagram: Highest-level DFD showing the entire system as a single process,
external entities, and data flows between them
- Level 0 DFD: Decomposes the system into major processes, showing data stores and data
flows
- Level 1+ DFDs: Further decomposition of processes for detailed understanding
- DFD Symbols: External entities (squares), processes (circles/rounded rectangles), data
stores (open rectangles), data flows (arrows)
- Levelling and Balancing: Maintaining consistency between parent and child diagrams

Entity-Relationship Diagrams (ERD) - Detailed:


- Entities: Objects or concepts about which data is stored (rectangles)
- Attributes: Properties that describe entities (ovals connected to entities)
- Relationships: Associations between entities (diamonds)
- Cardinality: Numerical constraints on relationships (one-to-one, one-to-many,
many-to-many)
- Crow's Foot Notation: Visual representation of cardinality constraints

Software Quality Assurance:


- Quality Control: Activities focused on identifying defects in specific products
- Quality Assurance: Planned systematic activities to ensure quality processes are followed
- Standards: ISO 9001, CMMI (Capability Maturity Model Integration)
- Reviews: Walkthroughs, technical reviews, inspections at varying formality levels

Risk Management:
- Risk Identification: Determining potential project, product, and business risks
- Risk Analysis: Assessing probability and potential impact of each risk
- Risk Planning: Developing strategies to avoid, mitigate, transfer, or accept risks
- Risk Monitoring: Continuously tracking risks and effectiveness of mitigation strategies
UNIT 2 MODULE 3: OPERATING SYSTEMS AND COMPUTER NETWORKS

General Objective 1: Understand the functions of operating systems

1. Explain the main functions of operating systems

An operating system is system software that manages computer hardware and software
resources and provides common services for computer programs. As a resource manager,
the OS allocates CPU time, memory space, storage capacity, and input/output devices
among competing programs, ensuring efficient and fair utilisation while preventing conflicts.
It keeps track of which resources are in use, by whom, and for how long.

As an interface, the OS hides the complexity of hardware from users and applications,
providing a clean, abstract interface to access system resources. This abstraction allows
programmers to write applications without needing detailed knowledge of underlying
hardware specifics. The OS presents this interface through system calls, which are
programmatic requests for services, and through user interfaces (command-line, graphical,
or touch) that allow humans to interact with the computer.

2. Describe how operating systems have evolved over time

First Generation (1940s-1950s): No operating system existed. Programmers interacted


directly with hardware using machine language, plugboards, and toggle switches. Each
program ran exclusively, with the entire machine dedicated to a single job at a time.
Significant idle time occurred between jobs as operators manually set up the next program.

Second Generation (1950s-1960s): Batch processing systems emerged. Jobs with similar
requirements were grouped together, and a monitor program controlled job sequencing.
Punched cards and magnetic tapes were primary input/output media. When one job finished,
the monitor automatically loaded the next, reducing transition time. However, CPU often
remained idle during slow I/O operations.

Third Generation (1960s-1970s): Multiprogramming and time-sharing systems developed.


Multiple programs reside in memory simultaneously; when one program waits for I/O, the
CPU executes another. This significantly improved CPU utilisation. Time-sharing extended
this concept, allowing multiple users to interact with the system simultaneously through
terminals, with the OS rapidly switching between users, giving each the illusion of a
dedicated machine.

Fourth Generation (1980s-1990s): Personal computing and graphical user interfaces


emerged. Systems like MS-DOS, early Mac OS, and Windows provided single-user,
single-tasking or simple multitasking capabilities. Networks and distributed operating
systems allowed resource sharing across multiple computers. GUIs made computers
accessible to non-technical users.

Fifth Generation (2000s-Present): Mobile operating systems (iOS, Android), cloud computing
platforms, and virtualisation have become dominant. Modern OSes support multi-core
processors, sophisticated security features, power management for portable devices, and
distributed computing paradigms. Containerisation and microkernel architectures represent
ongoing evolution trends.

3. Describe the functions of operating systems

Bootstrap Process:
When power is applied, the CPU executes code from ROM (typically the BIOS or UEFI).
This code performs Power-On Self-Test (POST), initialises hardware, and locates the
bootloader from the boot device. The bootloader loads the operating system kernel into
memory, transfers control to it, and the kernel then initialises its data structures, device
drivers, and system services before presenting the user interface.

Process Management:
- Definition: A process is a program in execution, including program code, current activity,
stack, data section, and heap
- Process States: New (being created), Ready (waiting for CPU), Running (instructions being
executed), Blocked/Waiting (waiting for I/O or event), Terminated (finished execution)
- Process Control Block (PCB): Kernel data structure containing process ID, program
counter, registers, memory limits, open files, and scheduling information
- Context Switching: Saving current process state and loading another process's saved state

Interrupt Mechanism:
Interrupts are signals that temporarily suspend normal program execution to handle urgent
events. When an interrupt occurs, hardware saves the current instruction pointer, jumps to
the interrupt handler address in the interrupt vector table, executes the handler, then
restores the saved state. Types include:
- Internal Interrupts (Traps/Exceptions): Generated by running process (division by zero,
system calls)
- I/O Interrupts: Hardware signals completion of input/output operations
- External Interrupts: Timer interrupts, power failure alerts
- Restart Interrupt: Reinitialises the system

Deadlock:
A permanent blocking state where two or more processes are each waiting for resources
held by the others, none can proceed. Four necessary conditions: mutual exclusion, hold
and wait, no preemption, circular wait. Prevention strategies include breaking any of these
conditions through resource allocation policies.

Scheduling Algorithms:
- Non-preemptive: Process runs until it voluntarily relinquishes CPU or terminates
- First-Come-First-Served (FCFS): Simplest algorithm; processes execute in order of arrival
- Shortest-Job-First (SJF): Selects process with smallest expected CPU burst time

- Preemptive: OS can interrupt running process to allocate CPU to another


- Round Robin: Each process gets a small time quantum (10-100ms) in circular order
- Preemptive SJF (Shortest-Remaining-Time-First): Preempts current process if new job
has shorter remaining time
Memory Management:
- Virtual Memory: Technique allowing execution of processes partially loaded in memory,
creating illusion of larger memory space than physically available
- Paging: Divides physical memory into fixed-size frames, logical memory into pages;
non-contiguous allocation eliminates external fragmentation
- Thrashing: Excessive paging activity where process spends more time paging than
executing; occurs when insufficient frames allocated or poor locality

File Management:
- Directories/Folders: Hierarchical organisation structures for grouping files
- Files: Named collections of related information stored on secondary storage
- Operations: Create, delete, open, close, read, write, seek

Security:
- User IDs/Passwords: Authentication mechanisms to verify identity
- Lockwords: Additional authentication for specific resources
- Access Control Lists (ACL): Specify which users/groups have what permissions for each
object
- File Encryption: Transforming data to prevent unauthorised access
- File Compression: Reducing storage space requirements
- Activity Logs: Recording system events for audit and forensic purposes

Interface (User):
- Command-Line Interface (CLI): Text-based interaction using commands
- Menu Interface: Selection from displayed options
- Graphical User Interface (GUI): Visual interaction using windows, icons, menus, pointer

Device Management:
- Device Drivers: Kernel modules that understand device specifics and provide uniform
interface
- Interrupt Handling: Processing device-generated interrupts through PCB management
- I/O Control: Sending commands to devices
- Peripheral Control: Managing attached devices
- Polling: Periodically checking device status (alternative to interrupts)
- Buffering: Temporary storage area to smooth data transfer between devices with different
speeds
- Spooling: Simultaneous Peripheral Operations On-Line; queue for devices that cannot
interleave data (printers)
General Objective 2: Develop an appreciation for networking technology and applications

4. Distinguish among networked, client-server, and distributed systems

Networked Systems: Multiple independent computers connected by communication media


capable of exchanging information. Each computer retains full autonomy; no inherent
coordination or resource sharing beyond basic communication. Users must explicitly know
where resources reside and manually access them. The network simply provides
connectivity, not integration.

Client-Server Systems: Specialisation of networked systems where servers provide specific


services (file storage, printing, databases) and clients request these services. Servers are
dedicated, continuously running, and serve multiple clients simultaneously. Communication
follows request-response pattern. Well-defined protocols govern interactions. Centralised
control simplifies management but creates single points of failure.

Distributed Systems: Collection of independent computers appearing to users as a single,


coherent system. Middleware provides transparency regarding location, migration,
replication, concurrency, and failure. Resources are automatically located and accessed;
processes may execute on any suitable machine without user knowledge. Distributed
systems offer scalability, fault tolerance, and resource sharing but are more complex to
design and manage.

5. Design simple networks

Network Architecture:
- Ethernet: Most widely used LAN technology; uses CSMA/CD (Carrier Sense Multiple
Access with Collision Detection); speeds from 10 Mbps to 100 Gbps
- FDDI (Fiber Distributed Data Interface): 100 Mbps token-passing ring network using fiber
optic cable; provides redundancy through dual counter-rotating rings

Network Topology:
- Star: All devices connect to central hub/switch; easy installation and troubleshooting;
central point of failure
- Ring: Devices connected in circular path; data travels in one direction; deterministic
access; single break disrupts entire network
- Bus: All devices share common backbone cable; economical for small networks; difficult
troubleshooting; limited length
- Hybrid: Combination of topologies (star-bus, star-ring)

Network Devices:
- Modem: Modulates/demodulates signals for transmission over analog lines
- Switch: Connects devices within LAN; uses MAC addresses to forward frames only to
intended recipient
- Router: Connects different networks; uses IP addresses to determine optimal path;
maintains routing tables
- Bridge: Connects two network segments; filters traffic based on MAC addresses
- Network Interface Card (NIC): Provides physical connection to network media; has unique
MAC address
- Hub: Simple repeater; broadcasts all traffic to all ports; inefficient use of bandwidth

Transmission Media:
- Wired:
- Twisted Pair: UTP (unshielded) and STP (shielded); RJ45 connectors; Categories 5e, 6,
6a; up to 10 Gbps; 100m maximum distance
- Coaxial: Copper core with insulation, braided shield; BNC connectors; used in cable TV,
older Ethernet
- Fiber Optic: Glass/plastic strands carrying light pulses; SC, ST, LC connectors; immune to
electromagnetic interference; high bandwidth; long distances
- Wireless:
- Satellite: Geostationary or low-earth orbit; wide coverage; high latency
- Microwave: Terrestrial line-of-sight; point-to-point; affected by weather
- Infrared: Short-range; line-of-sight; remote controls, some LANs
- IEEE1394 (Firewire): High-speed serial bus; hot-swappable; daisy-chaining; video
cameras, external drives

Protocols:
- TCP/IP (Transmission Control Protocol/Internet Protocol): Core Internet protocol suite; TCP
provides reliable, connection-oriented delivery; IP provides addressing and routing
- FTP (File Transfer Protocol): Transfers files between client and server; separate control
and data connections
- HTTP (Hypertext Transfer Protocol): Web page retrieval; request-response; stateless
- HTTPS: HTTP over SSL/TLS; encrypted communication
- IEEE 802.11a/b/g/n/ac/ax: Wireless LAN standards; varying frequencies, speeds, ranges
- IEEE 802.16g (WiMAX): Wireless metropolitan area network; broadband access
- VoIP (Voice over Internet Protocol): Transmitting voice over IP networks; protocols include
SIP, H.323, RTP
- OSI Model: Seven-layer conceptual framework (Physical, Data Link, Network, Transport,
Session, Presentation, Application)

Access Methods for Mobile Networks:


- CDMA (Code Division Multiple Access): Each transmission encoded with unique code; all
transmit simultaneously over same frequency
- TDMA (Time Division Multiple Access): Users share frequency by taking turns in time slots
- GSM (Global System for Mobile Communications): Dominant 2G standard; uses TDMA;
SIM cards
- GPRS (General Packet Radio Service): 2.5G technology; packet-switched data over GSM

Networking Considerations:
- Cost: Hardware, software, installation, training, maintenance, upgrades
- Security: Firewalls, encryption, authentication, intrusion detection, VPNs
- Management: Monitoring, configuration, fault detection, performance tuning
- Expandability: Ability to add users, devices, applications without major redesign
- Interconnectivity: Compatibility with existing and future systems
- Wired vs Wireless: Bandwidth, security, mobility, installation cost, reliability trade-offs
Network Configuration Types:
- Multiuser: Multiple terminals connected to single host computer; terminals perform no
processing
- Client Server: As previously described
- Centralised vs Distributed: Centralised places control and resources in single location;
distributed spreads across multiple locations
- Peer-to-Peer: All computers equal; each can act as client or server; no central control

Network Security:
- Firewalls: Hardware or software filtering traffic based on rules; packet filtering, stateful
inspection, application gateway, next-generation

Network Design Process:


1. Requirements analysis: user count, applications, performance needs, security
requirements, budget
2. Logical design: topology, protocols, IP addressing scheme, naming conventions
3. Physical design: device placement, cabling, wireless access points, power requirements
4. Implementation planning: installation sequence, testing strategy, user training
5. Documentation: network diagrams, configuration details, policies and procedures

Sample Simple Network Diagram Description:


A small business network might consist of: cable/DSL modem connected to firewall, firewall
connected to main switch, switch connected to servers (file, print, application) and
workstations via Cat6 UTP cabling in star topology. Wireless access point connected to
switch provides Wi-Fi access using 802.11ac. All devices use private IP addressing
([Link]/24) with DHCP server assigning addresses. Router connects to ISP and
performs NAT. VLANs separate guest Wi-Fi from internal network.
Additional Study Material for Module 3

Process vs Program Comparison:

| Characteristic | Program | Process |


|----------------|---------|---------|
| Nature | Passive entity (file on disk) | Active entity (loaded in memory) |
| Persistence | Permanent until deleted | Created, executes, terminates |
| Resources | None initially | CPU, memory, I/O devices allocated |
| Multiple instances | One program file | Multiple processes from same program |
| State | No execution state | Running, ready, blocked, etc. |

Memory Management Techniques Comparison:

| Technique | Description | Advantage | Disadvantage |


|-----------|-------------|-----------|--------------|
| Single Contiguous | One partition for OS, one for user | Simple | Poor utilisation, no
multiprogramming |
| Fixed Partition

You might also like