Qs: Memory
Which type of memory is generally preferred for storing temporary data in a program, such as local variables within a function?
Stack
Garbage collection and memory leaks
Memory leaks can still occur even in garbage-collected languages.
Circular references can prevent garbage collectors from reclaiming memory.
Garbage collection does NOT:
automatically free memory
operate in real-time by immediately reclaiming memory when no longer referenced
How many bits in 1 byte?
8 bits
In the memory hierarchy, which type of memory typically has the fastest access time?
Fastest to slowest:
CPU Cache (L1, L2, L3) - the fastest and most expensive memory type.
RAM - RAM is faster than SSDs, and SSDs are significantly faster than traditional HDDs.
SSD - SSDs are significantly faster than traditional HDDs.
HDD - Traditional HDDs are the slowest.
Steps a CPU follows to interpret code in a CPU Cycle?
Fetch Decode Execute
Last updated