Help


[permalink] [id link]
+
Page "Reentrancy (computing)" ¶ 3
from Wikipedia
Edit
Promote Demote Fragment Fix

Some Related Sentences

reentrant and subroutine
In computing, a computer program or subroutine is called reentrant if it can be interrupted in the middle of its execution and then safely called again (" re-entered ") before its previous invocations complete execution.
Any subroutine used by the ISR that could potentially have been executing when the interrupt was triggered should be reentrant.
A subroutine that is directly or indirectly recursive should be reentrant.
However a subroutine can fail to be reentrant if it relies on a global variable to remain unchanged but that variable is modified when the subroutine is recursively invoked.
* Coroutine, generalized reentrant computer subroutine having multiple entry points
One is that each task has its own stack, and thus the subroutine can be reentrant, that is, can be active simultaneously for different tasks doing different things.

reentrant and can
Although in theory the Mach kernel would also have to be reentrant, in practice this isn't an issue because its response times are so fast it can simply wait and serve requests in turn.
There are still some rare cases where non-local state can be used in a reentrant function, if the access is done through atomic operations and the data-structure is reentrant.
The software developed by the staff of the University of Michigan's academic Computing Center for the operation of the IBM S / 360-67, S / 370, and compatible computers can be described as a multiprogramming, multiprocessing, virtual memory, time-sharing supervisor ( University of Michigan Multiprogramming Supervisor or UMMPS ) that handles a number of resident, reentrant programs.
In geometry, a polygon can be either convex or concave ( non-convex or reentrant ).
In a reentrant mutex, the same thread can acquire the lock multiple times.

reentrant and be
Since a CPU designer could hardly guarantee where this code would be located in a future system, the 6809 design focused heavily on support of position-independent, reentrant code that could be freely located anywhere in the memory map.
In a traditional kernel extensive work needs to be carried out to make it reentrant or interruptible, as programs running on different processors could call into the kernel at the same time.
As a consequence of early pervasive design decisions taking advantage of the easily used reentrant object code capabilities of the 6809 processor, programs intended for OS-9 are required to be reentrant ; compilers produce reentrant code automatically and assemblers for OS-9 offer considerable support for it.
The POSIX API is also designed to be reentrant.
Conversely, thread-safe code does not necessarily have to be reentrant ( see below for examples ).
This is an example of a function that fails to be reentrant ( as well as failing to be thread-safe ).
Edelman describes reentry as " a form of ongoing higher-order selection ... that appears to be unique to animal brains " and that " there is no other object in the known universe so completely distinguished by reentrant circuitry as the human brain ".
The modular design of CICS reentrant / reusable control programs meant that, with judicious " pruning ," multiple users with multiple applications could be executed on a computer with just 32K of expensive magnetic core physical memory ( including the operating system ).

reentrant and thread-safe
In the following piece of C code, the function is thread-safe, but not reentrant:

reentrant and .
Another example has been proposed by Gerald Edelman called dynamic core hypothesis which puts emphasis on reentrant connections that reciprocally link areas of the brain in a massively parallel manner.
Program counter relative addressing allowed for the easy creation of position-independent code, while a user stack pointer ( U ) facilitated the creation of reentrant code.
Edelman called it " reentry " and proposes a model of reentrant signaling whereby a disjunctive, multimodal sampling of the same stimulus event correlated in time leads to self-organizing intelligence.
Due to the reentrant nature of TPF programs and the control program, this is made possible as no active piece of work modifies any program.
( Note, however, that in multiprocessing systems, many processes may run off of, or share, the same reentrant program at the same location in memory — but each process is said to own its own image of the program.
This includes any re-entrant arrhythmias that require the AV node for the re-entry, e. g., AV reentrant tachycardia ( AVRT ), AV nodal reentrant tachycardia ( AVNRT ).
* The ability for multiple users to quickly load and use a collection of common reentrant subroutines, which are available in shared virtual memory.
Often, subroutines accessible via the operating system kernel are not reentrant.

subroutine and can
Unlike a " subroutine ", a complete web component can be implemented as an applet.
The array may contain subroutine pointers ( or relative subroutine numbers that can be acted upon by SWITCH statements )-that direct the path of the execution.
Many important restrictions of this type, like checking that identifiers are used in the appropriate context ( e. g. not adding an integer to a function name ), or that subroutine calls have the appropriate number and type of arguments, can be enforced by defining them as rules in a logic called a type system.
VBScript distinguishes between a function, which can return a result in an assignment statement, and a subroutine, which cannot.
; Code factoring: If several sequences of code are identical, or can be parameterized or reordered to be identical, they can be replaced with calls to a shared subroutine.
This can often share code for subroutine set-up and sometimes tail-recursion.
Interrupts and signals are low-level mechanisms that can alter the flow of control in a way similar to a subroutine, but usually occur as a response to some external stimulus or event ( that can occur asynchronously ), rather than execution of an ' in-line ' control flow statement.
In other words, L can be solved in polynomial time by an oracle machine with an oracle for H. Informally, we can think of an algorithm that can call such an oracle machine as a subroutine for solving H, and solves L in polynomial time, if the subroutine call takes only one step to compute.
However, it is often used as a subroutine in another sorting algorithm, radix sort, that can handle larger keys more efficiently.
For example if 50 % of the total execution time ( or path length ) is absorbed in a subroutine whose speed can be doubled by programmer optimization, an overall saving of around 25 % might be expected ( Amdahl law ).
One way of implementing iterators is to use a special kind of subroutine, known as a generator, that can yield values to its caller multiple times ( instead of returning just once ).
Any subroutine can be translated to a coroutine which does not call yield.
* State machines within a single subroutine, where the state is determined by the current entry / exit point of the procedure ; this can result in more readable code.

0.111 seconds.