sp26-cs544 flashcardsreviewmemorycs544
Deck 03: Memory Deck 03: Memory
Content locked
The catalog is public. Reading this content requires approved access.
Sign in to readDeck 03: Memory
Q1. Before a CPU can add two values in RAM, what must it do?
Q2. Which CPU cache level is fastest, of L1, L2, L3?
Q3. Which CPU cache level is biggest, of L1, L2, L3?
Q4. When data in a cache is too old and no longer valid, we say it is _______
Q5. What does FIFO stand for?
Q6. What does LRU stand for?
Q7. How are FIFO and LRU similar? How are they different?
Q8. What do you call it when you find an item in a cache?
Q9. What do you call it when you CANNOT find an item in a cache?
Q10. What is a pattern where a random eviction policy would beat LRU and FIFO?
Q11. What is the name for a piece of data loaded to CPU cache?
Q12. What is the most common cache line size for modern CPUs?
Q13. If you want to sum over column in a numpy matrix in a cache friendly way, how should you create the array?
Q14. How does PyArrow indicate which strings/ints/etc are null/None in an array?
Q15. How can you add a region to your virtual address space that is not backed by a file?
Q16. How can you map a file into your virtual address space?
Q17. If you want to be able to evict pages in anonymously mmap’d regions, what do you need to do?
Q18. What is a “race condition”?
Q19. What is “deadlock”?
Q20. How can a thread (a) get a lock and (b) let go of it?
Q21. How can you rewrite the following code so that the release will happen, even if an exception occurs?
code with possible exception
Q22. What do you call a section of code where certain interleavings with other code would be a problem?
Q23. What is “atomicity” in the context of multi-threaded programs?
Q24. What is an “invariant”?
Q25. What is “consistency” in the context of threading?
Q26. If thread t1 holds a lock, what could happen?
Q27. What happens in Python when you try to release a lock that has already been released?
Q28. What is the GIL?
Q29. There is one virtual address space per _______
Q30. A process is a running ______
Q31. Virtual memory maps to ______
Q32. Which address space can contain “holes” (invalid addresses)
Q33. What are three things that go in a virtual address space?
Q34. Which pointer indicates what code to execute next?
Q35. There is one stack per _____ and one heap per ______
Q36. What is it called when the scheduler stops running one thread and starts running a different one?
Q37. What are three states a thread can be in?
Q38. What are some reasons a thread might be blocked?
Q39. How do you create and launch a thread object for running function f(x)?
Q40. How do you wait for a thread t to finish running?
Q41. How can you print a thread’s ID?
Q42. What is a “race condition”
Q43. When might a context switch occur?