Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Synchronization Algorithm Verificator for C++0x

Reply
Thread Tools

Synchronization Algorithm Verificator for C++0x

 
 
Peter Dimov
Guest
Posts: n/a
 
      08-27-2008
On Aug 27, 6:50*pm, "Dmitriy V'jukov" <(E-Mail Removed)> wrote:

> Does modeling of Java volatile stores/loads as C++0x seq_cst stores/
> loads satisfy those requirements?


I believe that it does.

> I don't get you here. There are no such synchronization actions as
> volatile loads and stores in C++0x.


Yes, I used the Java meaning of volatile. I meant that Relacy can
directly implement the JMM meaning of volatile for rl::jvolatile,
instead of translating it to C++ terms first. This would allow you to
run the same algorithm expressed in Java and in C++ seq_cst and verify
whether the results match. So Relacy can give us a direct answer to
your first question above.
 
Reply With Quote
 
 
 
 
Dmitriy V'jukov
Guest
Posts: n/a
 
      08-27-2008
On Aug 27, 9:02*pm, Peter Dimov <(E-Mail Removed)> wrote:
> On Aug 27, 6:50*pm, "Dmitriy V'jukov" <(E-Mail Removed)> wrote:
>
> > Does modeling of Java volatile stores/loads as C++0x seq_cst stores/
> > loads satisfy those requirements?

>
> I believe that it does.


Good! Than it will be simple.

> > I don't get you here. There are no such synchronization actions as
> > volatile loads and stores in C++0x.

>
> Yes, I used the Java meaning of volatile. I meant that Relacy can
> directly implement the JMM meaning of volatile for rl::jvolatile,
> instead of translating it to C++ terms first. This would allow you to
> run the same algorithm expressed in Java and in C++ seq_cst and verify
> whether the results match. So Relacy can give us a direct answer to
> your first question above.


Hmmm... It looks like vicious circle

Direct modeling of Java and CLI synchronization primitives I consider
as last resort. I hope that I will be able to easily model Java/CLI
primitives via C++0x primitives. Currently I add only 2 patches. First
I've described here:
http://groups.google.com/group/comp....c810b38be80bbb
And second is that every atomic RMW is followed by seq_cst fence:
T java_cli_atomic_rmw(...)
{
T r = cpp0x_atomic_rmw(..., memory_order_seq_cst);
cpp0x_atomic_thread_fence(memory_order_seq_cst);
return r;
}
I think that this is intended behavior of CLI Interlocked operations,
because they based on Win32 Interlocked operations, and they are based
on x86 locked instructions
I am not sure about Java here. I can't find answer in language
specification and description of atomic package...

Dmitriy V'jukov
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filtered Back Projection Algorithm (FBP Algorithm) Bapaiah Katepalli VHDL 1 06-23-2006 04:50 PM
synchronization Firefox 0 04-12-2005 03:44 PM
System Time synchronization arcvonz ASP .Net 2 08-23-2004 10:17 PM
Flip Flop Synchronization John VHDL 3 01-05-2004 05:58 PM
Key generation algorithm and Cipher algorithm Ahmed Moustafa Java 0 11-15-2003 06:35 AM



Advertisments