Question

I have a question related to one of my backend environments:

On a linux machine (suse linux), there is an apache webserver, with cgi enabled:

2 different users (in different places), in our webapp on the browser, click the "events" button AT THE SAME TIME. Because of this the apache webserver starts 2 SEPARATE processes running the cgi (it's a compiled c executable) "show_events".

But this compiled c executable loads a shared object "events_helper" and calls methods in this shared object.

Now my question:

Do these 2 users in the "show_events" cgi program share the same shared object "events_helper" and do I therefore have to consider concurrency or does each "show_events" process have its own copy of the shared object and is therefore concurrency no subject.

Thanks alot in advance

Was it helpful?

Solution

Since they run in separate processes, their stack and heap are different copies, so you don't need to worry about that. If they both access to the same files or use explicitly declared shared memory, then you need to handle that case with mutual exclusion or other methods.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top