77280

THREAD EFFICENCY ON SHARED MEMORY SYSTEMS

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

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

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...

Английский

2015-02-02

22.5 KB

0 чел.

THREAD EFFICENCY ON SHARED MEMORY SYSTEMS

M.O. Bakhterev

IMM UrB RAS

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.


 

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

12626. Робота з інформаційно-довідковою системою «Контакти» 642.81 KB
  Звіт з лабораторноі роботи № 3 Робота з інформаційнодовідковою системою Контакти з предмета САОЕІ Мета роботи: вивчити призначення і можливості інформаційнодовідкової системи КОНТАКТИ. Хід виконання роботи: Вибрала власника програми для вводу влав
12627. Знайомство з програмою Фінансист 767 KB
  Лабораторна робота 4. Тема: Знайомство з програмою Фінансист. Мета : Проведення фінансового аналізу стану та результатів діяльності підприємства використовуючи стандартну фінансову звітність: Баланс та Звіт про фінансові результати ПСБО 2 і 3 відповідно а також дод
12628. Програмний засіб Система: Кадри 1.04 MB
  Звіт з лабораторної роботи № 5 Програмний засіб Система: Кадри з предмета САОЕІ Мета роботи:набути практичних навичок роботи з автоматизованою системою кадрового обліку Кадры навчитися вести безперервний облік персоналу підприємства і кадрового резерву...
12629. Бизнес-план, Организация коллекторского агентства 159.5 KB
  В настоящее время в нашей стране имеются уникальные условия для организации нового вида бизнеса: агентств по сбору просроченной задолженности от юридических и физических лиц (далее именуемые коллекторскими агентствами).
12633. Неуравновешенность роторов и их балансировка 329 KB
  В ней рассматриваются условия рационального подбора масс звеньев механизма, которые обеспечили бы полное или частичное уменьшение динамических давлений на некоторые кинематические пары механизма...
12634. Методы и средства контроля линейных величин Универсальные измерительные инструменты 4.62 MB
  ЛАБОРАТОРНАЯ РАБОТА №2 Методы и средства контроля линейных величин Универсальные измерительные инструменты. Цель работы: изучить методы и средства контроля линейных величин освоить методику измерений при помощи универсальных измерительных инструментов. К унив...