Page 1 of 1

[INFO] NIL 4.0 integrated in trunk

Posted: Sat Feb 02, 2019 12:03 pm
by Giovanni
Hi,

NIL 4.0 has been integrated, it is mostly complete but there is still space for changes/enhancements, feedback is welcome.

Info for the maintainers, there are the AVR demos and the demos under ./community to be updated as follow:

1) Update to the new chconf.h, this can be done automatically using the updater tool /tools/updater (done for AVR).
2) Small change in main.c, the syntax of the threads table is a bit different.

Giovanni

Re: [INFO] NIL 4.0 integrated in trunk

Posted: Sun Feb 10, 2019 6:27 pm
by Giovanni
Hi,

News, Nil gained full events and messages and grew closer to RT in terms of features. They are so close that now they share the same OSAL.

I performed some benchmarks on an F3:

Nil:

Code: Select all

============================================================================
=== Test Sequence 7 (Benchmarks)
----------------------------------------------------------------------------
--- Test Case 7.1 (Messages performance #1)
--- Score : 196707 msgs/S, 393414 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.2 (Messages performance #2)
--- Score : 153835 msgs/S, 307670 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.3 (Context Switch performance)
--- Score : 676008 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.4 (Threads performance, full cycle)
--- Score : 151888 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.5 (Threads performance, create/exit only)
--- Score : 206882 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.6 (Semaphores wait/signal performance)
--- Score : 757840 wait+signal/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.7 (RAM Footprint)
--- System: 160 bytes <- It just 16 bytes is because nil includes the thread structures inside, 160 is the total.
--- Thread: 24 bytes
--- Semaph: 4 bytes
--- EventS: 4 bytes
--- EventL: 20 bytes
--- MailB.: 32 bytes
--- Result: SUCCESS
----------------------------------------------------------------------------


RT:

Code: Select all

============================================================================
=== Test Sequence 10 (Benchmarks)
----------------------------------------------------------------------------
--- Test Case 10.1 (Messages performance #1)
--- Score : 274763 msgs/S, 549526 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.2 (Messages performance #2)
--- Score : 211732 msgs/S, 423464 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.3 (Messages performance #3)
--- Score : 211733 msgs/S, 423466 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.4 (Context Switch performance)
--- Score : 902672 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.5 (Threads performance, full cycle)
--- Score : 160688 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.6 (Threads performance, create/exit only)
--- Score : 216837 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.7 (Mass reschedule performance)
--- Score : 70029 reschedules/S, 420174 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.8 (Round-Robin voluntary reschedule)
--- Score : 545360 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.9 (Virtual Timers set/reset performance)
--- Score : 473772 timers/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.10 (Semaphores wait/signal performance)
--- Score : 1285500 wait+signal/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.11 (Mutexes lock/unlock performance)
--- Score : 654436 lock+unlock/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.12 (RAM Footprint)
--- System: 120 bytes
--- Thread: 68 bytes
--- Timer : 20 bytes
--- Semaph: 12 bytes
--- Mutex : 16 bytes
--- CondV.: 8 bytes
--- EventS: 4 bytes
--- EventL: 20 bytes
--- MailB.: 40 bytes
--- Result: SUCCESS
----------------------------------------------------------------------------


As expected: RT faster and scales better, Nil much smaller.

Giovanni

Re: [INFO] NIL 4.0 integrated in trunk

Posted: Mon Feb 11, 2019 8:43 pm
by electronic_eel
Giovanni wrote:News, Nil gained full events and messages and grew closer to RT in terms of features.

Thank you very much for completing this.

I will give it a try when I start my next NIL project.