About: Thread-local storage     Goto   Sponge   NotDistinct   Permalink

An Entity of Type : yago:Structure105726345, within Data Space : dbpedia.demo.openlinksw.com associated with source document(s)
QRcode icon
http://dbpedia.demo.openlinksw.com/describe/?url=http%3A%2F%2Fdbpedia.org%2Fresource%2FThread-local_storage&invfp=IFP_OFF&sas=SAME_AS_OFF

Thread-local storage (TLS) is a computer programming method that uses static or global memory local to a thread. While the use of global variables is generally discouraged in modern programming, legacy operating systems such as UNIX are designed for uniprocessor hardware and require some additional mechanism to retain the semantics of pre-reentrant APIs. An example of such situations is where functions use a global variable to set an error condition (for example the global variable errno used by many functions of the C library). If errno were a global variable, a call of a system function on one thread may overwrite the value previously set by a call of a system function on a different thread, possibly before following code on tha

AttributesValues
rdf:type
rdfs:label
  • Thread-local storage (de)
  • Thread Local Storage (fr)
  • スレッド局所記憶 (ja)
  • Pamięć lokalna wątku (pl)
  • Thread-local storage (en)
  • 线程局部存储 (zh)
  • Локальна пам'ять ниток (uk)
rdfs:comment
  • スレッド局所記憶(英: thread local storage, TLS)は、静的もしくは大域的なメモリをスレッドごとに局所的に使用するためのコンピュータプログラミングの方法である。 プロセス内のスレッドはすべてアドレス空間を共有しており、同じプロセスのスレッドから参照する際、静的変数やグローバル変数は同じメモリ番地に配置される。 一方スタック上の変数はすべてのスレッドが自分のスタックを持つためスレッドに対して局所的であり、異なるメモリ番地に存在する。 同じ静的変数・グローバル変数を参照する二つのスレッドが(変数をスレッドに対して局所的にすることで)実際には異なるメモリ番地を参照できることが望ましい場合がある。たとえば典型的な例としてC言語のエラーコードを格納する変数 errno がある。 少なくともメモリアドレスを格納できるサイズの変数をスレッドに対して局所的にすることが可能なら、メモリブロックを確保し、そのメモリアドレスをスレッドローカルな変数に格納すれば、原理的には任意のサイズのメモリブロックをスレッド局所にすることが可能である。 (ja)
  • 线程局部存储 (TLS) 是一种存储持续期(storage duration),对象的存储是在线程开始时分配,线程结束时回收,每个线程有该对象自己的实例。这种对象的链接性(linkage)可以是静态的也可是外部的。 TLS的一个例子是用全局变量errno表示错误号。这可能在多线程并发时产生同步错误。线程局部存储的errno是个解决办法。 (zh)
  • Thread-local storage (TLS) ist Speicherplatz, der für jeden Thread eines mehrläufigen Prozesses Daten threadspezifisch speichern kann. Variablen mit dem Attribut TLS erhalten für jeden Thread automatisch eine eigene Instanz.Der Compiler erzeugt weiterhin automatisch Code, der Zugriffe auf genau die dem Thread zugeordnete Kopie des TLS erlaubt. TLS kann dazu dienen, Daten vor unbeabsichtigten Änderungen durch andere Threads zu schützen, oder Race Conditions zu verhindern. Codebeispiel für gcc mithilfe des Attributs __thread: __thread int i;extern __thread struct state s;static __thread char *p; (de)
  • Le Thread Local Storage (TLS), ou mémoire locale de thread, est un type de mémoire spécifique et locale à un thread. Ce mécanisme est parfois requis parce que tous les threads d'un même processus partagent le même espace d'adressage. Donc, les données situées dans une variable ou globale sont exactement au même emplacement mémoire pour tous les threads, et correspondent donc à la même entité. Les variables sur la pile sont toutefois locales au thread, parce que chaque thread possède sa propre pile, distincte de celle des autres threads. (fr)
  • Thread-local storage (TLS) is a computer programming method that uses static or global memory local to a thread. While the use of global variables is generally discouraged in modern programming, legacy operating systems such as UNIX are designed for uniprocessor hardware and require some additional mechanism to retain the semantics of pre-reentrant APIs. An example of such situations is where functions use a global variable to set an error condition (for example the global variable errno used by many functions of the C library). If errno were a global variable, a call of a system function on one thread may overwrite the value previously set by a call of a system function on a different thread, possibly before following code on tha (en)
  • Pamięć lokalna wątku (ang. Thread-local storage, TLS) – rozwiązanie używane w programowaniu komputerowym przypisującym pamięć statyczną lub globalną lokalnie do wątku. Takie rozwiązanie bywa niezbędne, ponieważ wszystkie wątki w procesie współdzielą tą samą przestrzeń adresową. Innymi słowy, odnosząc się do zmiennej statycznej lub globalnej, różne wątki tego samego procesu odwołują się do tego samego miejsca w pamięci.Zmienne na stosie są natomiast lokalne dla wątku, ponieważ każdy wątek posiada własny stos, rezydujący w innym miejscu pamięci. (pl)
  • Локальна Пам'ять Потоку (англ. Thread-local storage) — механізм, за допомогою якого в кожному окремому потоці виконання можуть використовуватися власні копії глобальних та статичних змінних. Це буває корисним у деяких випадках, бо всі потоки розділяють одну і ту ж пам'ять свого процесу. Іншими словами, дані, розміщені в статичних чи глобальних змінних, зазвичай завжди розміщені в одному місці, якщо до них звертаються потоки одного процесу. Однак змінні розташовані у стеку є унікальними для потоку, оскільки кожний потік має свій стек, розміщений в окремому блоці пам'яті. (uk)
dcterms:subject
Wikipage page ID
Wikipage revision ID
Link from a Wikipage to another Wikipage
Link from a Wikipage to an external page
sameAs
Faceted Search & Find service v1.17_git139 as of Feb 29 2024


Alternative Linked Data Documents: ODE     Content Formats:   [cxml] [csv]     RDF   [text] [turtle] [ld+json] [rdf+json] [rdf+xml]     ODATA   [atom+xml] [odata+json]     Microdata   [microdata+json] [html]    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 08.03.3330 as of Mar 19 2024, on Linux (x86_64-generic-linux-glibc212), Single-Server Edition (378 GB total memory, 53 GB memory in use)
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2024 OpenLink Software