question

VictorMehta-3520 avatar image
0 Votes"
VictorMehta-3520 asked ·

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

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-7-general
· 1
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,

Just checking in to see if the information provided was helpful.

If the reply helped you, please remember to accept as answer.
If no, please reply and tell us the current situation in order to provide further help.

0 Votes 0 ·
Castorix31 avatar image
1 Vote"
Castorix31 answered ·

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


· 2 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you for the reply. Just how similar is ReactOS to Windows as far as the kernel goes ?

0 Votes 0 ·
Castorix31 avatar image Castorix31 VictorMehta-3520 ·

I don't know ReactOS; I just know that its Kernel code comes from NT Kernel code (some improvements have been done in Windows since NT, from Windows 7 and above)

0 Votes 0 ·
VictorMehta-3520 avatar image
0 Votes"
VictorMehta-3520 answered ·

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 ?

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JennyFeng-MSFT avatar image
0 Votes"
JennyFeng-MSFT answered ·

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.

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.