What is the only general-purpose storage device that the CPU can access directly?
Main memory is the only general-purpose storage device that the CPU can access directly.
Where are programs usually stored before being loaded into memory?
Programs are usually stored on hard drives.
Why must programs be loaded into memory to be executed?
The CPU cannot access hard drives directly, so programs need to be loaded into memory to be executed.
What memory must be protected from access by user processes for correct execution?
The memory allocated to the operating system should not be accessed by user processes.
What principle must be upheld regarding the memory spaces of different user processes?
The memory allocated to one user process should not be accessed by another user process.
What is one possible solution to prevent processes from accessing each other’s memory?
One possible solution is to ensure that each process has a separate memory space.
What two hardware registers can be used to separate the memory space of processes?
We can provide this protection using two registers, usually a base register and a limit register.
What value does the ‘base register’ hold in memory management?
The base register holds the smallest legal physical memory address for a process.
What does the ‘limit register’ specify in memory management?
The limit register specifies the size of the legal memory range for a process.
In the example where the base register is 300040 and the limit register is 120900, what is the range of legally accessible addresses?
The process can legally access all addresses from 300040 through 420939 (inclusive).
What entity is exclusively permitted to modify the contents of the base and limit registers?
Only the OS can modify the content of these two registers in kernel mode.
How is memory space protection accomplished using base and limit registers?
The CPU hardware compares every address generated in user mode with the values in these registers.
What happens when a process in user mode attempts to access operating-system memory or another user’s memory?
The attempt results in a trap to the operating system, which treats it as an error.
What is a ‘logical address’ also known as?
A logical address is also known as a virtual address.
What is the term for the memory space corresponding to logical addresses?
The corresponding memory space is called logical memory space (or virtual memory space).
What kind of addresses does a user program exclusively use?
A user program only uses logical addresses.
What is the term for the real address for each storage unit in main memory?
A physical address is the real address for each storage unit in main memory.
Before data in main memory can be accessed, what must happen to logical addresses?
The logical addresses must be mapped to physical addresses.
What type of register, equivalent to a base register, is used to map logical to physical addresses?
A relocation register is used to accomplish the mapping from logical to physical addresses.
How is a logical address mapped to a physical address using a relocation register?
The value in the relocation register is added to every logical address used by a user process.
If the relocation register has a value of 14000, to what physical address is the logical address 346 mapped?
The logical address 346 is mapped to the physical address 14346.
What two entities must the main memory accommodate simultaneously?
The main memory must accommodate both the operating system and various user processes.
In contiguous memory allocation, memory is usually divided into how many partitions?
The memory is usually divided into two partitions: one for the operating system and one for user processes.
Where do many operating systems, like Linux and Windows, place the OS in memory?
Many operating systems place the operating system in the high memory address section.