Случайный ответ ... Я не программист, но я наткнулся на что-то интересное, работая над вещами в Ask Different ...
sched_prim.c (Планирование примитивов) в относительно старых версиях xnu-124.7 включает в себя:
#define MAX_STUCK_THREADS 128
/*
* do_thread_scan: scan for stuck threads. A thread is stuck if
* it is runnable but its priority is so low that it has not
* run for several seconds. Its priority should be higher, but
* won't be until it runs and calls update_priority. The scanner
* finds these threads and does the updates.
*
* Scanner runs in two passes. Pass one squirrels likely
* thread ids away in an array (takes out references for them).
* Pass two does the priority updates. This is necessary because
* the run queue lock is required for the candidate scan, but
* cannot be held during updates [set_pri will deadlock].
*
* Array length should be enough so that restart isn't necessary,
* but restart logic is included. Does not scan processor runqs.
*
*/
thread_t stuck_threads[MAX_STUCK_THREADS];
int stuck_count = 0;
/*
* do_runq_scan is the guts of pass 1. It scans a runq for
* stuck threads. A boolean is returned indicating whether
* a retry is needed.
*/
- это что, застрявшие темы , пища для размышлений?
Или слишком далеко от вопроса о процессах ?
На первый взгляд, нет сопоставимого блока кода в sched_prim.c в источнике xnu-1699.26.8 для Mac OS X 10.7.4.