Single threaded application (C++) continuously locks, writes and unlocks shared memory - four times a second (the loop is programically set to run once a second and there are 4 writes in the loop and no reads).
EnterCriticalSection(cs);
WriteToSharedMem();
LeaveCriticalSection(cs);
Another application (C) will access this shared memory once every few minutes.
Are there any problems with writing to shared memory at this rate?
Windows XP
C++
At this rate there definitely not! This is extremely slow, however I'm not sure Critical section is what you want to use, the way I remember it that only ensures thread safety, not cross-application safety, you should look for something else to lock shared memory. You have to use some Inter-Process Communication (IPC) mechanism to ensure atomic operations with shared memory.
The rate you give (four times a second) won't cause a problem, but you can't use critical sections across processes. You need a kernel level synchronization object like a mutex.
Not at all. You can get/release the lock thousands (or tens or hundreds of thousands) of times per second. You could easily do a quick benchmark to see.