Explain the thread local storage (tls), Operating System

Assignment Help:

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.

 


Related Discussions:- Explain the thread local storage (tls)

What are conditions under which a deadlock situation arise, What are condit...

What are conditions under which a deadlock situation may arise? A deadlock situation can arise if the following four conditions hold simultaneously in a system: a. Mutual ex

Micro operation, Ask question maxmum words accepted#

Ask question maxmum words accepted#

Explain file allocation using i nodes, File allocation using I nodes. T...

File allocation using I nodes. This method is used to decrease the size of the table in the above method. Every file will have an I-node list. Allow a file have 15 pointers a

Explain the different sections of a process., Explain the different section...

Explain the different sections of a process.     Entry section     Critical section     Exit section     Remainder section Consider a system inclusive of n processe

What is a semaphore, Question 1: a) State the different file attribute...

Question 1: a) State the different file attributes and briefly explain the operations that can be performed on each files. b) What is a semaphore? Describe why it is impor

Describe the possible rmi invocation semantics, Question: (a) Explain t...

Question: (a) Explain the similarities and differences between two different threads running in the same process and two independent processes. When would you want to use two t

What is an operating system process, What is an operating system process? H...

What is an operating system process? How is it different from a program? Why do we need the concept of a process, rather than simply talk about programs running in memory? The e

Multiprogramming, explain how response time are reduced by allowing time sh...

explain how response time are reduced by allowing time sharing on top of multiprogramming

Paging, what is the use of valid invalid bits in paging

what is the use of valid invalid bits in paging

Define middleware to ease the low-level protocol burden, Define Middleware ...

Define Middleware to Ease the Low-Level Protocol Burden Fortunately, many products are available today to ease the low-level protocol burden on the application programmer. Midd

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd