Language selection

Search

Patent 2459123 Summary

Third-party information liability

Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.

Claims and Abstract availability

Any discrepancies in the text and image of the Claims and Abstract are due to differing posting times. Text of the Claims and Abstract are posted:

  • At the time the application is open to public inspection;
  • At the time of issue of the patent (grant).
(12) Patent: (11) CA 2459123
(54) English Title: METHOD AND SYSTEM FOR DETECTING POTENTIAL DEADLOCKS IN COMPUTER PROGRAMS
(54) French Title: METHODE ET SYSTEME DE DETECTION DES IMPASSES POTENTIELLES DES PROGRAMMES INFORMATIQUES
Status: Expired
Bibliographic Data
(51) International Patent Classification (IPC):
  • G06F 9/52 (2006.01)
  • G06F 11/00 (2006.01)
(72) Inventors :
  • DUNK, CRAIG (Canada)
  • DAHMS, JOHN F.A. (Canada)
(73) Owners :
  • RESEARCH IN MOTION LIMITED (Canada)
(71) Applicants :
  • RESEARCH IN MOTION LIMITED (Canada)
(74) Agent: SMART & BIGGAR LP
(74) Associate agent:
(45) Issued: 2008-10-28
(22) Filed Date: 2004-02-26
(41) Open to Public Inspection: 2005-08-26
Examination requested: 2004-02-26
Availability of licence: N/A
(25) Language of filing: English

Patent Cooperation Treaty (PCT): No

(30) Application Priority Data: None

Abstracts

English Abstract

A system and method for detecting potential deadlocks during the run-time execution of a multithreaded computer program. Requests for access to shared resources are tracked and evaluated to determine whether a present request could prove cyclical with a previous set of requests. As each request is made, the identity of any previously requested and unreleased resources is recorded in a data element associated with the currently requested resource. Data elements associated with the previously requested and unreleased resources are read to assess whether they identify the currently requested resource in previously executed lock sequences, thereby indicating a potential cycle and, thus, a deadlock. In an embodiment related to locking of mutually exclusive resources, a request is a request to lock the resource, and the resource is released by unlocking.


French Abstract

Un système et une méthode de détection des impasses potentielles pendant l'exécution d'un programme informatique multifil. Des demandes d'accès à des ressources partagées sont suivies et évaluées afin de déterminer si une demande en cours pourrait être cyclique par rapport à un ensemble de demandes précédent. Pour chaque demande effectuée, l'identité des ressources préalablement demandées et non accordées est enregistrée dans un élément de donnée associé à la demande de ressource en cours. Les éléments de données associés aux ressources préalablement demandées et non accordées sont lus afin de vérifier s'ils reconnaissent la ressource demandée dans des séquences de blocage préalablement exécutées, indiquant ainsi un cycle potentiel et, donc, une impasse. Dans une forme de réalisation connexe au blocage de ressources mutuellement exclusives, une demande concerne le blocage de la ressource et ladite ressource est accordée en la débloquant.

Claims

Note: Claims are shown in the official language in which they were submitted.




-14-

WHAT IS CLAIMED IS:


1. A method of detecting potential deadlocks in a multithreaded computer
program during execution of said computer program on a computer system, said
computer system having a plurality of resources and said computer program
including a plurality of requests for access to one or more of said resources,
said
method comprising the steps of:

receiving one of said requests for access to a selected resource,

reading a list comprising previously requested and unreleased resources;
recording said previously requested and unreleased resources as a lock
sequence in a data element associated with said selected resource;
reading data elements associated with said previously requested and
unreleased resources, said data elements comprising prior lock
sequences; and

generating a deadlock indicator if said selected resource appears in one
of said data elements associated with said previously requested and
unreleased resources.


2. The method claimed in claim 1, wherein said requests for access include
a request to lock a resource, and said previously requested and unreleased
resources include currently locked resources.


3. The method claimed in claim 1, wherein said list includes a stack of
previously requested and unreleased resources, and wherein said steps of
reading said list and recording include reading said stack and recording the
contents of said stack in said data element associated with said selected
resource.


4. The method claimed in claim 3, further including a step of recording said
selected resource in said stack.


5. The method claimed in claim 1, wherein said request for access to said



-15-

selected resource is generated by a thread of said computer program and said
previously requested and unreleased resources include resources requested by
said thread and not released prior to said request for said selected resource.


6. The method claimed in claim 5, wherein at least one of said data
elements includes a request sequence, said request sequence including
resources requested by a previous thread of said computer program, and
wherein said step of generating includes generating said potential deadlock
indicator if said resources requested by said previous thread include said
selected resource.


7. The method claimed in claim 1, wherein said step of generating includes
writing information to an object to identify the potential deadlock.


8. A computer system for detecting a potential deadlock in a multithreaded
computer program executing upon said computer system, said computer system
comprising:

(a) a plurality of resources, wherein said computer program includes a
plurality of requests for access to one or more of said resources;
(b) list of previously requested and unreleased resources;

(c) means for receiving one of said requests for access to a selected
resource;

(d) means for reading said list;

(e) means for recording said list of previously requested and unreleased
resources as a lock sequence in a data element associated with said
selected resource;

(f) means for reading data elements associated with said previously
requested and unreleased resources, said data elements comprising
prior lock sequences; and

(g) means for generating a deadlock indicator if said selected resource



-16-

appears in one of said data elements associated with said previously
requested and unreleased resources.


9. The computer system claimed in claim 8 wherein said requests for access
include a request to lock a resource, and said previously requested and
unreleased resources include currently locked resources.


10. The computer system claimed in claim 8, wherein said list includes a
stack of previously requested and unreleased resources, and wherein said
means for recording includes means for reading said stack and recording the
contents of said stack in said data element associated with said selected
resource.


11. The computer system claimed in claim 10, wherein said means for
recording further includes means for recording said selected resource in said
stack.


12. The computer system claimed in claim 8, wherein said request for access
to said selected resource is generated by a thread of said computer program
and
said previously requested and unreleased resources include resources
requested by said thread and not released prior to said request for said
selected
resource.


13. The computer system claimed in claim 12, wherein at least one of said
data elements includes a request sequence, said request sequence including
resources requested by a previous thread of said computer program, and
wherein said means for generating include means for generating said potential
deadlock indicator if said resources requested by said previous thread include

said selected resource.


14. A computer software product having a computer-readable medium
tangibly embodying computer executable instructions for detecting potential
deadlocks in a multithreaded computer program during execution of said
computer program on said computer system, said computer system having a



-17-

plurality of resources and a list of previously requested and unreleased
resources and said computer program including a plurality of requests for
access
to one or more of said resources, the computer executable instructions
comprising:

(a) computer executable instructions for receiving one of said requests for
access to a selected resource;

(b) computer executable instructions for reading said list;

(c) computer executable instructions for recording said previously
requested and unreleased resources as a lock sequence in a data
element associated with said selected resource;

(d) computer executable instructions for reading data elements associated
with said previously requested and unreleased resources said data
element comprising prior lock sequences; and

(e) computer said data elements comprising prior lock sequences
executable instructions for generating a deadlock indicator if said
selected resource appears in one of said data elements associated
with said previously requested and unreleased resources.


15. The computer software product claimed in claim 14, wherein said
requests for access include a request to lock a resource, and said previously
requested and unreleased resources include currently locked resources.


16. The computer software product claimed in claim 14, wherein said list
includes a stack of previously requested and unreleased resources, and wherein

said computer executable instructions for recording include computer
executable
instructions for reading said stack and recording the contents of said stack
in
said data element associated with said selected resource.


17. The computer software product claimed in claim 16, further including
computer executable instructions for recording said selected resource in said
stack.


-18-
18. The computer software product claimed in claim 14, wherein said request
for access to said selected resource is generated by a thread of said computer
program and said previously requested and unreleased resources include
resources requested by said thread and not released prior to said request for
said selected resource.

19. The computer software product claimed in claim 18, wherein at least one
of said data elements includes a request sequence, said request sequence
including resources requested by a previous thread of said computer program,
and wherein said computer executable instructions for generating include
computer executable instructions for generating said potential deadlock
indicator,
if said resources requested by said previous thread include said selected
resource.

Description

Note: Descriptions are shown in the official language in which they were submitted.



CA 02459123 2004-02-26
METHOD AND SYSTEM FOR DETECTING POTENTIAL
DEADLOCKS IN COMPUTER PROGRAMS
FIELD OF THE INVENTION
[0001]The present invention relates to computer programming and, in
particular,
to a method and system for the detection of potential deadlocks in computer
programs.
BACKGROUND OF THE INVENTION
[0002] Multithreaded processing of computer programs has become increasingly
common as more popular operating systems provide support for multithreaded
processing. A thread is a portion of a computer program that may be logically
executed in parallel with another portion of the program. Multithreading
allows
for the effective utilization of processor resources when executing a computer
program by having a separate process utilize clock cycles that would otherwise
go unused by a concurrently executing process. Operating systems that support
multithreaded processing typically include a scheduler for coordinating the
processing of multiple threads.
[0003]A computer system executing a multithreaded computer program often
includes shared resources, such as program objects, to which more than one
thread will require access. To address this conflict, many shared resources
are
capable of being locked by a thread, preventing other threads from accessing
the
resource until it is unlocked. Such a shared resource is sometimes referred to
as
a mutual exclusion object ("mutex").
[0004]A problem that arises with multithreaded computer programs is that two
or
more threads may include a certain sequence of locks and unlocks upon shared
resources that, if executed in a particular sequence relative to each other,
could
result in a deadlock. The scheduler typically ensures only the order of events


CA 02459123 2004-02-26
-2-
within each thread, but not the timing of particular events as between
threads.
Accordingly, the timing of the processing of two threads relative to each
other
can result in "freeze" or "lock up" behavior, which may only be exhibited
intermittently.
[0005jReference is made to Figure 1 which shows a diagram illustrating a
potential deadlock situation involving two threads of a computer program. A
first
thread 120 and a second thread 140 both require access to a first resource 100
and a second resource 110. The sequence of steps in the first thread 120
includes a first step 122 of locking the second resource 110 and a second step
124 of locking the first resource 100. The second thread 140 includes steps in
the opposite sequence: a first step 142 locks the first resource 100 and a
second
step 144 locks the second resource 110. Both threads have subsequent steps
for performing some processing action 126, 146, and unlocking the shared
resources 128, 130, 148, and 150.
[0006j It will be appreciated that the threads 120, 140 may be executed in
many
cases without encountering any problems; however, if the threads 120, 140 are
executed such that the two first steps 122, 142 in each thread 120, 140 are
executed one after the other, a deadlock situation will result. For example,
if the
first thread 120 locks the second resource 110 and then the second thread 140
locks the first resource 100, neither thread 120, 140 will be capable of
advancing
to the second steps 124, 144 since neither can ever gain access to the other
shared resource.
[0007jThe conventional tool for identifying deadlocks in computer programs is
a
graphical analysis of the source code to generate a "resource dependency
graph". If the graph is cyclical, a potential deadlock is identified. This
technique
is usually performed by hand, and is therefore time-consuming and complicated.
[0008] Potential deadlocks are difficult to identify during run-time execution
of the
computer program since the errors only arise intermittently. Accordingly, a
brute
force work-around that is commonly employed is to use a timeout value on the


CA 02459123 2004-02-26
-3-
shared resource lock. This solution fails to actually identify and fix the
deadlock
problem.
[0009]A similar problem of deadlocking may be encountered when a wait-trigger
event occurs relative to a lock event, wherein one thread has locked a
resource
and is stalled at a wait function awaiting a trigger event while a second
thread
needs access to the resource before the trigger event can occur, thereby
freezing operation of both threads.
[0010]An automated method of detecting potential deadlocks in a computer
program that addresses, at Least in part, these shortcomings would be
advantageous.
SUMMARY OF THE INVENTION
[0011]The present invention provides a method of detecting a potential
deadlock
during execution of a computer program that identifies the occurrence of
complementary inverse lock sequences on different threads. The method
records sequenced requests for access to resources and assesses whether
previous sequences of requests reveal a potential deadlock situation.
[0012] In one aspect, the present invention provides a method of detecting
potential deadlocks in a multithreaded computer program during execution of
the
computer program on a computer system, the computer system having a
plurality of resources and the computer program including a plurality of
requests
for access to one or more of the resources. The method includes the steps of
receiving one of the requests for access to a selected resource, recording a
list
of previously requested and unreleased resources in a data element associated
with the selected resource, reading data elements associated with the
previously
requested and unreleased resources, and generating a deadlock indicator if the
selected resource appears in one of the data elements associated with the
previously requested and unreleased resources.


CA 02459123 2004-02-26
-4-
(0013] In another aspect the present invention provides a method of detecting
potential deadlocks in a multithreaded computer program during execution of
the
computer program on a computer system, the computer system having a
plurality of shared resources. The method includes the steps of recording a
request sequence evidencing a first sequence of two or more of the resources
concurrently requested by a first thread of the computer program, identifying
a
second sequence of at least two resources concurrently requested by a second
thread of the computer program, and determining whether the at least two
resources in the second sequence are included, in inverse order, in the first
sequence and, if so, generating a potential deadlock indicator.
[0014] In another aspect, the present invention provides a method of detecting
potential deadlocks in a multithreaded computer program during execution of
the
computer program on a computer system, the computer system having a
plurality of resources. The method includes the steps of receiving a request
for
access to a selected resource, receiving a request to wait for an event,
determining whether the selected resource has been released, and generating a
potential deadlock indicator if the selected resource has not been released.
[0015] In a further aspect, the present invention provides a computer system
for
implementing any of above-described methods. In yet a further aspect, the
present invention provides a computer software product having a computer-
readable medium tangibly embodying computer executable instructions for
implementing any of the above-described methods.
[0016] Other aspects and features of the present invention will be apparent to
those of ordinary skill in the art from a review of the following detailed
description
when considered in conjunction with the drawings.
BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Reference will now be made, by way of example, to the accompanying


CA 02459123 2004-02-26
-5-
drawings which show an embodiment of the present invention, and in which:
[0018] Figure 1 shows a diagram illustrating an example of a potential
deadlock
situation involving two threads of a software program;
[0019] Figure 2 shows a flowchart depicting a method for detecting potential
deadlocks according to the present invention;
[0020] Figures 3a to 3f show, in block diagram form, an illustration by way of
an
example of the steps taken by an embodiment of the present invention; and
[0021]Figure 4 shows a flowchart depicting another method for detecting
potential deadlocks according to the present invention.
[0022]Similar reference numerals are used in different figures to denote
similar
components.
DESCRIPTION OF SPECIFIC EMBODIMENTS
[0023]The following description of one or more specific embodiments of the
invention does not limit the implementation of the invention to any particular
computer language or computer operating system. Any limitations presented
that result from a particular computer language or a particular operating
system
are not intended as limitations of the present invention.
[0024] Reference is first made to Figure 2, which shows a flowchart of a
method
200 for detecting potential deadlocks according to the present invention.
[0025] If the author of an implementation of the method 200 has editorial
control
of the operating system, such as in the case of a system based upon open
source code, existing functions for locking shared resources may be modified
so
as to incorporate additional steps to customize the function without renaming
the
function. For example, in a Java environment, the Java synchronize statement
is
typically employed to lock a shared resource. If the developer has access to
the
code for a Java Virtual Machine (JVM), the method 200 may be implemented


CA 02459123 2004-02-26
-6-
within the JVM to modify the synchronize statement so as to perform the steps
of
the method 200 in addition to the steps for locking the shared resource that
would normally be taken. This provides the implementation with transparency,
allowing subsequent developers to incorporate the method 200 without requiring
knowledge of a custom function.
[0026] In other computer environments, where the author does not have control
of the existing shared resource functions, it may not be possible to customize
the
existing functions. In these cases, the method 200 may be implemented through
"wrapping" the existing lock function with a new deadlock detection lock
function
that implements the method 200 and calls the existing predefined lock
function.
An example of such an environment is one based upon use of the Microsoft
WindowsT"" operating system by developers other than the Microsoft Corporation
itself.
[0027]The method 200 operates during run-time execution of a computer
program. It is triggered when a thread of the computer program requests access
to a shared resource. When the computer program requests access to a shared
resource a lock function is called (either the customized lock function or the
"wrapped" lock function).
[0028]The method 200 begins in step 202 wherein the identity of the requested
resource is recorded in a list of currently locked resources. Typically, the
operating system for the computer system will maintain a stack or list of
locked
resources. For example, the JVM maintains a list of which resources have been
locked. When the JVM receives a request for a resource it consults this list
to
determine whether or not access to the resource should be granted to the
requester based upon whether or not the resource is already locked. This step
202 is a step which would be taken by the conventional lock function to lock
the
requested resource.
[0029] If the method 200 is implemented in a 'wrapper' function, it may be
necessary to maintain a separate data structure identifying which resources
have


CA 02459123 2004-02-26
-7-
been locked.
(0030] In step 204, the stack or list of locked resources is read to determine
which resources were locked and have not yet been unlocked prior to the
current
resource request. At step 206, this list of prior locked and unreleased
resources
is written to a data element or structure associated with the requested
resource.
In other words, for each shared resource there is an associated persistent
data
element that records which other shared resources have been locked and not
released each time an attempt is made to lock the resource. This results in a
set
of records of sequential lock operations contained in the computer program.
[0031]In one embodiment, implemented in a Java environment, the associated
data structure is the requested object itself. Other embodiments include a
separate data object associated with each shared resource.
[0032]The method 200 then continues at step 208 wherein, for each currently
locked and unreleased resource, its associated record of antecedent requests,
i.e. previous sequential lock operations, is read. The associated record for
each
locked resource may contain only antecedent requests made during processing
of the current thread, or it may contain multiple sequences reflecting
multiple
requests to access the resource made by multiple threads.
[0033] In step 210, an assessment is made as to whether the requested resource
appears in the associated records for currently locked and unreleased
resources.
If it does, then it indicates a potential cycle, which could result in a
deadlock
situation. Accordingly, if the requested resource is identified in the
associated
records of locked and unreleased resources, then at step 212 a potential
deadlock indicator is generated. At step 214, execution of the computer
program
is continued.
[0034]The generation of a potential deadlock indicator may include writing the
potential deadlock to a log file or otherwise identifying the portion of the
computer program code that resulted in the potential deadlock. It may also


CA 02459123 2004-02-26
include displaying an error message and it may include halting execution of
the
computer program. Other mechanisms for alerting the computer program
developer to the identification of a potential deadlock will be apparent to
those of
ordinary skill in the art.
[0035] It will be appreciated that the method 200 according to the present
invention attempts to detect potential resource dependency cycles in the
computer program during run-time execution of the program by recording partial
resource lock sequences for each requested resource. With each resource
request, prior lock sequences for resources already locked and not released
are
analyzed to ensure that the requested resource does not appear in a prior lock
sequence. If it does, then a potential deadlock scenario is identified.
[0036] In this manner, the present invention identifies when the computer
program performs a sequential lock of, for example, (A ... B~, and it assesses
whether or not the sequence (B ... A) has previously been encountered on
another thread. If it has, then there is the potential for a deadlock to
occur.
[0037] It will be understood that many of the steps of the method 200 may be
performed in an alternative order without affecting the resulting
determination as
to whether a potential deadlock exists.
[0038] It will also be appreciated that the method 200 according to the
present
invention does not require that an actual deadlock occur in order to identify
a
potential deadlock.
[0039] Reference is now made to Figures 3a through 3f, which show, in block
diagram form, an illustration by way of an example of the steps taken by an
embodiment of the present invention.
[0040] In the example shown in Figures 3a through 3f, a computer system 320
includes four shared resources A, B, C, and D, designated with reference
numerals 302a, 302b, 302c, and 302d, respectively. Each of the shared
resources 302 has an associated data element 304 for storing a list of


CA 02459123 2004-02-26
_g_
antecedent lock sequences. In one embodiment, the data elements 304 are
incorporated within the associated resource 302.
[0041]Also present on the computer system 320 is a list 306 of resources
currently locked. The list 306 may be maintained and controlled by the
operating
system of the computer system 320 or it may be a data structure or object
created and stored on computer system 320 by a module or function
implementing the method 200 (Fig. 2) according to the present invention.
[0042]As shown in Figure 3a, a first thread (not shown) has locked resource A
302a, as indicated by the heavy outline. Accordingly, the identity of resource
A
appears in the list 306 of locked resources.
[0043] Next, as shown in Figure 3b, the first thread locks resource B 302b.
The
identity of resource B is added to the list 306 of locked resources. Resource
A
302a remains locked. Moreover, the identity of resource A is recorded in the
data element 304b associated with resource B 302b, since the list 306
indicates
that resource A 302a was locked and not yet unlocked when the first thread
requested access to resource B 302b.
[0044] Reference is now made to Figure 3c, which shows that the first thread
then locks resource D 302d. Accordingly, the identity of resource D is added
to
the list 306 of locked resources and the identities of resources A and B 302a,
302b are added to the data element 304d associated with resource D 302d.
This evidences the fact that resource D 302d was requested by the first thread
at
a time when the first thread had already locked resources A and B 302a, 302b.
[0045] It is now supposed that the first thread unlocks the locked resources
A, B,
and D 302a, 302b, and 302d. At some point in the computer program execution,
a second thread (not shown) locks resource D 302d, as shown in Figure 3d. The
lock sequence data, AB, from the processing of the first thread continues to
exist
in the data element 304d associated with resource D 302d. The list 306 of
locked resources is updated to record the fact that resource D 3024 has been


CA 02459123 2004-02-26
-10-
locked.
[0046]As shown in Figure 3e, the second thread then locks resource C 302c.
The identity of resource C 302c is added to the list 306 of locked resources
and
the fact that resource D 302d has already been locked by the second thread is
recorded in the data element 302c associated with resource C 302c.
[0047] Resource D 302d was on the list 306 of currently locked resources prior
to
the request to lock resource C 302c, so the contents of the data element 304d
associated with the currently locked resource D 302d are read to determine
whether or not a previous thread has performed a locking sequence that locked
resource C 302c prior to locking resource D 3024. The associated data element
304d identifies a lock sequence of AB. Because resource C 302c does not
appear in the data element 304d, thus far the lock sequences implemented by
the computer program are acyclical, indicating that no potential deadlock
exists.
[0048] Reference is now made to Figure 3f, which illustrates that the second
thread next locks resource B 302b. Accordingly, the identity of resource B
302b
is added to the list 306 of locked resources. The currently locked resources,
resource D 302d and resource C 302c, are added to the data element 304b
associated with resource B 302b. Thus the data element 304b for resource B
302b now includes two lock sequence records: one corresponding to the first
thread, and one corresponding to the second thread.
[0049]The data elements 304c and 304d associated with the previously locked
and not yet unlocked resources C and D 302c, 302d are then read to assess
whether the requested resource, resource B 302b, appears in prior lock
sequences. It will be seen that the data element 304c corresponding to
resource
C 302c contains only the identity of resource D 302d; however, the data
element
304d corresponding to resource D 302d contains the lock sequence AB.
Therefore, it is apparent that resource B 302b was locked prior to resource D
302d by a different thread, whereas the present thread has locked resource D
302d prior to resource B 302b. Accordingly, a potential deadlock has been


CA 02459123 2004-02-26
-11-
identified. In accordance with step 212 (Fig. 2) of the method 200 (Fig. 2),
an
appropriate deadlock indicator is generated.
[0050]Although the method 200 as illustrated by the example shown in Figure 3
records the complete lock sequence in the data element 304 associated with a
requested resource 302, it will be appreciated that in another embodiment only
the identity of the immediately preceding locked resource could be recorded in
the associated data element 304. In this embodiment, the invention recursively
steps back through the data elements 304 of preceding locked resources to
trace the lock sequence and identify any potential deadlocks. Based upon the
foregoing description, other methods and techniques for tracking the
occurrence
of complementary inverse lock sequences on different threads will be apparent
to those of ordinary skill in the art.
[0051]The present invention is not limited to the detection of deadlocks
resulting
from the use of lock functions for accessing mutually exclusive resources. The
invention may also be used to detect potential deadlocks related to "event"
structures. An event includes a function of waiting upon an event and a
complementary function of triggering the event. The wait function is analogous
to a lock and the trigger function is analogous to an unlock. An event
construct
is similar to a lock construct, except whereas a lock-unlock pair occurs
within a
single thread, a wait-trigger pair occurs across separate threads.
[0052]The potential deadlock effect of interacting events and locks across
multiple threads is the same as described above for locks alone. Consider the
following example threads:
THREAD 1 THREAD 2
Lock Mutex A Lock Mutex A
Wait Event B Trigger Event B
Unlock Mutex A Unlock Mutex A
[0053] In the above example, if thread 1 is executed first then Mutex A will
be
locked and the thread will await the triggering of Event B. This trigger can
never


CA 02459123 2004-02-26
-12-
occur because thread 2 cannot access the locked Mutex A. Accordingly, a
deadlock will result.
[0054] Reference is now made to Figure 4, which shows a flowchart depicting
another method 400 for detecting potential deadlocks according to the present
invention. The method 400 of detecting a potential deadlock situation
involving a
wait-trigger event includes a first step 402 of receiving a wait request. The
wait
request has a corresponding trigger event on another thread. The method 400
then includes a second step 404 of assessing whether or not the active thread
has any resources that have been requested and are unreleased when the wait
request is encountered. This step 404 may be performed by consulting the stack
to determine if there are any currently locked resources.
[0055] If there are locked and unreleased resources when the wait request is
encountered, then there is the potential for a deadlock. Accordingly, in the
next
step 406, a deadlock indicator is generated. If there are no locked and
unreleased resources, then the program continues execution 408.
[0056]The method 400 may be rendered more sophisticated by recording the
resource that was locked when the wait request was encountered and then later
assessing whether or not the same resource could be locked during the trigger
event.
[0057]Those of ordinary skill in the art will appreciate that the foregoing
description is not limited to lock functions, and a lock-unlock sequence may
be
generally considered a request and release sequence in relation to a resource.
[0058]The present invention may be embodied in other specific forms without
departing from the spirit or essential characteristics thereof. Certain
adaptations
and modifications of the invention will be obvious to those skilled in the
art.
Therefore, the above discussed embodiments are considered to be illustrative
and not restrictive, the scope of the invention being indicated by the
appended
claims rather than the foregoing description, and all changes which come
within


CA 02459123 2004-02-26
-13-
the meaning and range of equivalency of the claims are therefore intended to
be
embraced therein.

Representative Drawing
A single figure which represents the drawing illustrating the invention.
Administrative Status

For a clearer understanding of the status of the application/patent presented on this page, the site Disclaimer , as well as the definitions for Patent , Administrative Status , Maintenance Fee  and Payment History  should be consulted.

Administrative Status

Title Date
Forecasted Issue Date 2008-10-28
(22) Filed 2004-02-26
Examination Requested 2004-02-26
(41) Open to Public Inspection 2005-08-26
(45) Issued 2008-10-28
Expired 2024-02-26

Abandonment History

There is no abandonment history.

Payment History

Fee Type Anniversary Year Due Date Amount Paid Paid Date
Request for Examination $800.00 2004-02-26
Registration of a document - section 124 $100.00 2004-02-26
Application Fee $400.00 2004-02-26
Maintenance Fee - Application - New Act 2 2006-02-27 $100.00 2006-02-20
Maintenance Fee - Application - New Act 3 2007-02-26 $100.00 2007-02-23
Maintenance Fee - Application - New Act 4 2008-02-26 $100.00 2008-02-21
Final Fee $300.00 2008-08-12
Maintenance Fee - Patent - New Act 5 2009-02-26 $200.00 2009-02-23
Maintenance Fee - Patent - New Act 6 2010-02-26 $200.00 2010-01-13
Maintenance Fee - Patent - New Act 7 2011-02-28 $200.00 2011-01-24
Maintenance Fee - Patent - New Act 8 2012-02-27 $200.00 2012-01-16
Maintenance Fee - Patent - New Act 9 2013-02-26 $200.00 2013-01-09
Maintenance Fee - Patent - New Act 10 2014-02-26 $250.00 2014-01-08
Maintenance Fee - Patent - New Act 11 2015-02-26 $250.00 2015-02-23
Maintenance Fee - Patent - New Act 12 2016-02-26 $250.00 2016-02-22
Maintenance Fee - Patent - New Act 13 2017-02-27 $250.00 2017-02-20
Maintenance Fee - Patent - New Act 14 2018-02-26 $250.00 2018-02-19
Maintenance Fee - Patent - New Act 15 2019-02-26 $450.00 2019-02-25
Maintenance Fee - Patent - New Act 16 2020-02-26 $450.00 2020-02-21
Maintenance Fee - Patent - New Act 17 2021-02-26 $459.00 2021-02-19
Maintenance Fee - Patent - New Act 18 2022-02-28 $458.08 2022-02-18
Maintenance Fee - Patent - New Act 19 2023-02-27 $473.65 2023-02-17
Owners on Record

Note: Records showing the ownership history in alphabetical order.

Current Owners on Record
RESEARCH IN MOTION LIMITED
Past Owners on Record
DAHMS, JOHN F.A.
DUNK, CRAIG
Past Owners that do not appear in the "Owners on Record" listing will appear in other documentation within the application.
Documents

To view selected files, please enter reCAPTCHA code :



To view images, click a link in the Document Description column. To download the documents, select one or more checkboxes in the first column and then click the "Download Selected in PDF format (Zip Archive)" or the "Download Selected as Single PDF" button.

List of published and non-published patent-specific documents on the CPD .

If you have any difficulty accessing content, you can call the Client Service Centre at 1-866-997-1936 or send them an e-mail at CIPO Client Service Centre.


Document
Description 
Date
(yyyy-mm-dd) 
Number of pages   Size of Image (KB) 
Abstract 2004-02-26 1 23
Claims 2004-02-26 10 424
Description 2004-02-26 13 588
Representative Drawing 2005-07-29 1 8
Cover Page 2005-08-09 2 44
Claims 2006-07-17 10 403
Claims 2007-05-17 5 188
Cover Page 2008-10-09 2 45
Fees 2007-02-23 1 29
Assignment 2004-02-26 5 215
Assignment 2004-05-19 4 140
Prosecution-Amendment 2005-01-21 1 40
Prosecution-Amendment 2006-01-17 5 217
Fees 2006-02-20 1 27
Prosecution-Amendment 2007-04-27 3 93
Prosecution-Amendment 2007-05-17 7 244
Fees 2008-02-21 1 36
Correspondence 2008-08-12 1 35
Fees 2009-02-23 1 35
Prosecution Correspondence 2006-07-17 15 635
Drawings 2006-07-17 4 96