Data Structures and Algorithms: Core Concepts
Unit I: Fundamentals
1. Elementary Data Organization
Elementary data organization refers to the basic method of arranging and managing data in a computer system. Data is organized in the form of characters, fields, records, files, and databases. A character is the smallest unit of data, while a field is a group of related characters. Multiple fields form a record, and records together create a file. Proper data organization helps in storing, accessing, and processing information efficiently. It improves
Read MoreNC, CNC, and DNC Machines: Key Differences and Functions
Comparison of NC, CNC, and DNC Machines
| Feature | NC Machine | CNC Machine | DNC Machine |
|---|---|---|---|
| Full Form | Numerical Control | Computer Numerical Control | Direct Numerical Control |
| Control Method | Punched tape/cards | Onboard computer | Central computer network |
| Program Storage | External tape | Machine memory | Central computer |
| Editing | Difficult | Easy | Very easy/centralized |
| Flexibility | Less flexible | More flexible | Highly flexible |
| Accuracy | Moderate | High | Very high |
| Automation Level | Low | High | Very high |
| Human Intervention | More | Less | Very less |
| Data Transfer | Manual | Automatic | Communication |
Dataflow Architectures and AI Hardware Optimization
Dataflow Architectures in Machine Learning
Why use dataflow architecture for ML?
Dataflow architectures eliminate the need for a program counter, executing instructions based solely on input data availability. This minimizes the massive energy and latency costs associated with fetching data from main memory (DRAM) in traditional von Neumann architectures, making it highly efficient for Machine Learning workloads.
Mapping Deep Learning to Dataflow
Multiply-and-Accumulate (MAC) operations and deep loop
Read MoreOperating Systems Exam Preparation: Core Concepts
CPU Scheduling Fundamentals
CPU scheduling is the process by which the operating system selects which process to execute next. Algorithms aim to optimize metrics such as waiting time, turnaround time, and response time.
Key Performance Metrics
- Completion Time (CT): The moment a process finishes.
- Turnaround Time (TAT):
TAT = Completion Time - Arrival Time - Waiting Time (WT):
WT = Turnaround Time - Burst Time - Response Time (RT):
RT = First time it runs - Arrival Time
Base Example Data
| Process | Arrival | Burst |
|---|---|---|
| P1 | 0 | 6 |
| P2 | 1 | 3 |
| P3 | 2 | 8 |
| P4 | 3 | 4 |
Scheduling
Read MoreData Structures and Algorithms Cheat Sheet
Big-O and Theta Notation
1 < log n < (log n)² < n < n log n < n² < n²log n < n³ < 2ⁿ
- Θ (Theta): Tight bound/actual growth.
- O (Big-O): Upper bound/worst-case.
- Ω (Omega): Lower bound.
Note: Ignore constants and smaller terms. Example: 3n²+5n+1 = Θ(n²)
Loop Complexity Rules
- i++ or i=i+2: O(n)
- i=i*2 or i=i/2: O(log n)
- Nested loops: Multiply complexities (e.g., O(n log n)).
- Sequential loops: Add complexities (e.g., O(n) + O(log n) = O(n)).
Universal Loop Analysis
“Outer loop
Read MoreHhsfhh
1. Algebraic System
An algebraic system is a non-empty set together with one or more operations (like addition or multiplication) defined on it.
Example: A set AAA with an operation ∗*∗ is written as (A,∗)(A, *)(A,∗).
2. Semigroup
A semigroup is a set SSS with a binary operation ∗*∗ that is associative:
(a∗b)∗c=a∗(b∗c),∀a,b,c∈S(a * b) * c = a * (b * c), \quad \forall a,b,c \in S(a∗b)∗c=a∗(b∗c),∀a,b,c∈S
3. Monoid
A monoid is a semigroup that has an identity element eee,
Read More