Professional Documents
Culture Documents
Felician-Nicu
blocks Herman
Standard view
We will not be running tests today and we simply want to boot HAL9000, before starting work make sure you run the RemoveAllTests project.
Site home
Then after each time you build HAL9000, start manually the VM from VMWare workstation. Site pages
You should use the HAL9000.sln VS solution now (instead of HAL9000_WithoutApplications.sln). You should also change the con guration to "Virtual Memory" instead of "Threads" or "Userprog".
My courses
NOTE: Before starting the problems you should already have the rst 7 points implemented from laboratory 6.
PRC/CND (2021/2022 - E. Cebuc)
Swapping: RC/CN (2020/2021 - B. Iancu, V. Dădârlat)
LEARNING CAN / ADC (2019/2020 - B. Iancu)
BitmapInit(&m_iomuData.SwapBitmap, m_iomuData.SwapBitmapData);
-> Initialize a lock to protect to the bitmap.
-> Implement two functions in iomu.h:
// Reserves a swap slot from the swap bitmap and writes the contents of VirtualAddress to the reserved slot in the swap file.
STATUS
IomuSwapOut(
IN PVOID VirtualAddress
);
// Retrieves the contents of VirtualAddress from the swap file and releases the appropriate swap slot reservation.
STATUS
IomuSwapIn(
OUT PVOID VirtualAddress
);
HINTS:
Have a look at PmmReserveMemoryEx() and PmmReleaseMemory() to see examples of how to work with a bitmap
Maintain a per-process list of virtual addresses to swap slots mappings to be able to determine which swap slot you need to read back in IomuSwapIn().
-> Modify VmmSolvePageFault() to treat the case in which the page causing the #PF is located in the swap area. NOTE: as a hackish implementation you could directly call IomuSwapIn() and if you
don't have the reservation you could return a non success status from the function.
2. Add a new system call: SwapOut which receives as a parameter the virtual address which to swap out on disk. Add a new user mode application or modify an existing one and issue this system
call in the following ways:
{
char b;
PBYTE pAddress;
SwapOut(pAddress);
Jump to...