×

System and method for improving run-time performance of applications with multithreaded and single threaded routines

  • US 8,495,662 B2
  • Filed: 09/23/2008
  • Issued: 07/23/2013
  • Est. Priority Date: 08/11/2008
  • Status: Active Grant
First Claim
Patent Images

1. A method for running a mixed single-threaded/multi-threaded (ST/MT) application program linked with a libpthreads library, the method comprising:

  • creating an interceptor library containing pthread application programming interface (pthread_API) call interceptors and loading the interceptor library into the mixed ST/MT application program;

    incrementing or decrementing a thread counter upon each pthread_create call or pthread_exit call, respectively, during run-time;

    triggering a helper thread upon decrementing the thread counter by a predetermined value, wherein the helper thread computes an estimated resulting overhead by determining a duration of time the mixed ST/MT application program runs in an ST program mode by examining sliced versions of the mixed ST/MT application program; and

    running the mixed ST/MT application program on a computer by using light weight (LW) and heavy weight (HW) synchronization routines based on determining switchovers between the ST program mode and an MT program mode, respectively, during run-time using the interceptor library, the mixed ST/MT application program being run in the ST program mode by informing a pthreads library to call the LW synchronization routines or in the MT program mode by informing the pthreads library to call the HW synchronization routines based on the determined duration of time and the estimated resulting overhead, selection between the ST program mode and the MT program mode being based on a value in the thread counter.

View all claims
  • 4 Assignments
Timeline View
Assignment View
    ×
    ×