Synchronizing issue with delays in loops

I'm trying to delay specific threads inside a loop and I am not getting the behavior I want. I would like 1B to run only once 1A has been completed, while 2A runs in parallel on a separate thread. My implementation runs 1A then 1B then 2A instead. An...
more »

2017-08-06 03:08 (1) Answers

Inconsistent runtimes with pthreads

My multithreaded C program runs the following routine : #define NUM_LOOP 500000000 long long sum = 0; void* add_offset(void *n){ int offset = *(int*)n; for(int i = 0; i<NUM_LOOP; i++) sum += offset; pthread_exit(NULL); }...
more »

2017-06-18 08:06 (2) Answers

Linux passive waiting for condition update

I am attempting to create a code that simulates child care center. In this center one adult can care for up to three children. This condition has to be fulfilled all the time. Adults and children are processes generated randomly and amount of childre...
more »

2017-04-18 19:04 (2) Answers

Linux C process communication

I got school project in which I need to write a program that forks to 3 child process and they need to communicate: stdin --> PID1 ---fifo---> PID2 ---file---> PID3 ---> stdout CH2 translates that data to hex string. I also need to imp...
more »

2017-01-18 21:01 (0) Answers

Syncing ms Sql databases with AWS

I'm researching the differences between AWS and Azure for my company. We going to make an web-based application. Which is going to be across 3 regions, each region needs to have a MS SQL database. But I can't figure how to do the following with AWS:...
more »

2016-12-09 09:12 (1) Answers

MS Sync Framework and SQL Server Compact

I develop a Windows C# application which can work in Online and Offline mode. When in Online mode it connects to a SQL Server. In Offline mode it connects to a local DB. I use the Microsoft Sync Framework 2.1 to sync the 2 databases on demand. Unti...
more »

2016-09-18 22:09 (1) Answers

Linux semaphore.h pending / waiting quene policy

I'm testing pending policy of linux's semaphore. Linux's manpage doesn't tell pending policy: http://linux.die.net/man/3/sem_wait, Maybe it's decided by scheduler. Which means highest priority thread pending on this semaphore can run first. So I ...
more »

2016-07-15 12:07 (1) Answers