Click here to Skip to main content
15,886,919 members

The Insider News

   

The Insider News is for breaking IT and Software development news. Post your news, your alerts and your inside scoops. This is an IT news-only forum - all off-topic, non-news posts will be removed. If you wish to ask a programming question please post it here.

Get The Daily Insider direct to your mailbox every day. Subscribe now!

 
GeneralRe: Stephen Wilhite, creator of the GIF, has died Pin
Slacker00723-Mar-22 23:17
professionalSlacker00723-Mar-22 23:17 
GeneralRe: Stephen Wilhite, creator of the GIF, has died Pin
MarkTJohnson24-Mar-22 2:04
professionalMarkTJohnson24-Mar-22 2:04 
NewsDoes self-documenting code actually exist? Pin
Kent Sharkey23-Mar-22 8:46
staffKent Sharkey23-Mar-22 8:46 
GeneralRe: Does self-documenting code actually exist? Pin
charlieg24-Mar-22 3:40
charlieg24-Mar-22 3:40 
NewsThe Microsoft source code breach may be much bigger than we thought Pin
Kent Sharkey23-Mar-22 8:31
staffKent Sharkey23-Mar-22 8:31 
GeneralRe: The Microsoft source code breach may be much bigger than we thought Pin
obermd24-Mar-22 3:33
obermd24-Mar-22 3:33 
NewsThreads, threads, and more threads Pin
Kent Sharkey23-Mar-22 8:31
staffKent Sharkey23-Mar-22 8:31 
RantRe: Threads, threads, and more threads Pin
trønderen23-Mar-22 12:20
trønderen23-Mar-22 12:20 
I rebooted my Win10 PC to kill stale processes/threads, to get a feeling for the 'minimum' process/thread count. It takes surprisingly long time (3-4 minutes) for all sorts of initializations to complete; then it settles at 120 processes, 1180 threads, with a few more of both popping up regularly.

I am not at all worried! Why should I? I have had to explain to dozens of (non-professional) PC users that several of the tips and tricks to speed up your PC essentially is BS. One really stubborn 'placebo tip' says 'Delete those programs you no longer use to make those you use, run faster'. I know lots of people that insist on a significant speedup after a round of file deletions. But the disk page is still there - why would the CPU speed depend on whether the disk page contains the initial formatting bit pattern, program code pointed to buy a directory entry not being referenced, or program code no longer referenced from a directory entry? Even if you run a wipe program to zero the contents of freed disk pages, so the program code goes away: Why would a non-referenced page affect CPU speed?

We may of course construct extreme situations, such as if the allocation strategy uses a bit map, and only a handful pages are free, and they are at the very end of the bitmap: Search for a free page may be a long one. So you delete a file, and a free page pops up early in the bit map, and the next allocation may be a microsecond faster. But no one will notice a microsecond speedup, and the saving comes in for disk page allocation only. Yet users 'notice' a significant speedup ...

Half-studied guys may construct the most fanciful 'rational' explanations for the speed of their PCs: A friend of mine regularly vacuum cleans his (tower type) PC, to keep it from slowing down. He claims that dust will hinder the ventilation airflow, causing the OS to reduce the clock speed to avoid CPU overheating, which would slow down program execution. So he vacuums it every few weeks to keep speed up.

Like unreferenced disk pages: Why should we worry about a few thousand idle threads, and a few hundred idle processes? Sure, if you have used your last RAM page, and even the bottom entry in the MRU page list is in active use, then a few 'superfluous' entries in the process and tasks lists may, at least in theory, increase paging activity by 0.0001%, or even (if paging is disabled) may cause your system to crash due to an 'out of memory' condition. The answer to such issues is not worrying about idle threads or processes, but to buy more RAM!

Some people would claim that the OS will spend more time searching these terribly long lists of entries. So write yourself a tiny test program that runs through a list of ten thousand objects, scan the list ten thousand times, and measure the time used per iteration. Program in C, and turn down all non-essential activities, to get as stable timings as possible. How often do you think the OS has to traverse a list of this size? Reduce the list size to half, five thousand objects, to see how much time that saves you.

The article writer seems to be extremely worried about e.g. thread pool processes, suggesting to reduce their number. Apparently, he thinks it cheaper to create new thread objects at high frequency than skipping over an idle thread in a list ... Thread pools are used to reduce overhead, not to increase it! Having a sufficiently large number of already-initialized worker threads ready to jump in to do some work at a snap is certainly not slowing down application execution!

I am really happy about the number of threads that are sitting there, ready to jump in at any time. The cost of managing a thread that makes no system calls, does not generate a CPU load, does not occupy I/O channels, does not cause any interrupt, is very close to epsilon squared.
GeneralRe: Threads, threads, and more threads Pin
Dan Neely24-Mar-22 3:24
Dan Neely24-Mar-22 3:24 
GeneralRe: Threads, threads, and more threads Pin
Randor 23-Mar-22 12:40
professional Randor 23-Mar-22 12:40 
GeneralRe: Threads, threads, and more threads Pin
obermd24-Mar-22 3:44
obermd24-Mar-22 3:44 
NewsMicrosoft improves its AI translations with Z-Code Pin
Kent Sharkey23-Mar-22 8:31
staffKent Sharkey23-Mar-22 8:31 
NewsMap of the Internet 2021 Pin
Kent Sharkey22-Mar-22 9:16
staffKent Sharkey22-Mar-22 9:16 
GeneralRe: Map of the Internet 2021 Pin
Greg Utas22-Mar-22 11:39
professionalGreg Utas22-Mar-22 11:39 
NewsPlease stop writing shell scripts Pin
Kent Sharkey22-Mar-22 9:01
staffKent Sharkey22-Mar-22 9:01 
GeneralRe: Please stop writing shell scripts Pin
j snooze22-Mar-22 11:36
j snooze22-Mar-22 11:36 
GeneralRe: Please stop writing shell scripts Pin
Marc Clifton23-Mar-22 5:59
mvaMarc Clifton23-Mar-22 5:59 
NewsWant to get hired in tech? These programming languages will get you the most interviews Pin
Kent Sharkey22-Mar-22 7:46
staffKent Sharkey22-Mar-22 7:46 
GeneralRe: Want to get hired in tech? These programming languages will get you the most interviews Pin
Marc Clifton22-Mar-22 8:19
mvaMarc Clifton22-Mar-22 8:19 
GeneralRe: Want to get hired in tech? These programming languages will get you the most interviews Pin
charlieg23-Mar-22 7:19
charlieg23-Mar-22 7:19 
NewsWindows 11 gets a new desktop watermark on unsupported hardware Pin
Kent Sharkey22-Mar-22 7:46
staffKent Sharkey22-Mar-22 7:46 
GeneralRe: Windows 11 gets a new desktop watermark on unsupported hardware Pin
charlieg23-Mar-22 7:13
charlieg23-Mar-22 7:13 
NewsSimple electrical circuit learns on its own—with no help from a computer Pin
Kent Sharkey22-Mar-22 7:16
staffKent Sharkey22-Mar-22 7:16 
GeneralRe: Simple electrical circuit learns on its own—with no help from a computer Pin
Marc Clifton22-Mar-22 8:17
mvaMarc Clifton22-Mar-22 8:17 
GeneralRe: Simple electrical circuit learns on its own—with no help from a computer Pin
obermd23-Mar-22 4:23
obermd23-Mar-22 4:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.