[LITMUS^RT] Question about spin-based FMLP
Björn Brandenburg
bbb at mpi-sws.org
Wed May 30 10:06:49 CEST 2018
Dear Shabnam,
the FMLP for short resources is (intentionally) very simple: just non-preemptive sections + FIFO spin locks. The API for non-preemptive sections in LITMUS^RT is enter_np()/exit_np().
https://github.com/LITMUS-RT/liblitmus/blob/a430c7b5cacae4219a185decb863f6fb9e5cbcb9/include/litmus.h#L294-L301
You can combine that API with any FIFO spin lock implementation you like. There are many suitable open-source implementations out there. For instance, some people are happy with Concurrency Kit (http://concurrencykit.org). Since other people already put in the effort into maintaining portable spin lock libraries, we don’t duplicate that effort in LITMUS^RT.
rtspin is primarily a testing tool, not a benchmarking tool. It exercises indeed the semaphore API (i.e., the long FMLP). Feel free to send a patch if you’d like to add the short FMLP to rtspin.
Regards,
Björn
PS: Please subscribe to the list before posting.
> On 29. May 2018, at 14:18, Shabnam Tabatabaian <shabnam.tabatabaian at tu-dortmund.de> wrote:
>
> Hi friends
>
> Does anyone know, how I can run rtspin task using "spin"-based FMLP
> locking Protocol?
>
> Infact, when I run these commands in litmus-rt,:
> ./rtspin -p 0 -X FMLP -L 2 -w 5 10 5 &
> ./rtspin -p 0 -X FMLP -w 2 11 5 &
> ./rtspin -p 1 -X FMLP -L 3 -w 6 12 5 &
> ./release_ts
> it acts like a suspension-based locking protocol, while I need spin-based
> version of FMLP.
> As I read in the Björn Brandenburg's paper "Real-Time Synchronization on
> Multiprocessors: To Block or Not to Block, to Suspend or Spin?", they used
> already the spin-based FMLP practically in litmus-rt for their testing, so
> it means that it is possible to use spin-based FMLP, but unfortunatly I
> couldn't find out how!!!!!
>
> I will be appreciated, if someone can help me about this issue.
>
> Many thanks in advance,
> Shabnam Tabatabaian
>
>
> _______________________________________________
> litmus-dev mailing list
> litmus-dev at lists.litmus-rt.org
> https://lists.litmus-rt.org/listinfo/litmus-dev
More information about the litmus-dev
mailing list