Question 1
EasyWhich address does the CPU generate when a program runs?
- A.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Operating Systems
Which address does the CPU generate when a program runs?
A port number
A physical address
A disk address
A logical (virtual) address
Answer: D
The CPU works with logical addresses; the memory-management unit (MMU) translates them to physical addresses.
What is external fragmentation?
Unused space inside an allocated block
Memory used by the OS
Memory that is corrupted
Free memory split into many small non-adjacent holes
Answer: D
There may be enough free memory in total, but no single hole is big enough for a request.
What is internal fragmentation?
Free memory scattered between processes
Memory lost after a crash
Memory shared by two processes
Unused space inside an allocated block that is larger than requested
Answer: D
With fixed-size blocks or partitions, the leftover part of the last block is wasted inside the allocation.
What problem does compaction solve?
External fragmentation
Deadlock
Internal fragmentation
Thrashing
Answer: A
Compaction moves processes together so the scattered free holes merge into one large block.
How does the first-fit strategy allocate memory?
It uses the smallest hole that is large enough
It uses the first free hole that is large enough
It uses a random hole
It uses the largest hole
Answer: B
First fit scans the free list from the start and stops at the first hole that fits.
How does the best-fit strategy allocate memory?
It always uses the hole nearest the OS
It uses the largest hole
It uses the smallest free hole that is large enough
It uses the first hole that fits
Answer: C
Best fit searches all holes and leaves the smallest possible leftover.
What is swapping?
Exchanging two variables
Temporarily moving a process from memory to disk and back
Switching between two threads
Replacing the OS kernel
Answer: B
Swapping frees memory for other processes by writing a whole process out to a backing store.
What is main memory (RAM) used for?
Printing documents
Connecting to the network
Storing files permanently when the power is off
Holding the programs and data that are currently in use
Answer: D
The CPU can access RAM directly, so running programs and their data are kept there.
What is a physical address?
An address typed by the user
The actual location in main memory seen by the memory hardware
The website address of the OS
The address printed on the computer
Answer: B
Logical addresses generated by programs are translated into physical addresses.
What is the memory management unit (MMU)?
The OS's file manager
A program that deletes memory
Hardware that translates logical addresses into physical addresses
A type of RAM chip
Answer: C
The MMU performs address translation on every memory access.