On Wed, May 15, 2013 at 10:03:40PM +0200, Alfonso S. Siciliano wrote:

> Hi,
> I'm trying to study the concurrency and the parallelism of OpenBSD.
> Fortunately SMP is supported on my platform, amd64.
> Where can I find documentation about what components are been
> parallelized? (queue, stack, etc.)

Concurrency in OpenBSD (and other unix systems) is achieved with
process threads as the building block. Using that, you can build data
structures that use concurrency, for example using a producer-consumer
abstraction. 

Since you do not tell us if you are interested in the kernel or
userland side of things, it is hard to point you to manual pages or
other documentation.

At this point in time, the kernel uses less concurrency than you might
expect, but it provides services to userland to either run process
threads concurrently given the limitations of the hardware, or at
least provide the abstractions so that it seems they run concurrently
on non-smp hardware. 

In general, when programming userland programs, you do not need to
know if you are runing an smp system or not. Choose the concurrency
model that suits your problem best, which might very well be a single
threaded solution. A collection of single threaded processes is often
a good solution as well). 

        -Otto

Reply via email to