Discussion:
Some questions about A3
(too old to reply)
Sungyoul Kim
2011-07-21 07:19:14 UTC
Permalink
Hello,

I just have a few questions.


1. We do not change runprogram nor execv, right?
So, all our changes should work without changing the two. (They
still call load_elf)


2. By calling VMSTAT's print function, it looks somewhat different from
what is described in the assignment description. Would it be just fine
to call that function?

Prints as:
VMSTATS:
VMSTAT TLB Faults = x
VMSTAT TLB Faults with Free = x
VMSTAT TLB Faults with Replace = x
VMSTAT TLB Invalidations = x
VMSTAT TLB Reloads = x
VMSTAT Page Faults (Zeroed) = x
VMSTAT Page Faults (Disk) = x
VMSTAT TLB Faults with Free + TLB Faults with Replace = x
VMSTAT TLB Reloads + Page Faults (Zeroed) + Page Faults (Disk) = x


3. In the assignment description, it says "In order to do this, your
kernel will need to have some means of keeping track of which parts of
physical memory are in use, and which parts can be allocated to hold
newly-loaded virtual pages."

Why do we need this? For what purpose do we need to keep track of which
parts of physical memory are in use?

We can get fresh pages by calling getppages function.



Thank you,

Sungyoul Kim
cs350
2011-07-21 20:37:17 UTC
Permalink
1. You don't have to change runprogram. You probably don't have to change
execv, except for small things like keeping track of the vnode associated
with the ELF file. Also, execv calls some as_ functions like as_activate,
so what you do in those functions may affect the execv implementation.

2. It is possible that the format of the printed out lines has changed
slightly.

3. The assignment was simplified this term, so you should be able to avoid
implementing a coremap. Essentially, what the assignment suggests is that
you should make an array that keeps track of which physical frames are
currently in use and allocate new frames based on that array. It helps
with troubleshooting, but is not strictly necessary unless your kernel
supports freeing of the pages as well.

-Alex
Post by Sungyoul Kim
Hello,
I just have a few questions.
1. We do not change runprogram nor execv, right?
So, all our changes should work without changing the two. (They still call
load_elf)
2. By calling VMSTAT's print function, it looks somewhat different from what
is described in the assignment description. Would it be just fine to call
that function?
VMSTAT TLB Faults = x
VMSTAT TLB Faults with Free = x
VMSTAT TLB Faults with Replace = x
VMSTAT TLB Invalidations = x
VMSTAT TLB Reloads = x
VMSTAT Page Faults (Zeroed) = x
VMSTAT Page Faults (Disk) = x
VMSTAT TLB Faults with Free + TLB Faults with Replace = x
VMSTAT TLB Reloads + Page Faults (Zeroed) + Page Faults (Disk) = x
3. In the assignment description, it says "In order to do this, your kernel
will need to have some means of keeping track of which parts of physical
memory are in use, and which parts can be allocated to hold newly-loaded
virtual pages."
Why do we need this? For what purpose do we need to keep track of which parts
of physical memory are in use?
We can get fresh pages by calling getppages function.
Thank you,
Sungyoul Kim
Sungyoul Kim
2011-07-22 02:15:27 UTC
Permalink
Thank you for your answer.

Just to clarify,

1. clear

2. So, do you mean that what I wrote here is valid for submission?

3. So, you mean that if you kernel does not support the optional part,
you do not need to have a coremap (physical mem usage), right?



Thank you!

Sungyoul
Post by cs350
1. You don't have to change runprogram. You probably don't have to
change execv, except for small things like keeping track of the vnode
associated with the ELF file. Also, execv calls some as_ functions like
as_activate, so what you do in those functions may affect the execv
implementation.
2. It is possible that the format of the printed out lines has changed
slightly.
3. The assignment was simplified this term, so you should be able to
avoid implementing a coremap. Essentially, what the assignment suggests
is that you should make an array that keeps track of which physical
frames are currently in use and allocate new frames based on that array.
It helps with troubleshooting, but is not strictly necessary unless your
kernel supports freeing of the pages as well.
-Alex
Post by Sungyoul Kim
Hello,
I just have a few questions.
1. We do not change runprogram nor execv, right?
So, all our changes should work without changing the two. (They still
call load_elf)
2. By calling VMSTAT's print function, it looks somewhat different
from what is described in the assignment description. Would it be just
fine to call that function?
VMSTAT TLB Faults = x
VMSTAT TLB Faults with Free = x
VMSTAT TLB Faults with Replace = x
VMSTAT TLB Invalidations = x
VMSTAT TLB Reloads = x
VMSTAT Page Faults (Zeroed) = x
VMSTAT Page Faults (Disk) = x
VMSTAT TLB Faults with Free + TLB Faults with Replace = x
VMSTAT TLB Reloads + Page Faults (Zeroed) + Page Faults (Disk) = x
3. In the assignment description, it says "In order to do this, your
kernel will need to have some means of keeping track of which parts of
physical memory are in use, and which parts can be allocated to hold
newly-loaded virtual pages."
Why do we need this? For what purpose do we need to keep track of
which parts of physical memory are in use?
We can get fresh pages by calling getppages function.
Thank you,
Sungyoul Kim
cs350
2011-07-22 06:46:25 UTC
Permalink
2. If you got your vm statistics code from the right location, you have
nothing to worry about. The format might be slightly different from what
is printed in the assignment, because the statistics code was updated one
or two terms ago.

3. That is correct. The bonus design questions are about the coremap, but
the regular questions do not involve it.

-Alex
Post by Sungyoul Kim
Thank you for your answer.
Just to clarify,
1. clear
2. So, do you mean that what I wrote here is valid for submission?
3. So, you mean that if you kernel does not support the optional part, you do
not need to have a coremap (physical mem usage), right?
Thank you!
Sungyoul
Post by cs350
1. You don't have to change runprogram. You probably don't have to
change execv, except for small things like keeping track of the vnode
associated with the ELF file. Also, execv calls some as_ functions like
as_activate, so what you do in those functions may affect the execv
implementation.
2. It is possible that the format of the printed out lines has changed
slightly.
3. The assignment was simplified this term, so you should be able to
avoid implementing a coremap. Essentially, what the assignment suggests
is that you should make an array that keeps track of which physical
frames are currently in use and allocate new frames based on that array.
It helps with troubleshooting, but is not strictly necessary unless your
kernel supports freeing of the pages as well.
-Alex
Post by Sungyoul Kim
Hello,
I just have a few questions.
1. We do not change runprogram nor execv, right?
So, all our changes should work without changing the two. (They still
call load_elf)
2. By calling VMSTAT's print function, it looks somewhat different
from what is described in the assignment description. Would it be just
fine to call that function?
VMSTAT TLB Faults = x
VMSTAT TLB Faults with Free = x
VMSTAT TLB Faults with Replace = x
VMSTAT TLB Invalidations = x
VMSTAT TLB Reloads = x
VMSTAT Page Faults (Zeroed) = x
VMSTAT Page Faults (Disk) = x
VMSTAT TLB Faults with Free + TLB Faults with Replace = x
VMSTAT TLB Reloads + Page Faults (Zeroed) + Page Faults (Disk) = x
3. In the assignment description, it says "In order to do this, your
kernel will need to have some means of keeping track of which parts of
physical memory are in use, and which parts can be allocated to hold
newly-loaded virtual pages."
Why do we need this? For what purpose do we need to keep track of
which parts of physical memory are in use?
We can get fresh pages by calling getppages function.
Thank you,
Sungyoul Kim
Loading...