🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.multi-tier
2 messages
2 total messages Started by Mohr, Dirk Fri, 13 Nov 1998 00:00
multi thread problem
#1902
Author: Mohr, Dirk
Date: Fri, 13 Nov 1998 00:00
18 lines
1122 bytes
I have build an industrial Multi-Thread Application.

I use the BC3++ Professional, the OS is Win NT 4.0 WS.

My Problem is, that the Application sometimes works good and sometimes 
have an "no controlling time behaviour" (without changing code). It 
seems that NT gives the Threads Time without controll. Sometimes one of
the three Threads (not even the same) runs faster then the other 
(Priority - tpNormal). At other times it seems, that one Thread blocks
the other.

In this Application I use an dll which is made for Visual C.

Have someone Information about this problem ? Is it perhaps an 
Builder-Bug ???


dirk.mohr@fh-bochum.de
Re: multi thread problem
#1869
Author: Jerry Bloomfield [TeamB]
Date: Thu, 03 Dec 1998 00:00
37 lines
2608 bytes
On Fri, 13 Nov 1998 12:40:49 +0000, "Mohr, Dirk"
<dirk.mohr@fh-bochum.de> wrote:

>My Problem is, that the Application sometimes works good and sometimes 
>have an "no controlling time behaviour" (without changing code). It 
>seems that NT gives the Threads Time without controll. Sometimes one of
>the three Threads (not even the same) runs faster then the other 
>(Priority - tpNormal). At other times it seems, that one Thread blocks
>the other.

Your description contains no mention of databases,  so your question
may get a better answer in the borland.public.bcppbuilder.winapi news
group than in a database related group...

Having said that,  the NT scheduler is a little odd in the way threads
are processed.  The scheduler will "round-robin" through all processes
at a certain priority level,  and if there is time left when that
level completes,  it will move on to the next priority level.  After a
certain amount of time that a process has not gotten any CPU time,
the scheduler will give it a "priority boost" to bump it up into a
priority level where it will get some CPU time to prevent starvation
of processes on a busy system.  If you are using any type of Critical
section,  or Mutex,  or exclusive database activity in any one thread,
the others will get blocked if your active thread gets swapped out and
hasn't released that "lock" yet.  I have seen this happen in an app we
have which has a "low priority" thread which does nothing but delete
old data from a database,  while 2 other threads are adding data and
updating data.  When the "low priority" thread gets a lock on the
table then gets swapped-out,  the other threads will not be able to
access the table and will block waiting on the table to be released,
thus causing a form of a priority inversion on us...

Jerry Bloomfield (TeamB)
-- 
Jerry Bloomfield                                     JersWork@wwa.com
Proud Member of Inprise's TeamB
"We'll do anything if you don't pay us."
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads