[OSy] First extended assignment

Vojtech Horky horky at d3s.mff.cuni.cz
Fri Oct 27 12:43:56 CEST 2017


Hello,

after exchanging several e-mails with some of you regarding the 
explanation of some parts of the assignment I am forwarding the 
information here too.


It is not explicitly stated in the assignment but the functions 
frame_alloc() and frame_free() has to be thread-safe as they modify a 
shared data structure. They can be guarded by the same mechanism as 
current malloc is, for example.


Regarding the issue with single-continuous block of memory. The reason 
is that it would be very slow to scan the full 512M so you can stop the 
scan after reaching first unavailable frame. Yet you should pay 
attention to the fact that some parts of the memory are not available 
for use because they are occupied by devices. Therefore, if k denotes 
kernel, F denotes free (physically available memory), D denotes device 
(or loader) and - is used for missing memory, your solution should be 
able to detect free memory in the following scenarios:

kkkkFFFF----------
kkkkFFFFFDFDFF----

But you do not have to detect the last two frames (after the space) in 
the following setup:

kkkkFFFFFDFDF---FF


There was also some confusion regarding the frame_alloc() function with 
VF_VA_USER flag. The sentence "... or it merely checks whether there is 
a suitable continuous ..." refers to the fact that with VF_VA_USER the 
function does not try to find any other address (e.g. close to the 
required address). But it still marks the frames as allocated (if it is 
possible to do so).


Hope this helps.
- VH



Dne 13.10.2017 v 11:18 Vojtech Horky napsal(a):
> Dear all,
> 
> please see attached the assignment of the 1st extended semestral task of
> the Operating Systems course. This extended assignment is intended for
> those who want to solve the task independently at home in order to gain
> the "conditionally fulfilled" status for this topic.
> 
> However, please read and try to understand the text of the extended
> assignment even if you plan to attend the labs (schedule is on the web 
> and from now on respects the regular timetable). The assignment for the 
> labs will be related to the extended assignment (the topic will be 
> memory management, too) and also the required knowledge and recommended 
> literature will be the same.
> 
> If you choose to implement the extended assignment, please respect the
> deadline of October 29th 2017 AoE.
> 
> Please send your implementation via e-mail to the following address:
> 
>     nswi004 at d3s.mff.cuni.cz
> 
> You should send your implementation as an archive (zip, tar.bz2, etc.)
> in the attachment of the e-mail. Please make sure to include everything
> necessary to run your implementation, to run the required unit tests and
> to evaluate your source code. You can also use the `make dist' target 
> from the main Makefile to package your solution.
> 
> We will try to evaluate your submissions as they arrive, but we cannot
> guarantee a specific reply latency. Therefore please avoid (in your own
> interest) sending your implementation at the last moment, because we
> might not be able to point you in time to some small issues in order for
> you to fix them.
> 
> If you should have any questions (either specific to the assignment or
> of a generic nature), please do not hesitate to send your query to this
> mailing list.
> 
> 
> Best regards,
> 
> - Vojtech Horky
> 
> 
> _______________________________________________
> OSy mailing list
> OSy at d3s.mff.cuni.cz
> https://d3s.mff.cuni.cz/mailman/listinfo/osy
> 





More information about the NSWI004 mailing list