what is a reentrant kernel

后端 未结 4 1602
刺人心
刺人心 2021-01-31 17:54

What is a reentrant kernel?

4条回答
  •  隐瞒了意图╮
    2021-01-31 18:21

    The kernel is the core part of an operating system that interfaces directly with the hardware and schedules processes to run.

    Processes call kernel functions to perform tasks such as accessing hardware or starting new processes. For certain periods of time, therefore, a process will be executing kernel code. A kernel is called reentrant if more than one process can be executing kernel code at the same time. "At the same time" can mean either that two processes are actually executing kernel code concurrently (on a multiprocessor system) or that one process has been interrupted while it is executing kernel code (because it is waiting for hardware to respond, for instance) and that another process that has been scheduled to run has also called into the kernel.

    A reentrant kernel provides better performance because there is no contention for the kernel. A kernel that is not reentrant needs to use a lock to make sure that no two processes are executing kernel code at the same time.

提交回复
热议问题