1/274
Looks like no tags are added yet.
What is the stack in process memory?
A region of memory used for function call frames, local variables, and control flow.
How does the stack grow during execution?
It grows downward toward lower memory addresses.
What is a stack frame?
A memory block containing a function's local variables, arguments, and return address.
What register typically points to the top of the current stack frame?
The stack pointer (RSP on x86-64).
What is the base pointer used for on the stack?
To reference local variables and function arguments relative to a fixed frame location.
What is the heap in process memory?
A region of memory used for dynamic memory allocation with a longer than local lifetime.
How does the heap typically grow during execution?
It grows upward toward higher memory addresses.
What function allocates dynamic memory in C?
malloc()
What function releases previously allocated heap memory in C?
free()
What is internal fragmentation?
Wasted space inside an allocated memory block due to alignment or fixed block sizing.
What is external fragmentation?
Wasted space between allocated memory blocks that cannot satisfy large new allocation requests.
What system call is used to expand the heap data segment?
brk() or sbrk()
What is virtual addressing?
A memory management technique that translates virtual addresses used by software into physical hardware addresses.
What is the standard page size on x86-64 architectures?
4 Kilobytes (4 KB).
What is a multi-level page table?
A hierarchical table structure that maps virtual addresses to physical addresses while saving memory.
What is the TLB (Translation Lookaside Buffer)?
A specialized CPU cache that stores recent virtual-to-physical address translations.
What happens during a TLB miss?
The CPU must traverse the page table hierarchy in memory to locate the physical translation.
What is a page fault?
An exception raised when a process accesses a virtual address not currently mapped in physical memory.
What is a minor page fault?
A page fault where the requested page is already in physical memory but not mapped in the page table.
What is a major page fault?
A page fault where the requested page must be loaded from secondary storage or swap space.
What is the purpose of the page fault handler?
To resolve page faults by allocating frames, loading pages from disk, or terminating illegal accesses.
What is mmap()?
A system call that maps files or devices into a process's virtual memory address space.
What is anonymous memory mapping in mmap?
A mapping not backed by any file, typically used for zero-filled memory or heap allocation.
What does COW stand for in virtual memory management?
Copy-On-Write.
How does Copy-On-Write operate during a fork() call?
Parent and child processes share physical memory pages as read-only until one attempts a write.
What triggers a physical page copy in a COW scenario?
A write operation to a page marked as read-only, triggering a page fault and duplication.
What is a segmentation fault?
A hardware exception raised when software attempts an unauthorized access to a restricted memory region.
What is address space layout randomization (ASLR)?
A security technique that randomly arranges the address space positions of key process data areas.
What is latency in computer systems?
The time delay between the initiation of a request and the receipt of its response.
What is throughput?
The amount of work performed or data processed within a given time interval.
What is the primary goal of systems benchmarking?
To measure and evaluate performance metrics under controlled, reproducible conditions.
What is Amdahl's Law?
A formula giving the theoretical speedup in latency of the execution of a task at fixed workload.
What is Little's Law in queuing theory?
A theorem that determines the long-term average number of items in a stationary queueing system.
What is object-oriented programming (OOP)?
A programming paradigm based on the concept of objects containing data and code.
What is encapsulation in OOP?
The bundling of data and the methods that operate on that data within a single unit.
What is inheritance in OOP?
A mechanism where a new class derives properties and behaviors from an existing class.
What is polymorphism?
The provision of a single interface to entities of different types or in different contexts.
What is dynamic dispatch?
The process of selecting which implementation of a polymorphic operation to call at runtime.
What is the Single Responsibility Principle (SRP)?
A class should have only one reason to change, meaning it should have only one job.
What is the Open-Closed Principle (OCP)?
Software entities should be open for extension, but closed for modification.
What is the Liskov Substitution Principle (LSP)?
Objects in a program should be replaceable with instances of their subtypes without altering correctness.
What is the Interface Segregation Principle (ISP)?
Many client-specific interfaces are better than one general-purpose interface.
What is the Dependency Inversion Principle (DIP)?
Depend upon abstractions, do not depend upon concretions.
What is a design pattern in software engineering?
A general reusable solution to a commonly occurring problem within a given context.
What is the Singleton design pattern?
A pattern that restricts the instantiation of a class to one single instance.
What is the Factory Method design pattern?
A pattern that uses factory methods to deal with the problem of creating objects without specifying exact classes.
What is the Observer design pattern?
An object maintains a list of its dependents and notifies them automatically of any state changes.
What is the Strategy design pattern?
A behavioral pattern that enables selecting an algorithm at runtime.
What is the Adapter design pattern?
A pattern that allows incompatible interfaces to work together.
What is Unified Modeling Language (UML)?
A general-purpose visual modeling language used to specify, construct, and document software systems.
What is a UML class diagram?
A structure diagram that describes the structure of a system by showing classes, attributes, operations, and relationships.
What is a UML sequence diagram?
An interaction diagram that shows how objects operate with one another and in what order.
What is practical systems design vocabulary?
Standardized terminology used to architect, describe, and scale robust software and hardware systems.
What is horizontal scaling?
Adding more nodes or machines to a system infrastructure to handle increased load.
What is vertical scaling?
Adding more resources such as CPU or RAM to a single server or node.
What is high availability?
A characteristic of a system which aims to ensure an agreed level of operational performance for a higher-than-normal period.
What is the primary role of a compiler?
Translates high-level source code into low-level machine code or intermediate representation.
What is the function of a linker?
Combines multiple compiled object files and libraries into a single executable or shared library.
What does a static linker do?
Copies library code directly into the final executable binary.
What is dynamic linking?
Resolves external library references at load time or runtime rather than compile time.
What is an object file?
A file containing machine code and metadata produced by a compiler from source code.
What is the function of the GNU Assembler (GAS)?
Translates assembly language source code into machine-readable binary object code.
What is a CPU core?
An independent processing unit within a CPU capable of executing its own instruction stream.
What is a hardware thread?
The execution context maintained by a CPU core, including instruction pointers and registers.
What is a software process?
An independent operating system execution unit with its own isolated address space.
What is Simultaneous Multi-Threading (SMT)?
Hardware technology allowing multiple instruction threads to execute concurrently on a single physical core.
What is a CPU instruction pipeline?
A hardware architecture technique that overlaps the execution of multiple instructions in sequential stages.
What is a pipeline hazard?
A structural, data, or control conflict that prevents the next instruction from executing in the pipeline.
What is a branch predictor?
A digital circuit that guesses the outcome of a conditional branch before it is computed.
What is speculative execution?
An optimization technique where a CPU executes instructions before knowing if they are actually required.
What is instruction-level parallelism (ILP)?
A measure of how many instructions in a computer program can be executed simultaneously.
What is out-of-order execution?
A paradigm where a CPU executes instructions in an order dictated by data availability rather than source order.
What is register renaming?
A technique used to avoid false data dependencies by mapping architectural registers to physical registers.
What is the role of the Program Counter (PC)?
A CPU register containing the memory address of the instruction currently being executed.
What is an Application Binary Interface (ABI)?
A standard defining how software routines invoke low-level services and pass data at the binary level.
What is symbol resolution in linking?
The process of matching every symbol reference in an object file to its exact definition.
What is relocation in compilation and linking?
The process of assigning absolute load addresses to symbolic references within object code.
What is a shared library (.so or .dll)?
A library designed to be loaded by multiple programs simultaneously in memory.
What is position-independent code (PIC)?
Machine code that executes properly regardless of its absolute memory address location.
What is a thread context switch?
The process of saving and restoring the CPU registers and state for a thread.
What is a process context switch?
The swapping of CPU state and virtual memory translation tables between two processes.
What is superscalar architecture?
A CPU design capable of executing more than one instruction during a single clock cycle.
What is a control hazard in pipelining?
A pipeline delay caused by waiting for the resolution of a conditional jump or branch instruction.
What is a data hazard in pipelining?
A conflict occurring when an instruction depends on the result of a previous uncompleted instruction.
What is primary motivation for memory hierarchies in computer systems?
To bridge the speed gap between fast CPU registers and slow main memory.
What is temporal locality?
The principle that if a memory location is accessed, it is likely to be accessed again soon.
What is spatial locality?
The principle that memory locations with nearby addresses tend to be accessed close together in time.
What is a compulsory cache miss?
A miss that occurs on the first reference to a memory block when it is not yet in the cache.
What is a capacity cache miss?
A miss that occurs because the cache cannot contain all blocks needed during execution.
What is a conflict cache miss?
A miss that occurs in set-associative or direct-mapped caches when multiple blocks compete for the same cache set.
What is a coherence miss?
A miss caused by invalidation traffic due to multi-core cache coherence protocols.
What is direct-mapped cache organization?
An organization where each memory block maps to exactly one specific cache line.
What is fully associative cache organization?
An organization where any memory block can be placed into any available cache line.
What is set-associative cache organization?
An organization where a memory block maps to a specific set containing multiple cache lines.
What is a write-through cache policy?
A policy where write operations update both the cache and the underlying memory simultaneously.
What is a write-back cache policy?
A policy where writes modify only the cache line, and memory is updated later upon eviction.
What is write-allocate cache allocation?
A policy where a cache miss on a write operation brings the block into the cache.
What is no-write-allocate cache allocation?
A policy where a cache miss on a write updates main memory directly without loading the block.
What does MESI stand for in cache coherence?
Modified, Exclusive, Shared, and Invalid.
What does the Modified state mean in MESI?
The cache line is present only in the current cache and is dirty compared to main memory.