Almost anywhere I read about programming with CUDA there is a mention of the importance that all of the threads in a wrap do the same thing.
In my code I have a situation where I can't avoid a certain condition. It looks like this:
// some math code, calculating d1, d2
if (d1 < 0.5)
{
buffer[x1] += 1; // buffer is in the global mem...
We built a .NET server application that hosts data (contacts, email, etc.). We'd like to sync our data to mobile devices: iPhone, Windows Mobile, Blackberry, etc.
How should we go about doing this?
Build several mobile apps, one for each platform (e.g. app for iPhone, app for Blackberry, etc.), each app syncs with our server.
License ...
I would like to enable my iPhone app's data to sync with Google docs. How can this be done? What other sync'ing options do I have (another one I am aware of is EverNote Sync Server)?
...
Hi,
Quick question. I am pretty new to thread-safe programming, and was wondering if I have something like below, would this be safe from deadlock once compiled and run?
public class Foo
{
protected CustomClass[] _mySynchedData = new CustomClass[10];
public void processData()
{
synchronized(_mySynchedData) {
...
I'm writing some code that needs to know how much out of sync the client and the single server's time are.
I'm trying to do it by creating a temp file on a SMB share hosted on the server and reading of its last modified time. I thought (maybe incorrectly) that the timestamp would be generated by the server and not the client. since it s...
I am running a countdown timer which updates time on a label.i want to play a tick sound every second.i have the sound file but it is not sync perfectly with time.how do i sync time with audio?also if i use uiimagepicker the sound stops how to manage this? if someone have tick sound like a clock has it would be great.
...
i have a windows application made in VB.NET which maintains a database, and i have similar application running across many disconnected machines, all of them have similar databases. Now we have a requirement that all the data from these machines must be uploaded on a central database server MSSQL on a daily basis, we can have an internet...
I have a data feed continuously feeding data packet in. There are 5 threads(A, B, C, D, E) processing the data packages. Note the 5 threads have totally different speed and they generate 5 different features(each thread generate 1 feature) for every incoming data package.
The 5 threads are at different pace: when A has finished analyzin...
Hi I'm working with some shared memory where different processes read and write data. I'm using a message queue to store messages of when data has changed between read and write operations.
/* struct that defines a message */
struct msgbuf{
long mtype; /* must be positive */
int childId; //ID of child sending message
...
As I found this can be done with merge replication in SQL Server. But I have only one main server and many small ones(with Express edition installed on them).
Let me explain:
There is the main (big) office with SQL Server Standard edition installed on its server. And there are many offices across the country with with their own small ...
I have a desktop application that runs on a network and every instance connects to the same database.
So, in this situation, how can I implement a mutex that works across all running instances that are connected to the same database?
In other words, I don't wan't that two+ instances to run the same function at the same time. If one is...
What are the best ways to keep data synchronized between in memory cache and the database when used in a web application? Specifically, I store large amounts of database data in an in-memory cache using EHcache on my web application. For many interactions, I would like to simply modify the value in cache, and only synchronize it with the...
Why isn't the test in strict alternation for the first entrance for process 0 while ( turn == 0) //then enter
How can process 0 enter while (turn != 0), is'nt this the same as while (turn == 1) ?
turn = 0;
//process 0 to enter
while (TRUE) {
while (turn != 0)
critical_region();
turn = 1;
noncritical_region();
}
//process 1 t...
I have two threads referencing the same variable -- the UI thread and a timer thread. As such, I have wrapped access to it in lock statements in both threads. The timer thread's access has priority -- if it's using the variable and the UI thread also wants access, I want the UI thread's operation to complete, but only after the timer t...
Here is the context :
I have database A on one server, which is used from internal production.
And database B on another server which provide some of the database A's information to a web site.
A is updated internally, and B can is updated by the website's client.
What is the best solution to keep an intégrity between both database?
...
Hi,
Is there any way to perform POSIX shared synchronization objects cleanup especially on process crash? Locked POSIX semaphores unblock is most desired thing but automatically 'collected' queues / shared memory region would be nice too. Another thing to keep eye on is we can't in general use signal handlers because of SIGKILL which ca...
Hi,
The problem that i'm having is how can i synchronise my datasets in my VS 2008 project to any changes in the database.
As you know we read data from the db into the dataset which is disconnected, now lets say 1 minute later something updates the data in the database. What i want to do is after a set time interval check the db for...
What's a good way to sync objects over a socket connection?
Here's what I've thought of so far.
An object, in its getters and setters, calls an Update method that transfers all of the class's information over the socket connection to other connected clients. To update these changes on the clients, a overloaded method is called that bas...
I know there are a lot of questions that have been asked about synchronicity in Flex, but I'm not sure if any cover the same issue I'm having. The title only refers to one possible solution I've been going for with this, but essentially here's my situation:
Say I have a Flex application, and I have an XML file with configuration setting...
Lets say i have to orchestrate a synchronization algorithm in .net 3.5 SP1 and any of the synchronization primitives listed in the title fit perfectly for the task.
From a performance perspective, is any of those more performant than the other?
I ask this because I have been coding for a while now, but without proper knowledge on the s...