The kernel keeps the initial thread around until

This preview shows page 11 - 13 out of 16 pages.

The kernel keeps the initial thread around until every thread has exited. This ensures the visibility of the process in /proc , and ensures signal delivery as well. The kernel has been extended to handle arbitrary number of threads. The PID space has been extended to a maximum of 2 billion threads on IA-32, and the scalability of massively-threaded workloads has been improved significantly. The /proc filesystem had to be fixed to support more than 64k processes. The way the kernel signals termination of a thread makes it possible for pthread join to return after the child is really dead. I.e., all TSD destructors ran and the stack memory can be reused which is important if the stack was allocated by the user. 7 Results This section presents the results of two completely different measurements. The first set is a measurement of the time needed for thread creation and destruction. The second measurement concerns itself with measuring the handling of lock contention. Thread Creation and Destruction Timing What is measured is simply the time to create and destroy threads, under various con- ditions. Only a certainly, variable number of threads exist at one time. If the maximum number of parallel threads is reached the program waits for a thread to terminate be- fore creating a new one. This keeps resource requirements at a manageable level. New threads are created by possibly more than one thread; the exact number is the second variable in the test series. The tests performed were: 11
Image of page 11

Subscribe to view the full document.

Draft for 1 to 20 toplevel threads creating new threads create for each toplevel thread up to 1 to 10 children The number of times we repeated the thread creation operation is 100,000 – this was only done to get a measurable test time and should not be confused with earlier ’start up 100,000 parallel threads at once’ tests. The result is table with 200 times. Each time is indexed with the number of toplevel threads and the maximum number of threads each toplevel thread can create before having to wait for one to finish. The created threads do no work at all, they just finish. We summarize the result of the benchmark runs in two tables. In both cases we flatten one dimension of the measurement result matrix with a minimal function. Figure 1 shows the result for the different number of toplevel threads creating the actual threads we count. The value used is the minimal time required of all the runs with different numbers of threads which can run in parallel. What we can see is the NGPT is indeed a significant improvement over Linux- Threads; NGPT is twice as fast. The thread creation process of LinuxThreads was really complicated and slow. What might be surprising is that a difference to NPTL is so large (a factor of four). The second summary looks similar. Figure 2 shows the minimum time needed based on the number of toplevel threads. The optimal number of threads which are used by each toplevel thread determines the time. In this graph we see the scalability effects. If too many threads in parallel try to create even more threads all implementations are impacted, some more, some less.
Image of page 12
Image of page 13
You've reached the end of this preview.
  • Spring '12
  • GwangS.Jung
  • Native POSIX Thread Library, POSIX

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern