Browse Prior Art Database

Providing an Application with Limited Control of Preemption

IP.com Disclosure Number: IPCOM000116407D
Original Publication Date: 1995-Sep-01
Included in the Prior Art Database: 2005-Mar-30
Document File: 2 page(s) / 69K

Publishing Venue

IBM

Related People

Macon, JF: AUTHOR [+3]

Abstract

Disclosed is a method allowing an application to inform an operating system concerning the preemptability of a particular thread. This method provides the developer of an application with a way to indicate, during the operation of the application, that a thread is currently in a piece of critical code. If this thread is preempted, the performance of other applications or threads running on the system may be affected.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Providing an Application with Limited Control of Preemption

      Disclosed is a method allowing an application to inform an
operating system concerning the preemptability of a particular
thread.  This method provides the developer of an application with a
way to indicate, during the operation of the application, that a
thread is currently in a piece of critical code.  If this thread is
preempted, the performance of other applications or threads running
on the system may be affected.

      To implement this method, the operating system provides
Application Program Interfaces (APIs) that return pointers to
non-preemptability flags, on a per-thread or per-process basis.  When
one of these flags is toggled, the time slice of the current thread
is virtually increased.  In a priority-based operating system, these
flags can contain values informing the operating system which
priority a thread must have to preempt the current thread.  The flags
can also be set to a special value indicating that the current thread
cannot be preempted by another thread.  Although these flags effect
preemptability, they do not effect the ability of a thread to yield,
as on a page fault.  When a non-preemptability flag that has been
allocated on a per-thread basis is toggled on, the current thread is
allowed to yield.  When such a thread is restarted, it continues its
extended time slice until the non-preemptability flag is reset.

      Since most advanced operating systems must protect themselves
from "misbehaved" applications, a value is set up in the
configuration file of the operating system to represent the maximum
number of preemptions that may be ignored for a current thread.

      For example, with this method, the application uses an API to
get a point...