Active Recall • Semester 01 Curriculum Scope

FCS Linux & Architecture Flashcards

Master core concepts, plain-English intuition, exact theorems, and high-probability exam traps across LAC, SPC, FCS, and IWT.

FCS Linux & Architecture Flashcards

#1 Von Neumann Architecture

What are the 5 core units of Von Neumann architecture, and what is the Von Neumann Bottleneck?

💡 Intuition: Modern computers store both program instructions and data in the same shared memory space.

📐 Core Rule: 5 Units: CPU (ALU + Control Unit + Registers), Memory (RAM), Input, Output. Von Neumann Bottleneck: CPU throughput is constrained because instructions and data must share the same limited-bandwidth bus.

🎯 Exam Cue: Mitigated in modern processors using multi-level Cache hierarchies (L1/L2/L3) and instruction pipelining.

#2 Inodes & File Metadata

How does Linux represent files internally, and what is stored inside an Inode?

💡 Intuition: In Linux, "everything is a file". A filename is merely a human-readable alias pointing to a numeric Inode.

📐 Core Rule: Inode (Index Node) stores: - Permissions, UID, GID, file size, timestamps (access, modify, change), and data block pointers. Crucial: An inode does NOT store the filename or file data itself! Filenames are stored in directory entries.

🎯 Exam Cue: Inspect file inode number using `ls -i` or `stat <filename>`.

#3 Hard Links vs Soft Links

Contrast Hard Links and Soft (Symbolic) Links across Inode sharing, File system boundaries, and Target deletion.

💡 Intuition: Hard link is a duplicate directory entry pointing to the same inode; Soft link is a shortcut pointing to another file's pathname.

📐 Core Rule: 1. Hard Link (`ln file link`): Shares identical inode. Cannot cross partitions or link directories. Deleting original preserves data as long as link count $> 0$. 2. Soft Link (`ln -s file link`): New file with unique inode. Can cross partitions and link directories. Deleting target breaks the link.

🎯 Exam Cue: High-frequency 5-mark university exam question.

#4 File Permissions & Octal Calculation

How are Linux file permissions calculated in octal? Decode `rwxr-xr--` and explain `chmod 754`.

💡 Intuition: Permissions are grouped into 3 triads: User (Owner), Group, and Others.

📐 Core Rule: Values: Read $r=4$, Write $w=2$, Execute $x=1$. - `rwx` $= 4 + 2 + 1 = 7$ (Owner: full permissions) - `r-x` $= 4 + 0 + 1 = 5$ (Group: read and execute) - `r--` $= 4 + 0 + 0 = 4$ (Others: read only) Result: `chmod 754 filename`.

🎯 Exam Cue: For directories, $x$ permission is required to `cd` into the directory or access files inside.

#5 umask Calculation

How does `umask` determine the default permissions of newly created files and directories?

💡 Intuition: Acts as a permission mask (filter) that subtracts permissions from system maximums.

📐 Core Rule: Base maximums: Files $= 666$ (`rw-rw-rw-`), Directories $= 777$ (`rwxrwxrwx`). If `umask = 022`: - New file: $666 - 022 = 644$ (`rw-r--r--`) - New directory: $777 - 022 = 755$ (`rwxr-xr-x`)

🎯 Exam Cue: New regular files never receive execute ($x$) permission by default for security.

#6 Essential Command Flags

What are the most tested exam flags for `grep`, `find`, `tar`, and `ps`?

💡 Intuition: Core command-line filters tested in lab exams and viva.

📐 Core Rule: - `grep`: `-i` (case-insensitive), `-v` (invert match), `-n` (show line numbers), `-c` (count matches). - `find`: `find . -name "*.c" -type f` (search by name and file type). - `tar`: `-czvf archive.tar.gz dir/` (create, gzip, verbose, file); `-xzvf` (extract). - `ps`: `ps -ef` or `ps aux` (show all active processes with PID and PPID).

🎯 Exam Cue: Combining with pipes: `ps -ef | grep python | grep -v grep`.

#7 Process Lifecycle & States

What are the 5 states in a process lifecycle, and what does the "Zombie" state mean?

💡 Intuition: A process is a program in execution, cycling through distinct scheduling states.

📐 Core Rule: States: New $\to$ Ready $\to$ Running $\to$ Blocked/Waiting $\to$ Terminated. Zombie State: Process has completed execution (`exit()`), but its exit status has not yet been collected by parent process via `wait()`.

🎯 Exam Cue: Zombie process consumes zero CPU or RAM, but holds a slot in the Process Table.

#8 fork() System Call

What does `fork()` do, and what are its 3 distinct return values?

💡 Intuition: Creates an exact duplicate child process by cloning the parent's memory space and descriptors.

📐 Core Rule: Return values: 1. $< 0$: Fork failed (insufficient resources). 2. $== 0$: Executing inside the Child process. 3. $> 0$: Executing inside the Parent process (returns Child's PID).

🎯 Exam Cue: If a program executes `fork()` $n$ times in sequence, it spawns $2^n - 1$ child processes ($2^n$ total processes).

#9 Zombie vs Orphan Process

Compare a Zombie process and an Orphan process: How is each created, and how is each resolved?

💡 Intuition: Zombie: Child is dead, parent is alive but ignoring it. Orphan: Parent died while child is still running.

📐 Core Rule: 1. Zombie: Parent forgot to call `wait()`. Cleared when parent calls `wait()` or when parent terminates. 2. Orphan: Parent terminated before child. The `init` / `systemd` process (PID 1) automatically adopts the orphan and reaps its exit status.

🎯 Exam Cue: You cannot kill a zombie process with `kill -9` because it is already dead! Kill its parent instead.

#10 System Calls vs Library Functions

What is the fundamental difference between a System Call (`read()`, `write()`, `fork()`) and a Library Function (`printf()`, `malloc()`)?

💡 Intuition: Privilege level and CPU execution mode boundary.

📐 Core Rule: 1. System Call: Requests kernel service; triggers CPU context switch from User Mode to Kernel Mode via software interrupt (`trap`). Relatively expensive. 2. Library Function: Runs in User Mode as part of program binary. Often wraps system calls with buffering (e.g. `printf` buffers before calling `write`).

🎯 Exam Cue: Kernel mode has unrestricted hardware access; user mode is sandboxed.

#11 Linux Signals

Contrast `SIGINT` (Ctrl+C), `SIGTERM` (15), and `SIGKILL` (9). Which signal cannot be caught or ignored?

💡 Intuition: Asynchronous notifications sent to a process to interrupt its execution.

📐 Core Rule: - `SIGINT` (Signal 2): Sent via terminal `Ctrl+C`. Can be caught, handled, or ignored. - `SIGTERM` (Signal 15): Default signal sent by `kill <PID>`. Requests polite termination, allowing cleanup. Can be caught. - `SIGKILL` (Signal 9): Immediate termination by kernel. CANNOT be caught, blocked, or ignored!

🎯 Exam Cue: Always try `SIGTERM` (15) first before resorting to `kill -9`.

#12 Standard Streams & Redirection

Explain the 3 standard POSIX file descriptors (0, 1, 2) and their redirection operators (`<`, `>`, `>>`, `2>`).

💡 Intuition: Every Linux process starts with three pre-opened streams.

📐 Core Rule: - `0`: `stdin` (Keyboard). Redirection: `<`. - `1`: `stdout` (Terminal display). Redirection: `>` (overwrite) or `>>` (append). - `2`: `stderr` (Error messages). Redirection: `2>`. Pipe `|`: Connects `stdout` of Command 1 to `stdin` of Command 2.

🎯 Exam Cue: Redirect both stdout and stderr to a file: `command > file.log 2>&1`.

#13 Memory Hierarchy & Locality

What is the Memory Hierarchy order from fastest to slowest, and what are Temporal vs Spatial Locality?

💡 Intuition: Balances speed, cost, and capacity across storage technologies.

📐 Core Rule: Order: Registers $\to$ L1/L2/L3 Cache $\to$ RAM $\to$ SSD $\to$ HDD. - Temporal Locality: Memory accessed recently is likely to be accessed again soon (e.g. loop counter). - Spatial Locality: Memory locations adjacent to recently accessed address are likely to be accessed soon (e.g. array traversal).

🎯 Exam Cue: Cache memory exploitation depends entirely on spatial and temporal locality.

#14 Cache Mapping Techniques

Contrast Direct Mapping, Fully Associative Mapping, and K-Way Set-Associative Mapping.

💡 Intuition: Rules governing where a block of main memory can be placed in cache lines.

📐 Core Rule: 1. Direct Mapped: Each memory block maps to exactly ONE specific cache line. Fast, but high conflict misses. 2. Fully Associative: A memory block can be placed in ANY cache line. Zero conflict misses, but requires expensive parallel tag comparators. 3. K-Way Set Associative: Cache split into sets of $K$ lines. Block maps to one set, and can sit in any line within that set.

🎯 Exam Cue: Modern CPUs universally use 4-way or 8-way set associative caches.

#15 Compilation Pipeline

What are the distinct roles of a Preprocessor, Compiler, Assembler, and Linker in the C build pipeline?

💡 Intuition: Transforms high-level human source code into executable binary.

📐 Core Rule: 1. Preprocessor (`cpp`): Expands `#include`, `#define`, strips comments $\to$ `.i` file. 2. Compiler (`gcc -S`): Translates high-level code to assembly $\to$ `.s` file. 3. Assembler (`as`): Translates assembly to machine code $\to$ `.o` object file. 4. Linker (`ld`): Combines object files with library code (`libc`) and resolves external symbols $\to$ executable `a.out`.

🎯 Exam Cue: Unresolved external reference error occurs during the linking stage.

#16 Cloud Service Models (IaaS, PaaS, SaaS)

Differentiate between IaaS, PaaS, and SaaS in terms of what the provider manages vs what the user manages.

💡 Intuition: Degrees of abstraction in cloud computing infrastructure.

📐 Core Rule: - IaaS (Infrastructure as a Service): Provider gives VMs, network, storage. User manages OS, runtime, and apps (e.g. AWS EC2). - PaaS (Platform as a Service): Provider manages hardware, OS, and runtime. User manages code and data only (e.g. Vercel, Heroku). - SaaS (Software as a Service): Provider manages everything. User simply uses software via browser (e.g. Google Docs, Gmail).

🎯 Exam Cue: High-yield question from Unit 5 / Contemporary Computing.

Saved Bookmarks

0

Student Profile

Cross-Device Sync

Scan this QR code with your mobile camera or another device to transfer your saved bookmarks, theme preference, and flashcard progress instantly.

Request Academic Materials

Submitting opens FormSubmit's confirmation or error page. You can return to StudyDump with your browser Back button.