Austin Group Defect Tracker

Aardvark Mark IV


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0001608 [Issue 8 drafts] Base Definitions and Headers Comment Enhancement Request 2022-10-14 11:27 2022-11-08 14:45
Reporter dannyniu View Status public  
Assigned To
Priority normal Resolution Accepted As Marked  
Status Applied   Product Version Draft 2.1
Name DannyNiu/NJF
Organization Individual
User Reference
Section sysconf
Page Number --
Line Number --
Final Accepted Text Note: 0006008
Summary 0001608: Suggesting informative texts for bug-id339
Description Although creating as many threads as there are CPU cores is a simple way to maximize CPU usage, there are subtleties that make it not always the case. As explained in my proposed addition texts in the desired action.
Desired Action Add informative texts to appropriate sections in sysconf:

Although the queries _SC_NPROCESSORS_CONF and _SC_NPROCESSORS_ONLN provide a way for a class of "heavy-load" application to "guess" the optimal number of threads that can be created to maximize CPU usage, real-world environments have complications that affects the actual efficiency that can be achieved. For example:

- there may be more than one "heavy-load" application running on the system,
- the system may be battery power, and applications should co-ordinate with the system so as to ensure long-running task can pause, resume, and successfully complete even in the event of power outage.

In case where a strictly standard-conforming instance of "heavy-load" application wants to avoid the use of vendor-specific APIs, they may wish to create threads based on the logical partition of the long-running task, or utilize heuristics such as the ratio between execution-time and real-time.
Tags issue8
Attached Files

- Relationships
related to 0000339Appliedajosey 1003.1(2008)/Issue 7 Add _SC_NPROCESSORS_CONF / _SC_NPROCESSORS_ONLN to sysconf(3) / unistd.h 

-  Notes
(0006008)
geoffclare (manager)
2022-10-20 15:58

After D2.1 page 2061 line 66817 section sysconf(), add:
Although the queries _SC_NPROCESSORS_CONF and _SC_NPROCESSORS_ONLN provide a way for a class of "heavy-load" application to estimate the optimal number of threads that can be created to maximize throughput, real-world environments have complications that affect the actual efficiency that can be achieved. For example:

  • There may be more than one "heavy-load" application running on the system.

  • The system may be on battery power, and applications should co-ordinate with the system to ensure that a long-running task can pause, resume, and successfully complete even in the event of a power outage.


In case a portable "heavy-load" application wants to avoid the use of extensions, its developers may wish to create threads based on the logical partition of the long-running task, or utilize heuristics such as the ratio between CPU time and real time.

- Issue History
Date Modified Username Field Change
2022-10-14 11:27 dannyniu New Issue
2022-10-14 11:27 dannyniu Name => DannyNiu/NJF
2022-10-14 11:27 dannyniu Organization => Individual
2022-10-14 11:27 dannyniu Section => sysconf
2022-10-14 11:27 dannyniu Page Number => --
2022-10-14 11:27 dannyniu Line Number => --
2022-10-20 15:42 geoffclare Relationship added related to 0000339
2022-10-20 15:58 geoffclare Note Added: 0006008
2022-10-20 15:59 geoffclare Final Accepted Text => Note: 0006008
2022-10-20 15:59 geoffclare Status New => Resolved
2022-10-20 15:59 geoffclare Resolution Open => Accepted As Marked
2022-10-20 15:59 geoffclare Tag Attached: issue8
2022-11-08 14:45 geoffclare Status Resolved => Applied


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker