Can multiple CPUs simultaneously write to the same RAM location?
Are machine word size (or smaller) writes serialized? Only one native opcode is needed to copy register content to RAM. ...
Are machine word size (or smaller) writes serialized? Only one native opcode is needed to copy register content to RAM. ...
I'm confused. Answers to my previous question seems to confirm my assumptions. But as stated here volatile is not enough to assure atomicity in .Net. Either operations like incrementation and assignment in MSIL are not translated directly to single, native OPCODE or many CPUs can simultaneously read and write to the same RAM location. T...
Ok, So I'm developing a website which to begin with will have 3 clear sub sites: Forum, News and a Calendar. Each sub site will have it's own database and common to all of these databases will be a user table which needs to be in each database so that joins can be done. How can I synchronize all the user tables so that it doesn't matte...
I know that similar template exits in Intel's TBB, besides that I can't find any implementation on google or in Boost library. ...
Hi guys, Need a little advice here. We do some windows mobile development using the .NET Compact framework and SQL CE on the mobile along with a central SQL 2005 database at the customers offices. Currently we synchronize the data using merge replication technology. Lately we've had some annoying problems with synchronization throwin...
How can I enable the functionality to sync my custom list with Outlook 2007 todo or calendar list? I assume it's possible with custom lists too, but I cannot find any documentation on it. ...
I would like to know what are ruby's alternatives to the Java methods : wait notify notifyAll Could you please post a small snippet or some links ? ...
Does c# have its own version of the java "synchronized" keyword? I.e. in java it can be specified either to a function, an object or a block of code, like so: public synchronized void doImportantStuff() { // dangerous code goes here. } or public void doImportantStuff() { // trivial stuff synchronized { // dangerous ...
Hi, I have a shared mutex between 2 applications. I want to create an administration console that shows the current owner's name of the mutex. How can I get the application name that currently owns the Mutex? ...
How would one synchronize one real-time thread with a normal thread in Java? Take for example a real-time thread that calculates some temperatures and the GUI thread that has to collect those numbers and show them on some controls. The implementation of the real-time library shouldn't matter as it should follow the specifications. ...
Does anyone know if there are any lock-free container libraries available for .NET ? Preferably something that is proven to work and faster than the Synchronized wrappers we have in .NET. I have found some articles on the .NET, but none of them specify any speed benchmarking, nor do they inspire much confidence in their reliability. T...
The Java memory model makes it clear what can and cannot be assumed about how threads interact through memory. For example, if one thread writes a new value to a field without appropriate synchronization then the new value is not guaranteed to be observable by other threads. In practice, however, other threads might anyhow read the new v...
I'm working on a service that runs in a java app server farm that needs to do some periodic jobs (say, once every 2 minutes). The service must interface to external entities, and it is necessary to synchronize the different instances so that only one of them works on the job at a given time. Since the service uses a DB during this job,...
Hi, I have a situation I'm trying to cope with involving my company's SVN server. We keep all of our important code in a locked-down server (we'll call this the "dev" server). There are some files that need to be edited by users outside the corporate network, so we have another SVN server (the "global" server) which is accessible outsi...
How long will a thread wait for a race condition in the following scenario? A file is added to a collection: lock(mylock) { // add to collection } It is then removed from the collection in a similiar manner. If a thread is trying to add to the collection while the service is removing it from the collection, who wins? Or is...
Question How can I make sure my application is thread-safe? Are their any common practices, testing methods, things to avoid, things to look for? Background I'm currently developing a server application that performs a number of background tasks in different threads and communicates with clients using Indy (using another bunch of automa...
I have implemented a wcf service and now, my client wants it to have three copies of it, working independently on different machines. A master-slave approach. I need to find a solution that will enable behavior: the first service that is instantiated "asks" the other two "if they are alive?" - if no, then it becomes a master and it is t...
Is the following code set up to correctly synchronize the calls on synchronizedMap? public class MyClass { private static Map<String, List<String>> synchronizedMap = Collections.synchronizedMap(new HashMap<String, List<String>>()); public void doWork(String key) { List<String> values = null; while ((values = synchronizedMap...
HI All, I've succesfully synchronized both source and local db using the local database cache item in VS 2008. However, I need to access the SQL CE db directly from within another dll/process, and not using a dataset. Reason being my business object code does not use datasets. code would look something like this: Dim conn As New SqlS...
Hello again! I'm back with another question concerning threads and synchronization. Imagine a server application that has to perform a lengthy operation and the client wants his GUI to remain responsive while he waits for the server's response. I thought of the following pattern: TMonitor.Enter (FTCPClient); try WorkerThread := TWorke...