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
function of lazy swapper

Page Fault Handling conditions like, where the copy on write bit of a page is set and that page is send by more than one process, the Kernel assign new page and copies the conten

I need help implementing malloc

with the aid of diagrams describe the following os structures monolithic , layered, client server

Describe the differences between foreground and background processing. What advantage does background processing provide? 1. Background processes typically run with little or no

LRU page replacement In slightest recently used page replacement algorithm we will replace that page that hasn't been used for the longest period of time. This is similar as an

idle thread The special thread a dispatcher will run when no ready thread is found. The primary purpose of the idle process and its threads is to remove what would otherwise b

Describe the differences between symmetric and asymmetric multiprocessing. What are three advantages and one disadvantage of multiprocessor systems? Symmetric multiprocessing t

Write a Perl script assignGrades.pl to assign letter grades to the students.

Under what circumstances would a user be better off using a time-sharing system, rather than a personal computer or single-user workstation? When there are some other users, th