APLNext Supervisor - Threads Stuck in Queue

General discussions related to APLNext's APLNextSupervisor product.

Re: APLNext Supervisor - Threads Stuck in Queue

Postby joe_blaze » August 31st, 2015, 5:12 pm

Because at that time the Windows OS tells the Supervisor that it cannot start another thread containing an instance of the APL+Win ActiveX engine. All available resources are in use because the 'Kernel' functions are running and they do heavy work. The application is essentially cpu-bound.
joe_blaze
 
Posts: 384
Joined: February 11th, 2007, 3:09 am
Location: Box 361 Brielle, NJ 08730-0361

Re: APLNext Supervisor - Threads Stuck in Queue

Postby Davin Church » August 31st, 2015, 6:17 pm

So why does the OS think that all the CPU resources are in use when nearly half of them aren't really anything?

For that matter, if you ask for a thread why does the OS deny it to you even if they ARE all busy? Shouldn't it let the application worry about overloading and give you as many threads as you ask for? (That's part of what started me on this discussion in the first place.)
Davin Church
 
Posts: 651
Joined: February 24th, 2007, 1:46 am

Re: APLNext Supervisor - Threads Stuck in Queue

Postby joe_blaze » August 31st, 2015, 9:44 pm

Davin: So why does the OS think that all the CPU resources are in use when nearly half of them aren't really [doing] anything?
Joe: None of them are doing nothing and all of them are fully occupied in this situation.

Davin: For that matter, if you ask for a thread why does the OS deny it to you even if they [the cores] ARE all busy?
Joe: Best to ask Microsoft in this case, but I suspect that the OS has a threshold of available processing potential, below which it deems that there are not enough available processing resources to instantiate another thread.

Davin: Shouldn't it let the application worry about overloading and give you as many threads as you ask for? (That's part of what started me on this discussion in the first place.)
Joe: The applications running have saturated the available processing power of the target machine.

Machine capacity is finite and eventually that capacity is reached.
joe_blaze
 
Posts: 384
Joined: February 11th, 2007, 3:09 am
Location: Box 361 Brielle, NJ 08730-0361

Re: APLNext Supervisor - Threads Stuck in Queue

Postby Davin Church » August 31st, 2015, 10:44 pm

I guess it's a good thing Microsoft doesn't have me designing their system, huh?

Question: What class-method is the Supervisor using to start up these threads (to hold the APL ActiveX engines)? Maybe I can do a little research and learn something.
Davin Church
 
Posts: 651
Joined: February 24th, 2007, 1:46 am

Re: APLNext Supervisor - Threads Stuck in Queue

Postby joe_blaze » September 1st, 2015, 5:08 am

Currently the Supervisor is targeted to the Microsoft .Net Framework 4.0, however the .Net Framework 4.5/4.6 provides a new model for asynchronous programming which a future release of the Supervisor may adopt. Besides more development convenience, it appears that performance may also improve because the waiting thread would be handled by the OS rather than the Supervisor. See here: https://msdn.microsoft.com/en-us/library/hh191443.aspx. By having a specific 'await' control structure in the .Net code, the OS can now be informed that the wait operation is lightweight and handle it directly. Prior to the availability of 'await', when the Supervisor application creates a wait operation, the OS has to give it the same relative priority as the actual processing task associated with that wait operation. Experiments will need to be performed to determine if the new 'async' and 'await' control structures in .Net will provide more processing power in APL+Win applications using the Supervisor.
joe_blaze
 
Posts: 384
Joined: February 11th, 2007, 3:09 am
Location: Box 361 Brielle, NJ 08730-0361

Previous

Return to APLNextSupervisor

Who is online

Users browsing this forum: No registered users and 1 guest