Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PUBLIC
- deallocate(pcb)
- PCB *pcb;
- {
- // Free all pages associated to the pcb.
- int i;
- for(i = 0; i<MAX_PAGE; i++){
- if ( pcb->page_tbl->page_entry[i].valid == TRUE)
- {
- Frame_Tbl[ pcb->page_tbl->page_entry[i].frame_id ].dirty = FALSE;
- Frame_Tbl[ pcb->page_tbl->page_entry[i].frame_id ].free = TRUE;
- Frame_Tbl[ pcb->page_tbl->page_entry[i].frame_id ].pcb = NULL;
- Frame_Tbl[ pcb->page_tbl->page_entry[i].frame_id ].page_id = -1;
- }
- pcb->page_tbl->page_entry[i].valid = FALSE;
- }
- }
Add Comment
Please, Sign In to add comment