1

Topic: Council about the architectural task

Colleagues I welcome, I Want to address with council about the architectural task which decision I completely ruined. At me was about 20 minutes on the decision. We imagine multinuclear computer system. There is a row of arriving heterogeneous events, network, from file system, from a videocamera for example well and . the Task consists in allocation of output agents of these tasks on kernels so that processor kernels did not stand idle. Handlers of tasks we will consider purely computing, without what that of possible waitings on an input/output. . we will consider that the amount of the active tasks should be equal kol-vu kernels CPU. To provide handling follows at as more as possible fast rate, and without processor idle time. Actually the job: to design structure of classes for the decision of the given task. Correlations, interfaces and so on. The question how to operate at the decision of similar tasks? I in perplexity now stay. I want the ready decision so much to receive, how many to understand what campaigns are used at the decision of similar architectural tasks. What literature can esteem etc. On mind "designing patterns" and Aleksandesku "the Modern designing come only...." Unfortunately on operation of practice of similar tasks is not present, the selected department of architects of a software is engaged in similar things.

2

Re: Council about the architectural task

Hello, salvequick, you wrote: S> Unfortunately on operation of practice of similar tasks is not present, the selected department of architects of a software is engaged in similar things. If I correctly understood, the question is reduced to a choice from typical implementations of a pool of tasks (flows). Further all depends on language / , the general-purpose answer will not be.

3

Re: Council about the architectural task

Hello, Sinix, you wrote: S> If I correctly understood, the question is reduced to a choice from typical implementations of a pool of tasks (flows). Further all depends on language / , the general-purpose answer will not be. I can concretize a little: language With ++ and a platform linux

4

Re: Council about the architectural task

Hello, salvequick, you wrote: S> I Want to address with council about the architectural task which decision I completely ruined. I suspect that from you wanted to hear about speculations on a pattern subject producer-consumer with accent towards cost of synchronization and non-blocking queues a la disruptor

5

Re: Council about the architectural task

You put  a pool on number of kernels and all. What there still classes and interfaces. implements Runnable and all .

6

Re: Council about the architectural task

Hello, salvequick, you wrote: S> I want the ready decision so much to receive, how many to understand what campaigns are used at the decision of similar architectural tasks. What literature can esteem etc. S> On mind "designing patterns" and Aleksandesku "the Modern designing come only...." At microsoft there was article (or even the book?) On a subject concurrency patterns. To unwinding did not find. There it is finite in all lean on Task Parallel Library in.NET but the main algorithms are disassembled. The essence of the decision of your task consists in queue and worker threads on number of kernels. Some questions which it is necessary to answer: 1) As there will be a competitive access to queue? That a simultaneous taking of the task from queue and execution broke nothing. The answer - lock-free queues. 2) what to do if tasks is not present - here it is necessary to start with requirements. It is possible to extinguish flows and to launch, if there are no free, and it is possible to use primitives of synchronization for a stop having a rest (with a minimum overhead projector). 3) How to signal about end - here it is necessary to look simply as it is made IAsyncResult in.NET. 4) How to make thread affinity in such system for not any code can be executed in different flows. 5) most likely will be details connected with *nix for in Windows is built in thread pool, there tasks it is irrelevant.

7

Re: Council about the architectural task

Hello, vsb, you wrote: vsb> you Put  a pool on number of kernels and all. What there still classes and interfaces. implements Runnable and all . And then it appears that at you flows of 80 % of time on  hang. Suddenly, .

8

Re: Council about the architectural task

Hello, itslave, you wrote: I> Hello, vsb, you wrote: vsb>> you Put  a pool on number of kernels and all. What there still classes and interfaces. implements Runnable and all . I> and then it appears that at you flows of 80 % of time on  hang. Suddenly, .> There is a row of arriving heterogeneous events, network, from file system, from a videocamera for example well and .> Handlers of tasks will consider purely computing, without what that of possible waitings on an input/output. What for to finish thinking about what is not present in the task. Any  is not present. Qualitative implementations of Thread-pools full.