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
basic advantage of using interrupt initiated data transfer over transfer under program control without an interrupt

Define the Communications Techniques - Application interaction protocols    Communications techniques are well defined. They give developer the programmatic mechanism to transf

When we download a movie from the Internet, we don't care about, say, packet sizes. However, even ifwe are not aware of howlow-level details of networks are implemented, our data i

The performance of a file system depends upon the cache hit rate (fraction of blocks found in the cache). If it takes 1 msec to satisfy a request from the cache, but 40 msec to sat

What is the use of boot block? For a computer to begin running when powered up or rebooted it requires having an initial program to run. This bootstrap program tends to be easy

What is a semaphore? A semaphore 'S' is a synchronization tool which is  an integer value that, apart from initialization, is accessed only by two standard atomic operations; w

The term IPC (Inter-Process Communication) defines several paths by which different process executing on some operating system interact between each other.

4. Describe priority scheduling algorithm. Consider the following set of processes. Show the order in which the algorithm will schedule these processes. Assume preemptive and non-p

Explain about demand paging? A demand paging system is same to a paging system with swapping. Processes reside on secondary memory. When we require executing a process, we chan

1. Suggest some mechanism(s) to lower the dispatch latency while scheduling for a real-time system. Also, discuss any trade-off or consequent constraint associated with it, if a