Preempting tasks at a preemption point of a kernel service routine based on current execution mode

US9424105B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-9424105-B2
Application numberUS-201213693028-A
CountryUS
Kind codeB2
Filing dateDec 3, 2012
Priority dateDec 7, 2011
Publication dateAug 23, 2016
Grant dateAug 23, 2016

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

An apparatus for dynamically controlling a preemption section includes a preemption manager configured to monitor whether a system context has changed, and if the system context has changed, set a current preemptive mode according to the changed system context to dynamically control a preemption section of a kernel. Therefore, even when an application requiring real-time processing, such as a health-care application, co-exists with a normal application, optimal performance may be ensured.

First claim

Opening claim text (preview).

What is claimed is: 1. An apparatus for dynamically controlling a preemption section of a kernel, wherein the preemption section is a section of the kernel in which a process currently being executed may be preempted to enable another process to be executed, the apparatus comprising: a processor; a preemption manager configured to: monitor whether a system context has changed; and upon determining that the system context has changed, set a current preemptive mode according to the changed system context to dynamically control the preemption section of the kernel, wherein the current preemptive mode determines whether the apparatus will prioritize processing efficiency or real-time processing; and a preemption point manager configured to determine, upon reaching a preemption point in execution of a kernel service routine of the kernel, whether to check whether a current thread needs to be rescheduled, based on the current preemptive mode; and upon determining that the current thread needs to be rescheduled, reschedule the current thread. 2. The apparatus of claim 1 , wherein the current preemptive mode is one of a non preemptive mode, a general preemptive mode, or a fully preemptive mode; and the non preemptive mode, the general preemptive mode, and the fully preemptive mode are classified according to a degree to which the system context requires real-time processing. 3. The apparatus of claim 2 , wherein each of the non preemptive mode, the general preemptive mode, and the fully preemptive mode is sub-classified into a plurality of preemption levels according to a degree to which the system context requires real-time processing; and the preemption manager is further configured to set a preemptive level for the current preemptive mode among the preemptive levels of the current preemptive mode to dynamically control the preemption section of the kernel. 4. The apparatus of claim 1 , further comprising an interrupt context manager configured to dynamically change a method of processing an Interrupt Service Routine (ISR) according to the current preemptive mode. 5. The apparatus of claim 4 , wherein, when a hardware interrupt is generated, the interrupt context checks the current preemptive mode; if the current preemptive mode is a non preemptive mode, the interrupt context manager causes the ISR to continue to be executed in an interrupt context mode; and if the current preemptive mode is not the non preemptive mode, the interrupt context manager causes the ISR to be executed in an interrupt thread mode. 6. The apparatus of claim 1 , wherein the preemption point comprises a code section for checking whether a current thread needs to be rescheduled; and the preemption point manager is further configured to prevent the code section for checking whether a current thread needs to be rescheduled from being executed or allow the code section for checking whether a current thread needs to be rescheduled to be executed depending on the current preemptive mode. 7. The apparatus of claim 6 , wherein the preemption point manager is further configured to, when the execution of the kernel service routine reaches the preemption point: determine whether the current preemptive mode is a non preemptive mode; if a result of the determining is that the current preemptive mode is the non preemptive mode, prevent the code section for checking whether a current thread needs to be rescheduled from being executed; and if a result of the determining is that the current preemptive mode is not the non preemptive mode, allow the code section for checking whether a current thread needs to be rescheduled to be executed. 8. The apparatus of claim 1 , further comprising a preemptive lock manager configured to, when the kernel executes a task having spin lock, dynamically cause the kernel to execute the task using a spin lock or a mutex according to the current preemptive mode. 9. The apparatus of claim 1 , further comprising a preemptive IPC/SysCall manager configured to: when an Inter-Process Communication (IPC) is processed, dynamically control a time-out of the IPC according to the current preemptive mode; and when a system call is generated, cause the system call to be executed synchronously or asynchronously according to the current preemptive mode. 10. The apparatus of claim 9 , wherein the IPC/SysCall manager is further configured to: determine whether the current preemptive mode is a non preemptive mode; if a result of the determining is that the current preemptive mode is the non preemptive mode, cause the system call to be executed asynchronously; and if a result of the determining is that the current preemptive mode is not the non preemptive mode, cause the system call to be executed synchronously. 11. The apparatus of claim 1 , further comprising a preemptive hardware (HW) manager configured to set a Translation Lookaside Buffer (TLB) lockdown dynamically according to the current preemptive mode so that a task requiring real-time processing is not flushed from the TLB. 12. A method of dynamically controlling a preemption section of a kernel, wherein the preemption section is a section of the kernel in which a process currently being executed may be preempted to enable another process to be executed, the method comprising: monitoring whether a system context has changed; upon determining that the system context has changed, setting a current preemptive mode according to the changed system context to dynamically control the preemption section of the kernel, wherein the current preemptive mode determines whether processing efficiency or real-time processing will be prioritized; and determining, upon reaching a preemption point in execution of a kernel service routine of the kernel, whether to check whether a current thread needs to be rescheduled, based on the current preemptive mode; and upon determining that the current thread needs to be rescheduled, reschedule the current thread. 13. The method of claim 12 , wherein the current preemptive mode is one of a non preemptive mode, a general preemptive mode, or a fully preemptive mode; and the non preemptive mode, the general preemptive mode, and the fully preemptive mode are classified according to a degree to which the system context requires real-time processing. 14. The method of claim 13 , wherein each of the non preemptive mode, the general preemptive mode, and the fully preemptive mode is sub-classified into a plurality of preemption levels according to a degree to which the system context requires real-time processing; and the setting of the current preemptive mode comprises setting a preemptive level for the current preemptive mode among the preemptive levels of the current preemptive mode to dynamically control the preemption section of the kernel. 15. The method of claim 12 , further comprising dynamically changing a method of processing an Interrupt Service Routine (ISR) according to the current preemptive mode. 16. The method of claim 15 , wherein the dynamically changing of the method of processing the ISR comprises: when a hardware interrupt is generated, checking the current preemptive mode; if the current preemptive mode is a non preemptive mode, causing the ISR to continue to be executed in an interrupt context mode; and if the current preemptive mode is not the non preemptive mode, causing the ISR to be executed in an interrupt thread mode. 17. The method of claim 12 , wherein the preemption point comprises a code section for checking whether a current thread needs to be rescheduled; and the determin

Assignees

Inventors

Classifications

  • G06F9/4887Primary

    involving deadlines, e.g. rate based, periodic · CPC title

  • G06F9/54Primary

    Interprogram communication · CPC title

  • Program initiating; Program switching, e.g. by interrupt · CPC title

  • G06F9/22Primary

    Microcontrol or microprogram arrangements · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US9424105B2 cover?
An apparatus for dynamically controlling a preemption section includes a preemption manager configured to monitor whether a system context has changed, and if the system context has changed, set a current preemptive mode according to the changed system context to dynamically control a preemption section of a kernel. Therefore, even when an application requiring real-time processing, such as a h…
Who is the assignee on this patent?
Samsung Electronics Co Ltd
What technology area does this patent fall under?
Primary CPC classification G06F9/4887. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Aug 23 2016 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 8 related publications on this page (citations in our corpus or others sharing the same primary CPC).