System Calls: Difference between revisions
[unchecked revision] | [unchecked revision] |
Content deleted Content added
mNo edit summary |
Fixes of grammar and speech mistakes |
||
Line 1:
System Calls are used to call a kernel service from user land. The goal is to be able to switch from user mode to kernel mode, with the associated privileges. Provided system calls
==Possible methods to make a System Call ==
Line 14:
IRETD
</source>
Which will give you problems when you want to return values to the user. One method to fix this is by writing
<source lang="asm">
IntHandler:
Line 21:
</source>
Many protected mode OSes use EAX to hold the function code. DOS uses the AX register to store the function code
<source lang="asm">
IntA9Handler:
Line 88:
==On the user land side==
While the developper can trigger
Another way is to have a stub somewhere in memory that the kernel places there, then once your registers are set up, call that stub to do the actual system call for you. Then you can swap methods at load time rather than compile time.
==Strategies Conlusion==
The system call strategy depends on the platform. You may want to use different strategy depending on the architecture, and even switch strategy depending on the hardware performance. You might also need more parameter copying on a [[Microkernel|microkernel]] than you will need on a [[Monolithic_Kernel|monolithic]] one.
==See Also==
|