Skip to content

Latest commit

 

History

History
 
 

P3

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
DESCRIPTION ABOUT P1
Author: Yuting Liu
Jan, 28, 2016

-------------------------------------------------
In this project, we implemented Shared Pages

1. While booting, run shmem_init() to initialize shared memory. Here, we use two arrays, where one is to store the physical address for each page, the other is to store how many processes currently have access to the given shared page.

2. In the process, we add two more fields: an array to store which shared page refers to which virtual address, an integer to store how many shared pages this process has access to. When fork happens, the child process would also inherit the shared memory from its parent, and also increase the shmem counter. When a process exits, its parent will find the ZOMBIE process, and reinitialize the two fields of the process, and decrease the shmem counter. Note here the deallocuvm() will stop before the shared memory to make sure the shared memory is not freed.