Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Threads may be detrimental on single CPU machines, so why do they work for iSQL*Plus 9.x?

0
Posted

Threads may be detrimental on single CPU machines, so why do they work for iSQL*Plus 9.x?

0

Threads in general are detrimental on single CPU machines. The reason is that the CPU can end up spending more time managing threads (including switching between them) than actually processing them. However, this is only true for threads that are very processor intensive and/or threads that don’t actually do very much (in terms of CPU cycles). For example, loops that perform intensive arithmetic computations. In these cases, a single thread can run to completion before the CPU switches to other waiting threads, so you end up with sequential processing anyway. In the case of iSQL*Plus, threads spend a great deal of time waiting for disk I/O and other co-dependent threads to complete. During these ‘idle’ times, the CPU is able to switch processing to threads that are ready and are not blocked by I/O. The end result is that even on a single CPU, each thread appears to be able to achieve more work in the same amount of time.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123