The main question: due to what the computing process can be braked, if the task is completely determined? Usually the reason is that there is a graph of the computational process that limits the possibilities of parallel execution of tasks.
In the model under consideration, the reason is to synchronize the tasks that are running in parallel. The probable meaning is that simultaneous loading of data into streams frees the server for asynchronous reception and processing of results.
If such a model is correct, then the server should wait for the completion of all tasks in the threads before synchronously issuing new tasks to the threads. Such synchronization is determined both by the number of tasks and by the distribution law of the random variable-the time $T$ of the task in the stream. The output requires an estimate of the completion time $\overline {T_m}$ of jobs in all $m$ threads and the associated parameters.
Let
$$f(t, T, \Delta, 1)$$
is probability density function of probability distribution for one thread and
$$f(t, T, \Delta, k)$$
is probability density function of probability distribution for $k$ threads.
Then
$$\overline {T_1} = \int\limits_{-\infty}^\infty xf(x,T,\Delta,1)\,\mathrm dx,$$
$$\overline {T_m} = \int\limits_{-\infty}^\infty xf(x,T,\Delta,m)\,\mathrm dx,$$
$$f(t, T, \Delta, k_1+k_2) = f(t,T,\Delta,k_1) g(t,T,\Delta,k_2)+f(t,T,\Delta,k_2) g(t,T,\Delta,k_1),$$
where
$$g(t, T, \Delta, k) = \int\limits_{-\infty}^t f(x,T,\Delta,k)\mathrm dx.$$
For the homogenius distribution law,
$$f(t,T,\Delta,1) = \dfrac1{2\Delta}u(t,T,\Delta),$$
where
$$u(t,T,\Delta)=
\begin{cases}
1,\text{ if } t\in[T-\Delta,T+\Delta]\\[4pt]
0,\text{ otherwise},
\end{cases}$$
$$g(t, T, \Delta, k) = \int\limits_{-\infty}^t f(x,T,\Delta,k)\mathrm dx = h(t-(T-\Delta))\int\limits_{T-\Delta}^{\min(T+\Delta,t)} f(x,T,\Delta,k)\mathrm dx,$$
where
$$h(x)=\begin{cases}
1,\text{ if } x\ge0\\
0,\text{ otherwise}.
\end{cases}$$
In partial,
$$f(t, T, \Delta, 2k) = 2f(t,T,\Delta,k) g(t,T,\Delta,k) = 2f(t,T,\Delta,k)\int\limits_{T-\Delta}^{\min(T+\Delta,t)} f(x,T,\Delta,k)\mathrm dx.$$
For example:
$$f(t, T, \Delta, 2) = 2f(t,T,\Delta,1) \int\limits_{T-\Delta}^{\min(T+\Delta,t)} f(x,T,\Delta,1)\,\mathrm dx = u(t,T,\Delta)\dfrac{t-T+\Delta}{2\Delta^2}=
\begin{cases}
0,\qquad\qquad\qquad \text { if } t<T-\Delta\\[4pt]
\dfrac{t-T+\Delta}{2\Delta^2},\text{ if }t\in[T-\Delta,T+\Delta]\\[4pt]
0,\qquad\qquad\qquad \text{ if } t>T+\Delta,
\end{cases}$$
$$\overline {T_2} = \int\limits_{T-\Delta}^{T+\Delta}x\dfrac{(x-T+\Delta)^2}{2\Delta^2}\,\mathrm dx=T+\dfrac13{\Delta},$$
$$f(t, T, \Delta, 4) = 2f(t,T,\Delta,2) \int\limits_{T-\Delta}^{\min(T+\Delta,t)} f(x,T,\Delta,2)\,\mathrm dx = u(t,T,\Delta)\dfrac{(t-T+\Delta)^3}{4\Delta^4},$$
$$\overline {T_4} = \int\limits_{T-\Delta}^{T+\Delta}x\dfrac{(x-T+\Delta)^3}{4\Delta^4}\,\mathrm dx=T+\dfrac35\Delta,$$
$$f(t, T, \Delta, 8) = 2f(t,T,\Delta,4) \int\limits_{T-\Delta}^{\min(T+\Delta,t)} f(x,T,\Delta,4)\,\mathrm dx = f(t,T,\Delta,1)\dfrac{(t-T+\Delta)^7}{32\Delta^8}$$
$$\overline {T_8} = \int\limits_{T-\Delta}^{T+\Delta}x\dfrac{(x-T+\Delta)^7}{32\Delta^8}\,\mathrm dx=T+\dfrac79\Delta,$$
$$f(t, T, \Delta, 16) = 2f(t,T,\Delta,8) \int\limits_{T-\Delta}^{\min(T+\Delta,t)} f(x,T,\Delta,8)\,\mathrm dx = f(t,T,\Delta,1)\dfrac{(t-T+\Delta)^{15}}{4096\Delta^{16}}$$
$$\overline {T_{16}} = \int\limits_{T-\Delta}^{T+\Delta}x\dfrac{(x-T+\Delta)^{15}}{4096\Delta^{16}}\,\mathrm dx=T+\dfrac{15}{17}\Delta,$$
etc.
50000 ms, it will reduce the number of executions per seconds drastically. (200 jobs / 1 secondsvs.200 jobs / 50 seconds). In my question I choose the average job completion time as the time gap (1s). – Sabiwww Jul 05 '18 at 13:55m, and the server will bock if the ringbuffer is full, but will drop entries older than the configured time gap. – Sabiwww Jul 05 '18 at 13:58