Re: deadlock from spinlock waiting..

2015-08-22 Thread Saurabh Gadia
(); _ISR_Disable( level ); } So while waiting it gives up the processor periodically if lock is not available. Hope this helps. Thanks, Saurabh Gadia On Fri, Aug 21, 2015 at 11:18 PM, Chan Kim c...@etri.re.kr wrote: Hello, This is a very basic question and I guess something's

Re: Uniprocessor implementation of nested mutex problem of priority inversion.

2015-08-16 Thread Saurabh Gadia
don't need to change any design for this nor need to do any bookkeeping thing. Thanks, Saurabh Gadia On Sun, Aug 16, 2015 at 6:48 PM, Gedare Bloom ged...@rtems.org wrote: We will rely on the linker should not pull the function in if unused. So if it is only referenced by test code, this solution

Re: Uniprocessor implementation of nested mutex problem of priority inversion.

2015-08-14 Thread Saurabh Gadia
to this _Thread_Validate_Priority. Thanks, Saurabh Gadia On Fri, Aug 14, 2015 at 10:06 AM, Saurabh Gadia ga...@usc.edu wrote: And in respect of efficiency, we have to traverse through all the mutex held my the thread and do the checking. There is no other way to confirm that priority inversion has

Re: Uniprocessor implementation of nested mutex problem of priority inversion.

2015-08-14 Thread Saurabh Gadia
( To acheive this behavior I guess we will need to make change to core_mutex_surrender). Thanks, Saurabh Gadia On Fri, Aug 14, 2015 at 9:43 AM, Saurabh Gadia ga...@usc.edu wrote: When a thread releases a semaphore/mutex we call this validate method to make sure that there does not exists any

Re: Uniprocessor implementation of nested mutex problem of priority inversion.

2015-08-14 Thread Saurabh Gadia
but then we need to make sure that the thread dispatch mechanism is disabled. If not then whether including this validate method in _CORE_mutex_Surrender for only strict_order_mutex and Priority inheritance attribute is feasible or not. Please guide me on this. Thanks, Saurabh Gadia On Thu, Aug

Re: How can we extract mutex_control

2015-08-13 Thread Saurabh Gadia
is there a way to get Object from its id. But its again convoluted problem - how to get id? Thanks, Saurabh Gadia On Thu, Aug 13, 2015 at 12:20 AM, Saurabh Gadia ga...@usc.edu wrote: Hi, For a given thread waiting on a mutex, how can we extract the mutex_control on which this thread is waiting

How can we extract mutex_control

2015-08-13 Thread Saurabh Gadia
Hi, For a given thread waiting on a mutex, how can we extract the mutex_control on which this thread is waiting? For example in Thread_Change_priority(). So do the thread_control structure has any reference to mutex on which it is blocked? Thanks, Saurabh Gadia

Uniprocessor implementation of nested mutex problem of priority inversion.

2015-08-13 Thread Saurabh Gadia
=0B44HRKVuGCkFfnFDVmxqQzZZUzljNUg4YmVPZmEybEp2Q0NNclpvS2FvemZ4Tm5Xa19nemMusp=sharing Thanks, Saurabh Gadia ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel

Re: Uniprocessor implementation of nested mutex problem of priority inversion.

2015-08-13 Thread Saurabh Gadia
=0B44HRKVuGCkFfnFDVmxqQzZZUzljNUg4YmVPZmEybEp2Q0NNclpvS2FvemZ4Tm5Xa19nemMusp=sharing Thanks, Saurabh Gadia On Thu, Aug 13, 2015 at 9:10 AM, Saurabh Gadia ga...@usc.edu wrote: That is how we were doing in JPF. The validate method was triggered after every release of mutex by any thread and we would check for all the waiting threads on mutex's held

Re: Uniprocessor implementation of nested mutex problem of priority inversion.

2015-08-13 Thread Saurabh Gadia
and then we traverse upto the head of the chain to manipulate the priority_before if required. Thanks, Saurabh Gadia On Thu, Aug 13, 2015 at 12:51 PM, Gedare Bloom ged...@rtems.org wrote: Saurabh, Remove the commit Updated the motivation for creating the new branch, don't add the .tags files

Re: Uniprocessor implementation of nested mutex problem of priority inversion.

2015-08-13 Thread Saurabh Gadia
locks; it is not possible to eliminate one of them (at least not without a major redesign of all the other code). On Fri, Aug 14, 2015 at 8:34 AM, Saurabh Gadia ga...@usc.edu javascript:; wrote: Thanks, Saurabh Gadia -- Forwarded message -- From: Gedare Bloom ged

Re: Uniprocessor implementation of nested mutex problem of priority inversion.

2015-08-13 Thread Saurabh Gadia
: suspending TA01: priority 36 TA01: exiting *** END OF TEST SPSEM 4 *** You can see the difference in highlighted portions of both outputs. Thanks, Saurabh Gadia On Thu, Aug 13, 2015 at 8:17 AM, Saurabh Gadia ga...@usc.edu wrote: Ok. I will mail you back soon. On Thursday, August 13, 2015

Re: Uniprocessor implementation of nested mutex problem of priority inversion.

2015-08-13 Thread Saurabh Gadia
, Saurabh Gadia On Thu, Aug 13, 2015 at 9:08 AM, Gedare Bloom ged...@rtems.org wrote: Thanks. Would it be possible for you to turn the failure cases into real test failures? In other words, add some logic to detect the priority inversion and abort the test? Gedare On Thu, Aug 13, 2015 at 12

Protected and Unprotected operations on Chain_control

2015-08-12 Thread Saurabh Gadia
because we are sure that ISR will not affect the operation and with protected ISR may affect the operation so we guard operation against it. When is protected and unprotected used in respect with the context? Thanks, Saurabh Gadia ___ devel mailing list devel

Re: Protected and Unprotected operations on Chain_control

2015-08-12 Thread Saurabh Gadia
is acquired for SMP. But how are both macros different. With former Macro it disables all interrupts as level is highest but how does it ensure thread_dispatch_disable? Thanks, Saurabh Gadia On Wed, Aug 12, 2015 at 9:52 AM, Gedare Bloom ged...@gwu.edu wrote: On Wed, Aug 12, 2015 at 11:48 AM

Uniprocessor configuration.

2015-08-11 Thread Saurabh Gadia
Hi, how should I make sure that testcases I am implementing are running under uniprocessor configuration? What do we have to do to run rtems for uniprocessor architecture? Thanks, Saurabh Gadia ___ devel mailing list devel@rtems.org http

Re: Uniprocessor implementation of Nested Mutex problem.

2015-08-05 Thread Saurabh Gadia
For surrender we don't disable thread dispatching for uniprocessor. So is that the thread can be interleaved? Thanks, Saurabh Gadia On Wed, Aug 5, 2015 at 9:01 AM, Gedare Bloom ged...@rtems.org wrote: These functions are called with interrupts disabled. However

Uniprocessor implementation of Nested Mutex problem.

2015-08-04 Thread Saurabh Gadia
Hi, So on uniprocessor can we assume that a thread calling _CORE_mutex_Seize_body or _CORE_mutex_Surrender never gets preempted or interleaved as if it holds a global lock. Whcih means that we can create a JPF model for same using global lock. Thanks, Saurabh Gadia

compare_swap method in rtems.

2015-07-27 Thread Saurabh Gadia
Hi, To avoid data race I need cmp_swap(). So is there some implementation in java to imitate that. And for rtems which method we use for that? Thanks, Saurabh Gadia ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel

Re: How is data race avoided!!

2015-07-27 Thread Saurabh Gadia
checking my_generation==the_thread-priority_generation by some other thread. Thanks, Saurabh Gadia On Mon, Jul 27, 2015 at 9:10 AM, Saurabh Gadia ga...@usc.edu wrote: hi, I was going through the code in _thread_change_priority(){..} (threadchangepriority.c) and had doubt. below is the code

How is data race avoided!!

2015-07-27 Thread Saurabh Gadia
)( the_thread, new_priority, the_thread-Wait.queue ); how is the data race problem avoided while setting the_thread-priority_generation? Thanks, Saurabh Gadia ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman

Re: Is there a data race problem while acquiring a mutex with priority inheritance protocol

2015-07-23 Thread Saurabh Gadia
As per thread initialization in threadinitialize.c we should acquire default lock i.e the_thread-Lock.Default. Am I right? Thanks, Saurabh Gadia On Thu, Jul 23, 2015 at 6:58 PM, Saurabh Gadia ga...@usc.edu wrote: basically every time we try to acquire mutex there should be lock acquisition

Is there a data race problem while acquiring a mutex with priority inheritance protocol

2015-07-23 Thread Saurabh Gadia
there is already holder we do acquire holder lock by calling *lock = _Thread_Lock_acquire( the_thread, lock_context ); *in 2nd snippet but we should do the same on executing thread when holder==NULL in 1st code snippet. Am I right? or is there something I am missing? Thanks, Saurabh Gadia

Re: Is there a data race problem while acquiring a mutex with priority inheritance protocol

2015-07-23 Thread Saurabh Gadia
in threadimpl.h? Thanks, Saurabh Gadia On Thu, Jul 23, 2015 at 7:38 PM, Saurabh Gadia ga...@usc.edu wrote: Yes. I guess I was right about the data race problem we are facing in our model. It is also present in rtems: _Thread_queue_Extract_locked( the_mutex-Wait_queue, the_thread ); line 188

Generating lock graph for nested mutex project

2015-07-22 Thread Saurabh Gadia
-model/blob/rtemsjpf-0.4/rtems/Mutex.java Thanks, Saurabh Gadia ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel

Re: Doubt regarding Thread_Control_struct in rtems

2015-07-16 Thread Saurabh Gadia
Yes I was looking for same present in Thread_Lock_control. I might some how missed it while going through Thread_Control_struct. Thanks. Then as lock is present then I suppose we might have certainly taken care of data race conditions. Thanks, Saurabh Gadia On Thu, Jul 16, 2015 at 12:19 AM

Global lock free Nested Mutex JPF model

2015-07-16 Thread Saurabh Gadia
Hi, I have just implemented global lock free nested mutex JPF model for SMP arch also. github JPF link: https://github.com/saurabhgadia4/lock-model/tree/rtemsjpf-0.6-global-free please review the model and give your feedback!! Thanks, Saurabh Gadia

Doubt regarding Thread_Control_struct in rtems

2015-07-15 Thread Saurabh Gadia
*thread-current_priority. *As it is updated by thread while restoring its priority and while some other thread trying to promote for nested_mutex behavior. Thanks, Saurabh Gadia ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo

Re: Doubt regarding Thread_Control_struct in rtems

2015-07-15 Thread Saurabh Gadia
for SMP we just have to overcome the data race that might happen while modifying thread-real_priority. Thanks, Saurabh Gadia On Wed, Jul 15, 2015 at 4:49 PM, Saurabh Gadia ga...@usc.edu wrote: Hi, Is there any explicit locking to avoid data races condition on members of Thread_Control_struct

Re: Results

2015-06-26 Thread Saurabh Gadia
javascript:; http://lists.rtems.org/mailman/listinfo/devel -- Thanks, Saurabh Gadia ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel

Re: Results

2015-06-25 Thread Saurabh Gadia
Ok. should I will have complete trace files on drive. okkk.. I will upload the trace and then mention about why we got error and how we solved the problem of unbounded priorities. Thanks, Saurabh Gadia On Thu, Jun 25, 2015 at 5:40 PM, Cyrille Artho cyrille.ar...@gmail.com wrote: Yes, let's

Re: Results

2015-06-25 Thread Saurabh Gadia
O(n) is the least that we can have!! Thanks, Saurabh Gadia On Thu, Jun 25, 2015 at 5:39 PM, Saurabh Gadia ga...@usc.edu wrote: I mean not recursion. just looping till top of stack of held mutexes. check this out: https://github.com/saurabhgadia4/lock-model/blob/master/rtems/Mutex.java

Re: Results

2015-06-25 Thread Saurabh Gadia
will recursively make changes to top of stack of held mutexes by the holder. We don't search. Thanks, Saurabh Gadia On Thu, Jun 25, 2015 at 5:27 PM, Joel Sherrill joel.sherr...@oarcorp.com wrote: On June 25, 2015 7:23:06 PM CDT, Cyrille Artho cyrille.ar...@gmail.com wrote: Hi Gedare and all, Good news

Re: Results

2015-06-25 Thread Saurabh Gadia
() in lock() and waitqueue.Remove() happens simultaneously. We solved this by having the global lock() for each mutex. (May be Cyrille can elaborate on this) Thanks, Saurabh Gadia On Thu, Jun 25, 2015 at 5:43 PM, Saurabh Gadia ga...@usc.edu wrote: O(n) is the least that we can have!! Thanks

Re: Results

2015-06-25 Thread Saurabh Gadia
You can configure the test environment according to your needs but 3 mutex are sufficient to cover all test cases and we can have multiple threads using verify() of JPF. Thanks, Saurabh Gadia On Thu, Jun 25, 2015 at 6:37 PM, Saurabh Gadia ga...@usc.edu wrote: Hi all, For time being I have

Re: Error while compiling rtems main branch for sparc

2015-06-05 Thread Saurabh Gadia
Saurabh, This is a current problem in RTEMS. You need to have 'pax' installed on your development host to build the dl tests. So, it looks good to me! Gedare On Thu, Jun 4, 2015 at 9:16 PM, Saurabh Gadia ga...@usc.edu javascript:; wrote: I am sorry for not attaching the patch and configuration

Re: Error while compiling rtems main branch for sparc

2015-06-05 Thread Saurabh Gadia
Hi, installing pax work. But you have to again do the bootstrap step, configuration and compiling. Thanks. Thanks, Saurabh Gadia On Fri, Jun 5, 2015 at 12:44 PM, Gedare Bloom ged...@rtems.org wrote: I'm not really sure, but I think you probably have to re-run configure. On Fri, Jun 5, 2015

Re: Error while compiling rtems main branch for sparc

2015-06-05 Thread Saurabh Gadia
link: https://devel.rtems.org/wiki/GSoC/2015/NestedMutex I feel like I should implement my solution very soon along with progressing on JPF and check if expected output is achieved or not. Thanks, Saurabh Gadia On Fri, Jun 5, 2015 at 1:42 PM, Saurabh Gadia ga...@usc.edu wrote: Hi

Re: Error while compiling rtems main branch for sparc

2015-05-31 Thread Saurabh Gadia
The problem is on master branch Thanks, Saurabh Gadia On Sun, May 31, 2015 at 4:44 PM, Saurabh Gadia ga...@usc.edu wrote: Logs: make[6]: Entering directory `/home/saurabh/dev1/kernel/b-sis/sparc-rtems4.11/c/sis/cpukit/score' make[6]: *** No rule to make target `src/apimutexislocked.c

Error while compiling rtems main branch for sparc

2015-05-31 Thread Saurabh Gadia
/sis/cpukit/score' make[5]: *** [all-recursive] Error 1 ... There is no makefile but I am also not able to find apimutexislocked.c How do I proceed about this. Thanks, Saurabh Gadia

Re: Error while compiling rtems main branch for sparc

2015-05-31 Thread Saurabh Gadia
I wanted to test the ENABLE_STRICT_ORDER_MUTEX=1 related sptests for nested mutex GSOC project. So please let me know what can be done. Thanks, Saurabh Gadia On Sun, May 31, 2015 at 9:33 PM, Saurabh Gadia ga...@usc.edu wrote: Hi, so I am working for sparc-sis setting and master branch

Re: Error while compiling rtems main branch for sparc

2015-05-31 Thread Saurabh Gadia
/score/threadimpl.h:394:6: note: declared here void _Thread_Change_priority( ^ make[6]: *** [src/libscore_a-coremutexsurrender.o] Error 1 Thanks, Saurabh Gadia On Sun, May 31, 2015 at 8:25 PM, Nick Withers nick.with...@anu.edu.au wrote: Does re-running bootstrap in the source dir and re

Updated rtems GSOC table with my proposal for Nested Mutexes problem

2015-03-25 Thread Saurabh Gadia
of the proposal and what changes are required to it. I am also attaching a copy of proposal with this mail. Thanks, Saurabh Gadia GSOC2015_GADIA_NestedMutexes.docx Description: MS-Word 2007 document ___ devel mailing list devel@rtems.org http

Query regarding filling entry into GSOC tentative table

2015-03-23 Thread Saurabh Gadia
How can insert an entry into this table - https://devel.rtems.org/wiki/GSoC/2015. Thanks, Saurabh Gadia ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel

Re: Query regarding filling entry into GSOC tentative table

2015-03-23 Thread Saurabh Gadia
Thanks for help. Thanks, Saurabh Gadia On Mon, Mar 23, 2015 at 11:07 AM, Joel Sherrill joel.sherr...@oarcorp.com wrote: On March 23, 2015 10:18:54 AM CDT, Saurabh Gadia ga...@usc.edu wrote: How can insert an entry into this table - https://devel.rtems.org/wiki/GSoC/2015. You have