my_get_physical_addresses(unsigned int * initial, int len_vir, unsigned int * result,
int len_phy)
so that a process can use it to get the physical addresses of some virtual addresses.
i of this array stores the
physical address of the virtual address stored as element i in the array pointed by the first argument.
//prototype of the new system call is as follows:
int my_get_physical_addresses(unsigned int * initial, int len_vir, unsigned int * result, int len_phy)
__thread. The memory areas
include code segments, data segments, BSS segments, heap segments, libraries, stack segments, and thread local storages. You need to draw a figure
as follows to show your results.
copy_from_user() and function
copy_to_user() to copy data from/to a user address buffer.
my_get_physical_addresses(unsigned int * initial, int len_vir, unsigned int * result, int len_phy)
to check how memory areas are shared by two processes that execute this program simultaneously.
sleep() to guarantee this requirement.
copy_from_user() and function
copy_to_user() to copy data from/to a user address buffer.