def load_pages(self, listOfPages, nbrPages): listPageFrameVector = MemoryA.get_mem(self.mypid, nbrPages) for i in range(0, len(listOfPages)): pageFrameIndex, vectora = listPageFrameVector[ i] # vectora is a pointer to memory self.set_page_table(listOfPages[i], pageFrameIndex, vectora)
import numpy as np import sys # sys.path.append('/Users/quentincurteman/Google Drive File Stream/My Drive/William Jessup/Fall 2018/Operating Systems/CS355') from memory.memmgmt import MemoryManagementA from memory.memmgr import MemoryA from process.processx import Process pp = Process(4) print('***** before loading *****') pp.print_mgmt() MemoryA.print_mem() MemoryManagementA.print_management() print('**************************') alist = [0, 1] pp.load_pages(alist, 2) print('***** after loading *****') pp.print_mgmt() MemoryA.print_mem() MemoryManagementA.print_management() print('**************************')
def printAll(astring, process): print(" ********* start: ", astring, '*********') process.print_mgmt() MemoryA.print_mem() MemoryManagementA.print_management() print(" *********** end: ", astring, '***********\n')