(Stage 17) Memory Manager Module - Release Page function

46 views
Skip to first unread message

Adhyuth Narayan

unread,
Sep 21, 2024, 8:19:39 AM9/21/24
to XOS Users
In the Release Page function, after releasing the page, the STATUS of all process with WAIT_MEM is set to READY. I don't understand why this is done without checking if MEM_FREE_COUNT != 0. My understanding of a process with  the state WAIT_MEM is that there  are no free pages (MEM_FREE_COUNT == 0).

Murali Krishnan

unread,
Sep 22, 2024, 8:32:00 AM9/22/24
to xos-...@googlegroups.com
I think the current design unblocks all processes waiting for memory when release page is called.
If no page is actually released, the process attempting to acquire page will block again. 
In principle, it looks safe to add a check whether memory is actually free before unlocking processes waiting for memory.
Generally one should be wary of deadlock while making design changes, but this case appears okey. 
However I don't expect the present scheme, though not the best, to have any errors. 





On Sat, Sep 21, 2024 at 5:49 PM Adhyuth Narayan <adhyuthn...@gmail.com> wrote:
In the Release Page function, after releasing the page, the STATUS of all process with WAIT_MEM is set to READY. I don't understand why this is done without checking if MEM_FREE_COUNT != 0. My understanding of a process with  the state WAIT_MEM is that there  are no free pages (MEM_FREE_COUNT == 0).

--
You received this message because you are subscribed to the Google Groups "XOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xos-users+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/xos-users/76f7cd7d-e4e2-4743-ba04-daf7382ea1e8n%40googlegroups.com.

Adhyuth Narayan

unread,
Sep 22, 2024, 12:13:48 PM9/22/24
to XOS Users
Okay Sir. Thanks for Replying
Reply all
Reply to author
Forward
0 new messages