Explain the thread local storage (tls), Operating System

Explain the Thread Local Storage (TLS)   

Windows NT provides unique functions for per-thread data management. Thread local storage (TLS) is a concept defined in NT so developers can manage global data independently for each thread. Generally, a mechanism is provided for setting and getting the thread local storage for each thread. Upon process or DLL initialization thread local storage must be initializes via the TlsAllocFunction. This process allocates a TLS table and returns a TLS index that is used with all other TLS functions.

Once initialized, each subsequently created thread would typically allocate memory and save the memory pointer on a per-thread basis. TlsSetValue( ) is used to associate a data pointer with the calling thread. Subsequent access to that thread data would be available via the TlsGetValue( ) function call. When all threads are done with per-thread data management, TlsFree( ) should be issued to release the TLS index.


Posted Date: 5/29/2013 5:51:45 AM | Location : United States

Related Discussions:- Explain the thread local storage (tls), Assignment Help, Ask Question on Explain the thread local storage (tls), Get Answer, Expert's Help, Explain the thread local storage (tls) Discussions

Write discussion on Explain the thread local storage (tls)
Your posts are moderated
Related Questions
Relative file organization A relative file is an array of fixed-length slots and the records can be inserted in the first free slot found from the beginning of the file and

p0A B C D A B C D A B C D 2 0 12 2012 1000 1354 0632 0014

Define what can be used as a criterion for classification of data structures utilized in language processing              Answer: nature of a data structure, lifetime of a dat

Using pages makes it easier to manage the whole memory, avoiding excessive fragmentation and waste. As an analogy, think of Tetris, but with only square blocks: it is relatively ea

What is the main difficulty that a programmer must overcome in writing an operating system for a real-time environment? The main difficulty is keeping the operating system with

Explain Terminal Symbols Terminal symbols are literal strings that are forming the input of a formal grammar and cannot be broken down into smaller units with no losing their l

what are the design issues of network OS

Q. Describe the three main architectural layers of Windows XP? Answer: (1) The HAL (Hardware Abstraction Layer) creates operating system portability by hiding hardware differ

Question 1: (a) Discuss about the evolution of operating systems from mainframe batch systems to mainframe time sharing systems. (b) Explain your understanding of the "sus