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
Q) a. Given that the first three necessary conditions for a deadlock are in place, comment on the feasibility of the following strategy. All processes are given  unique priorities.

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

Which are the different states of a process?   Different status of a process is: New: When the process is created. Running: When instructions are executed. Wait

Question: a) The Dynamic Host Control Protocol (DHCP) server is important for setting TCP/IP configuration, when there are a large number of clients on the network. How does D

scattered resposibi;ity and authority -necessity of operation research

Write an application that does the following:(1) fill an array with 50 random integers; (2) loop through the array, displaying each value, and count the number of negative values;

is there any difference between the trap and interrupt??

Q. An operating system sustains a paged virtual memory using a central processor with a cycle time of 1 microsecond. It costs an additional one microsecond to access a page other

Q. List the four steps that are essential to run a program on a completely dedicated machine. Answer: a) Reserve machine time b) Manually load program into memory c)

Semispace works by maintaining two disjoint areas from which memory can be allocated. These areas are called the from-space and the to-space. At ?rst, the algorithm allocates memor