Low-Level Systems — Tier 1: Core Vocabulary and Facts

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/274

encourage image

There's no tags or description

Looks like no tags are added yet.

275 Terms

1
New cards

What is the stack in process memory?

A region of memory used for function call frames, local variables, and control flow.

2
New cards

How does the stack grow during execution?

It grows downward toward lower memory addresses.

3
New cards

What is a stack frame?

A memory block containing a function's local variables, arguments, and return address.

4
New cards

What register typically points to the top of the current stack frame?

The stack pointer (RSP on x86-64).

5
New cards

What is the base pointer used for on the stack?

To reference local variables and function arguments relative to a fixed frame location.

6
New cards

What is the heap in process memory?

A region of memory used for dynamic memory allocation with a longer than local lifetime.

7
New cards

How does the heap typically grow during execution?

It grows upward toward higher memory addresses.

8
New cards

What function allocates dynamic memory in C?

malloc()

9
New cards

What function releases previously allocated heap memory in C?

free()

10
New cards

What is internal fragmentation?

Wasted space inside an allocated memory block due to alignment or fixed block sizing.

11
New cards

What is external fragmentation?

Wasted space between allocated memory blocks that cannot satisfy large new allocation requests.

12
New cards

What system call is used to expand the heap data segment?

brk() or sbrk()

13
New cards

What is virtual addressing?

A memory management technique that translates virtual addresses used by software into physical hardware addresses.

14
New cards

What is the standard page size on x86-64 architectures?

4 Kilobytes (4 KB).

15
New cards

What is a multi-level page table?

A hierarchical table structure that maps virtual addresses to physical addresses while saving memory.

16
New cards

What is the TLB (Translation Lookaside Buffer)?

A specialized CPU cache that stores recent virtual-to-physical address translations.

17
New cards

What happens during a TLB miss?

The CPU must traverse the page table hierarchy in memory to locate the physical translation.

18
New cards

What is a page fault?

An exception raised when a process accesses a virtual address not currently mapped in physical memory.

19
New cards

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.

20
New cards

What is a major page fault?

A page fault where the requested page must be loaded from secondary storage or swap space.

21
New cards

What is the purpose of the page fault handler?

To resolve page faults by allocating frames, loading pages from disk, or terminating illegal accesses.

22
New cards

What is mmap()?

A system call that maps files or devices into a process's virtual memory address space.

23
New cards

What is anonymous memory mapping in mmap?

A mapping not backed by any file, typically used for zero-filled memory or heap allocation.

24
New cards

What does COW stand for in virtual memory management?

Copy-On-Write.

25
New cards

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.

26
New cards

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.

27
New cards

What is a segmentation fault?

A hardware exception raised when software attempts an unauthorized access to a restricted memory region.

28
New cards

What is address space layout randomization (ASLR)?

A security technique that randomly arranges the address space positions of key process data areas.

29
New cards

What is latency in computer systems?

The time delay between the initiation of a request and the receipt of its response.

30
New cards

What is throughput?

The amount of work performed or data processed within a given time interval.

31
New cards

What is the primary goal of systems benchmarking?

To measure and evaluate performance metrics under controlled, reproducible conditions.

32
New cards

What is Amdahl's Law?

A formula giving the theoretical speedup in latency of the execution of a task at fixed workload.

33
New cards

What is Little's Law in queuing theory?

A theorem that determines the long-term average number of items in a stationary queueing system.

34
New cards

What is object-oriented programming (OOP)?

A programming paradigm based on the concept of objects containing data and code.

35
New cards

What is encapsulation in OOP?

The bundling of data and the methods that operate on that data within a single unit.

36
New cards

What is inheritance in OOP?

A mechanism where a new class derives properties and behaviors from an existing class.

37
New cards

What is polymorphism?

The provision of a single interface to entities of different types or in different contexts.

38
New cards

What is dynamic dispatch?

The process of selecting which implementation of a polymorphic operation to call at runtime.

39
New cards

What is the Single Responsibility Principle (SRP)?

A class should have only one reason to change, meaning it should have only one job.

40
New cards

What is the Open-Closed Principle (OCP)?

Software entities should be open for extension, but closed for modification.

41
New cards

What is the Liskov Substitution Principle (LSP)?

Objects in a program should be replaceable with instances of their subtypes without altering correctness.

42
New cards

What is the Interface Segregation Principle (ISP)?

Many client-specific interfaces are better than one general-purpose interface.

43
New cards

What is the Dependency Inversion Principle (DIP)?

Depend upon abstractions, do not depend upon concretions.

44
New cards

What is a design pattern in software engineering?

A general reusable solution to a commonly occurring problem within a given context.

45
New cards

What is the Singleton design pattern?

A pattern that restricts the instantiation of a class to one single instance.

46
New cards

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.

47
New cards

What is the Observer design pattern?

An object maintains a list of its dependents and notifies them automatically of any state changes.

48
New cards

What is the Strategy design pattern?

A behavioral pattern that enables selecting an algorithm at runtime.

49
New cards

What is the Adapter design pattern?

A pattern that allows incompatible interfaces to work together.

50
New cards

What is Unified Modeling Language (UML)?

A general-purpose visual modeling language used to specify, construct, and document software systems.

51
New cards

What is a UML class diagram?

A structure diagram that describes the structure of a system by showing classes, attributes, operations, and relationships.

52
New cards

What is a UML sequence diagram?

An interaction diagram that shows how objects operate with one another and in what order.

53
New cards

What is practical systems design vocabulary?

Standardized terminology used to architect, describe, and scale robust software and hardware systems.

54
New cards

What is horizontal scaling?

Adding more nodes or machines to a system infrastructure to handle increased load.

55
New cards

What is vertical scaling?

Adding more resources such as CPU or RAM to a single server or node.

56
New cards

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.

57
New cards

What is the primary role of a compiler?

Translates high-level source code into low-level machine code or intermediate representation.

58
New cards

What is the function of a linker?

Combines multiple compiled object files and libraries into a single executable or shared library.

59
New cards

What does a static linker do?

Copies library code directly into the final executable binary.

60
New cards

What is dynamic linking?

Resolves external library references at load time or runtime rather than compile time.

61
New cards

What is an object file?

A file containing machine code and metadata produced by a compiler from source code.

62
New cards

What is the function of the GNU Assembler (GAS)?

Translates assembly language source code into machine-readable binary object code.

63
New cards

What is a CPU core?

An independent processing unit within a CPU capable of executing its own instruction stream.

64
New cards

What is a hardware thread?

The execution context maintained by a CPU core, including instruction pointers and registers.

65
New cards

What is a software process?

An independent operating system execution unit with its own isolated address space.

66
New cards

What is Simultaneous Multi-Threading (SMT)?

Hardware technology allowing multiple instruction threads to execute concurrently on a single physical core.

67
New cards

What is a CPU instruction pipeline?

A hardware architecture technique that overlaps the execution of multiple instructions in sequential stages.

68
New cards

What is a pipeline hazard?

A structural, data, or control conflict that prevents the next instruction from executing in the pipeline.

69
New cards

What is a branch predictor?

A digital circuit that guesses the outcome of a conditional branch before it is computed.

70
New cards

What is speculative execution?

An optimization technique where a CPU executes instructions before knowing if they are actually required.

71
New cards

What is instruction-level parallelism (ILP)?

A measure of how many instructions in a computer program can be executed simultaneously.

72
New cards

What is out-of-order execution?

A paradigm where a CPU executes instructions in an order dictated by data availability rather than source order.

73
New cards

What is register renaming?

A technique used to avoid false data dependencies by mapping architectural registers to physical registers.

74
New cards

What is the role of the Program Counter (PC)?

A CPU register containing the memory address of the instruction currently being executed.

75
New cards

What is an Application Binary Interface (ABI)?

A standard defining how software routines invoke low-level services and pass data at the binary level.

76
New cards

What is symbol resolution in linking?

The process of matching every symbol reference in an object file to its exact definition.

77
New cards

What is relocation in compilation and linking?

The process of assigning absolute load addresses to symbolic references within object code.

78
New cards

What is a shared library (.so or .dll)?

A library designed to be loaded by multiple programs simultaneously in memory.

79
New cards

What is position-independent code (PIC)?

Machine code that executes properly regardless of its absolute memory address location.

80
New cards

What is a thread context switch?

The process of saving and restoring the CPU registers and state for a thread.

81
New cards

What is a process context switch?

The swapping of CPU state and virtual memory translation tables between two processes.

82
New cards

What is superscalar architecture?

A CPU design capable of executing more than one instruction during a single clock cycle.

83
New cards

What is a control hazard in pipelining?

A pipeline delay caused by waiting for the resolution of a conditional jump or branch instruction.

84
New cards

What is a data hazard in pipelining?

A conflict occurring when an instruction depends on the result of a previous uncompleted instruction.

85
New cards

What is primary motivation for memory hierarchies in computer systems?

To bridge the speed gap between fast CPU registers and slow main memory.

86
New cards

What is temporal locality?

The principle that if a memory location is accessed, it is likely to be accessed again soon.

87
New cards

What is spatial locality?

The principle that memory locations with nearby addresses tend to be accessed close together in time.

88
New cards

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.

89
New cards

What is a capacity cache miss?

A miss that occurs because the cache cannot contain all blocks needed during execution.

90
New cards

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.

91
New cards

What is a coherence miss?

A miss caused by invalidation traffic due to multi-core cache coherence protocols.

92
New cards

What is direct-mapped cache organization?

An organization where each memory block maps to exactly one specific cache line.

93
New cards

What is fully associative cache organization?

An organization where any memory block can be placed into any available cache line.

94
New cards

What is set-associative cache organization?

An organization where a memory block maps to a specific set containing multiple cache lines.

95
New cards

What is a write-through cache policy?

A policy where write operations update both the cache and the underlying memory simultaneously.

96
New cards

What is a write-back cache policy?

A policy where writes modify only the cache line, and memory is updated later upon eviction.

97
New cards

What is write-allocate cache allocation?

A policy where a cache miss on a write operation brings the block into the cache.

98
New cards

What is no-write-allocate cache allocation?

A policy where a cache miss on a write updates main memory directly without loading the block.

99
New cards

What does MESI stand for in cache coherence?

Modified, Exclusive, Shared, and Invalid.

100
New cards

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.