nasa / nasa/MM

MM IntLock removed, no longer implements "write with interrupts disabled" requirement MM2003

Open
#2 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C
Stars
34
Forks
33
Avg merge
7d 17h
Merged PRs (30d)
1

Description

Historical - (note the lock/unlock have been removed, see comments):
Memory Manager uses OS_IntLock() and OS_IntUnlock(). That's the only place any of the OS_Int* functions are used in the GSFC apps. These functions will likely be deprecated in the next OSAL release.

I'm guessing it does this with the intent of loading the mem block "atomically" with the hope of preventing another task from writing to it while this happens?

IntLock/Unlock has always been a no-op on POSIX, and furthermore even on platforms where it does something, it will not achieve that exclusivity effect on Multi-Core CPUs, as it only locks the interrupts on the core which calls it, and other cores continue to run anyway, interrupt or not.

Probably worth re-evaulating what MM is trying to achieve with the intlock... might be able to simply take it out with no loss of function.

20220324 - OS_IntLoc and OS_IntUnlock were removed as part of GSFCCFS-1156. Although now requirement GSFCCFS-611 isn't being met.

Imported from GSFCCFS-1132

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the MM memory-block loading path and the history around GSFCCFS-1156, then compare the current behavior with requirement GSFCCFS-611. Done means determining how the write-with-interrupts-disabled requirement should be satisfied on multicore systems, or documenting and resolving why that requirement no longer applies.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.