Calling the next thread (API) to run on processor (documentation needed)

Victor Mehta 176 Reputation points
2021-02-19T22:49:28.073+00:00

I was reading the book Windows Internals 6th Edition Part 1, Chapter 5, Thread Selection and it states the following "Whenever a logical processor needs to pick the next thread to run, it calls the **KiSelectNextThread scheduler function**. " I tried searching Google and Microsoft and could not find any help. Can someone tell me where I can find documentation on this API ? I would also like to find documentation on all available API that the kernel scheduler has to offer. Thanks in advance Victor

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
4,747 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Castorix31 81,726 Reputation points
    2021-02-20T07:06:55.727+00:00

    You can find source code of undocumented functions in ReactOS, which uses similar code as the NT Kernel :
    thrdschd.c

    1 person found this answer helpful.

  2. Victor Mehta 176 Reputation points
    2021-02-20T16:34:10.507+00:00

    I did have one further question to ask. If you take the following sentence "Whenever a logical processor needs to pick the next thread to run, it calls the KiSelectNextThread scheduler function. " literally its saying that the CPU calls this function but how does the CPU actually makes this call ?

    0 comments No comments

  3. Jenny Feng 14,076 Reputation points
    2021-02-22T07:57:30.003+00:00

    Hi,
    You may refer to the following link for more info:
    https://stackoverflow.com/questions/5570893/how-does-a-system-call-translate-to-cpu-instructions
    Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.
    Hope above information can help you.

    ============================================
    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments