ThatQuiz Test Library Take this test now
Memory management - Quiz
Contributed by: Abbott
  • 1. What is the primary function of slab allocation?
A) Managing stack pointers for dynamic local variables
B) Preallocating memory chunks for specific object types or sizes
C) Automatically garbage collecting unused heap objects
D) Allocating memory exclusively for static global variables
  • 2. What is a cache in the context of slab allocation?
A) A POSIX standard memory routine
B) A temporary stack pointer adjustment
C) A garbage collection pool
D) A preallocated chunk of memory
  • 3. What happens when an object is destructed in slab allocation?
A) The memory fragment is compressed
B) The slot is added back to the free list
C) The stack pointer is decremented
D) The memory is immediately returned to the OS
  • 4. Why is slab allocation considered efficient?
A) It never requires free lists
B) It uses hardware acceleration
C) It automatically ignores object types
D) It eliminates the need to search for suitable memory portions
  • 5. What benefit does slab allocation provide regarding memory?
A) It increases the depth of recursion
B) It ensures memory is never overwritten
C) It alleviates memory fragmentation
D) It prevents all types of stack overflows
  • 6. What is the purpose of alloca?
A) Dynamic stack memory allocation
B) Compacting memory fragments
C) Managing static heap memory
D) Automatic garbage collection
  • 7. What mechanism typically implements alloca?
A) A complex garbage collection routine
B) A heap-based allocation library
C) Inlined instructions manipulating the stack pointer
D) A standard system call managed by the OS kernel
  • 8. When is memory allocated via alloca automatically freed?
A) When the calling function returns
B) When the manual free function is called
C) When the garbage collector runs
D) When the program reaches the heap limit
  • 9. What is a major risk associated with using alloca?
A) Memory leakage in the garbage collector
B) Heap fragmentation
C) Excessive cache misses
D) Stack overflow
  • 10. Is alloca defined in the C standard?
A) Only in Windows-specific headers
B) No
C) Yes
D) Only in POSIX standards
  • 11. What is the safer version of alloca used on Microsoft Windows?
A) stack_malloc
B) mem_guard
C) _malloca
D) alloca_safe
  • 12. What function must be used to free memory allocated by _malloca?
A) free_stack
B) release_mem
C) _free_alloca
D) _freea
  • 13. How does gnulib handle an overlarge size in its alloca equivalent?
A) It ignores the allocation request
B) It delegates to malloc
C) It crashes the application immediately
D) It throws an SEH exception
  • 14. What is an automatic variable?
A) A variable stored in the global data segment
B) A heap-allocated object handled by garbage collection
C) A non-static local variable of a subroutine
D) A variable managed by manual memory allocation
  • 15. Where is memory for automatic variables typically allocated?
A) The register file
B) The call stack
C) The static data segment
D) The heap
  • 16. What makes recursion possible according to the text?
A) The automatic allocation of local variables
B) The slab allocation mechanism
C) Garbage collection algorithms
D) Manual memory management
  • 17. What is a disadvantage of garbage collection?
A) It prevents programmers from using recursion
B) It creates stack overflows
C) It requires manual allocation calls
D) It can compete with the application for processor time
  • 18. What is the primary goal of garbage collection?
A) Managing stack pointer arithmetic
B) Preallocating chunks for specific object sizes
C) Detecting and reclaiming unusable objects
D) Allocating memory for local subroutine variables
  • 19. How does manual memory management differ from garbage collection?
A) It automatically detects unusable memory
B) It uses a stack pointer for all operations
C) It requires the programmer to explicitly release memory
D) It is not used in any modern programming language
  • 20. What does the text suggest about the difficulty of memory management?
A) It is no longer a relevant concern for software developers
B) It is only a problem for assembly programmers
C) It is a difficult problem
D) It is easily solved by hardware
  • 21. Why is memory management critical in multitasking systems?
A) Multiple processes run simultaneously
B) It reduces the need for storage
C) It prevents hardware crashes
D) It speeds up network communication
  • 22. In which type of operating system is memory managed by the OS?
A) Android
B) Linux
C) Unix-like systems
D) Burroughs/Unisys MCP
  • 23. What is used to manage the inflation of small allocations caused by metadata?
A) Paging
B) Chunking
C) Swapping
D) Caching
  • 24. What must a memory management system track to avoid memory leaks?
A) Outstanding allocations
B) Disk partition sizes
C) User login attempts
D) The system clock
  • 25. What was the lowest average instruction path length to allocate a memory slot found in the 1994 DEC study?
A) 52
B) 28
C) 42
D) 64
  • 26. Why is fixed-size blocks allocation often used in video games?
A) Reduced overhead improves performance
B) It handles large objects efficiently
C) It eliminates all fragmentation
D) It uses less total system memory
  • 27. What types of systems are fixed-size blocks allocation best suited for?
A) Simple embedded systems
B) Massive supercomputer clusters
C) Virtual machine environments
D) General purpose operating systems
  • 28. When a block is freed in the buddy system, what is it compared to?
A) The kernel instruction path
B) The total system pool
C) A list of all free pointers
D) Its buddy
  • 29. What occurs if two buddy blocks are both free?
A) They are deleted from memory
B) They are moved to a fixed-size list
C) They are split into smaller units
D) They are combined
  • 30. How does the buddy allocator select the starting block size for a request?
A) A random block
B) Largest available block
C) The first block in the free list
D) Smallest sufficiently large block
  • 31. How can circular references in reference counting be mitigated?
A) By increasing the counter manually
B) By disabling the pointer check
C) By using only primary storage
D) By using weak references
  • 32. What does virtual memory decouple memory organization from?
A) The application's logic
B) The physical hardware
C) The operating system kernel
D) The CPU registers
  • 33. Who or what can implement reference counting automatically?
A) The secondary storage controller
B) The physical hardware
C) The compiler
D) The user
  • 34. What is a weak reference?
A) A reference that always points to null
B) A reference that is only used in primary storage
C) A reference that does not participate in reference counting
D) A reference that cannot be translated to a physical address
  • 35. What does virtual memory use to extend physical memory?
A) Cache memory
B) The memory management unit
C) Additional CPU registers
D) Extra space on a peripheral device
  • 36. What is the process of moving code and data between main and virtual memory called?
A) Paging
B) Overlaying
C) Swapping
D) Segmentation
  • 37. The B5000 system integrated virtual memory starting in what year?
A) 1955
B) 1971
C) 1951
D) 1961
  • 38. What represents the physical portions of memory where logical blocks are mapped?
A) Pages
B) Sectors
C) Clusters
D) Segments
  • 39. What contains the metadata about an allocated memory block?
A) Segment descriptor
B) Memory map
C) The MCP kernel
D) The overlay register
  • 40. Who describes a system similar to the MCP memory management in 'Fundamental Algorithms'?
A) Ada Lovelace
B) Charles Babbage
C) Donald Knuth
D) Alan Turing
  • 41. What is the usual medium used for virtual memory extension?
A) RAM
B) Tape
C) Flash
D) Disk
  • 42. Which macro is used to request storage in OS/360?
A) GETMEM
B) FREEMAIN
C) GETMAIN
D) ALLOCATE
  • 43. What is the size increment for subpools in MVT?
A) 8 KB
B) 4 KB
C) 2 KB
D) 1 KB
  • 44. What is the range of subpool numbers in OS/360 MVT?
A) 250–255
B) 0–15
C) 1–127
D) 0–255
  • 45. Which subpools receive the job's storage protection key?
A) 0–255
B) 250–255
C) 0–127
D) 128–255
  • 46. Which memory management system type has only a single partition?
A) MFT
B) PCP
C) MVT
D) OS/VS2
  • 47. What is the page size in OS/VS2?
A) 1 KiB
B) 4 KiB
C) 2 KB
D) 8 KiB
  • 48. Which storage area is nonpageable in both OS/VS1 and OS/VS2?
A) Common Storage Area (CSA)
B) Local System Queue Area (LSQA)
C) System Work area (SWA)
D) System Queue Area (SQA)
  • 49. In MVS, which storage keys are reserved for privileged code?
A) 0–3
B) 8–15
C) 0–7
D) 0–15
  • 50. What replaces dynamic regions in MFT?
A) Subpool sets
B) Virtual pages
C) Fixed partitions
D) Single partition
  • 51. Which macro is used to free storage in OS/360?
A) FREEMAIN
B) DEALLOCATE
C) RELEASE
D) GETMAIN
  • 52. What determines the upper limit of memory allocation in a job's region?
A) The number of subpools
B) The supervisor key
C) The region size
D) The page size
  • 53. What is the role of the operator in MFT memory management?
A) Setting protection keys
B) Managing virtual memory
C) Redefining partitions
D) Assigning subpools
  • 54. Which MVS area is a pageable shared area?
A) System Work area (SWA)
B) Common Storage Area (CSA)
C) Local System Queue Area (LSQA)
D) System Queue Area (SQA)
Created with That Quiz — where test making and test taking are made easy for math and other subject areas.