Научная статья

Информатика, кибернетика и программирование

Bkhterev IMM UrB RS It is trdition to think tht computtion decomposition into tsks executed in prllel on the shred memory systems is more effective with threds but not with processes. Usully this point of view grounds on tht the switching cpu execution context between processes is more expensive thn the switching between threds. If it is specified then it is execution context ssocited wit TLB Trnsltion Lookside Buffer which should be reset nd filled with new vlues when the processor is being switched between execution of different...



22.5 KB

0 чел.


M.O. Bakhterev


It is tradition to think that computation decomposition into tasks executed in parallel on the shared memory systems is more effective with threads, but not with processes. Usually this point of view grounds on that the switching cpu execution context between processes is more expensive than the switching between threads. But telling about such an expenses they rarely specify what exactly this execution context is. If it is specified, then it is execution context associated wit TLB (Translation Lookaside Buffer), which should be reset and filled with new values when the processor is being switched between execution of different processes, and which may be left unmodified when being switched between threads of the same process. However, such reasoning does not take following into account.

1. The majority of processor architectures with virtual memory support allows to store in TLB translations for different processes. It is achieved with support of segmentation or address space management logic. And so was SPARC processors, in operating system for which (SunOS 4.x) for the first time there was introduced support for modern version of threads. Most likely, SUN Microsystems suggested thread support indeed to solve the problem with excessively high overhead of switching execution context between processes. But that context was associated not with TLB, but with processor's caches, which was virtually addressed. Such a caches are rarely found in modern processors.

2. TLB capacity is limited. So the processing of large volumes of data, which usually emerge in supercomputations, demands intensive updates of TLB during calculation in the case of threads usage too.

3. A common address space, assumed by the threads execution semantic, costs «nothing» only when threads are executed on uniprocessor (one TLB). When threads are executed on the set of many processors, for every operation with address space: memory allocation and freeing, stack expansion -- the coordinated TLB management on all processors, involved in computation, is needed. And that management demands execution of critical sections and even threads interruption in some cases (for instance, memory deallocation). Besides, additional overhead may be connected with common address space structure complexity. Even the program does not assume shared access to some areas of that space, their allocation and release should be coordinated between threads. Each allocation herewith complicates the space structure and increases execution time of the subsequent operations with memory.

Thus, there are two overhead kinds associated with threads and processes. From processes' side: greater operations with TLB intensity. From threads': additional complexity of common address space support. It is not clear a priori, which mathematical model allows to decide, which kind of overhead is less expensive. So we compared this overheads experimentally. For that purpose there were written multithreaded and multiprocessed versions of programs for four different computational loads: the multiplication of row-stored and tile-stored matricies, memory management, calculation with intensive data exchange. Our results shows, that in many cases threads are not only less effective tool for computation decomposition into tasks, but are significantly lose this efficiency to processes.


А также другие работы, которые могут Вас заинтересовать

70298. Розробка бази знань експертної системи 427 KB
  Експертні системи - це клас комп’ютерних програм, які пропонують рекомендації, проводять аналіз, виконують класифікацію, дають консультації і ставлять діагноз. Вони орієнтовані на розв’язування задач, вирішення яких вимагає проведення експертизи людиною-спеціалістом.
70299. Введение в экономическую теорию. Функции и методы экономической теории 1.11 MB
  Альфред маршал ввел понятие спрос и предложение исследовал факторы воздействующие на них разработал концепцию эластичности спроса и предложения. Сформулировал законы спроса и предложения доказал что рыночная цена есть результат взаимодействия спроса и предложения.
70300. Операции с символами, строками, фрагментами 33.5 KB
  Клавиша Пробел вставляет символ «пробел» между другими символами, на место пробела можно затем вписать другой символ, т.е. эта клавиша как бы производит раздвижку символов. В случае если в слове пропущена буква, ее можно вставить вместо пробела после «раздвижки».