0

I'm writing a software application that spawns several child processes in order to process tasks concurrently.

Each child process has access to shared data structures, and it is very important that the processes don't interfere with each other when accessing/modifying these structures.

If the application used threads instead of processes to achieve concurrency, then we would describe this consideration as thread safety:

A piece of code is thread-safe if it manipulates shared data structures only in a manner that guarantees safe execution by multiple threads at the same time.

(source: Wikipedia)

However, since this application uses processes instead of threads, what term should I use instead of "thread safety"?

  • 3
    You might say something like "concurrency-safe". – Hot Licks Nov 17 '16 at 1:02
  • OT, but is this a good idea? Normally you'd want a single process to own the memory, and communicate changes through that thread-safe process. Otherwise you'll have trouble scaling, and be limited to a single machine for execution (not very cloud friendly). – jimm101 Jan 13 '17 at 23:28
1

From Wikipedia:

The implementation of threads and processes differs between operating systems, but in most cases a thread is a component of a process.

If your processes are running on a typical computer, in your example each concurrent process can be said to contain a single thread.

So the phrase you're looking for is probably still thread-safe.

-1

May be scaled-out via multiple processes

To scale horizontally (or scale out/in) means to add more nodes to (or remove nodes from) a system, such as adding a new computer to a distributed software application.
- https://en.m.wikipedia.org/wiki/Scalability

  • That has nothing to do with being concurrency-safe. – Hot Licks Jan 13 '17 at 21:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.