I understand that the user level threads or green threads are managed by some user-level threading library and have to be "linked" to some operating system thread to perform its task. I understand that threads are just an abstraction for a sequence of independent code. Threads are represented with some data structures stored in the memory. In the case of user level or green threads are present in the user space and are managed by the user-level threading library. In case of OS level or kernel level threads, they are stored and managed by the kernel or OS. What I don't understand is what actually is meant by the linking a green thread to OS thread?? I know about the 1:1, n:1, n:m schemes and that is not what my question is about. My question is what data structures are copied or shared (or something else) between the green thread and the kernel thread it is bound to?? And what does the user level threading library do to these structures when green threads have to context switched??
What data are shared between the green thread and the kernel level thread it is bound to?
143 Views Asked by Satoshi Gekkouga At
1
There are 1 best solutions below
Related Questions in MULTITHREADING
- How can I outsource worker processes within a for loop?
- OpenMP & oneTbb difference
- Receiving Notifications for Individual Task Completion OmniThreadLibrary Parallel.ForEach
- C++ error: no matching member function for call to 'enqueue' futures.emplace_back(TP.enqueue(sum_plus_one, x, &M));
- How can I create a thread in Haskell that will restart if it gets killed due to any reason?
- Qt: running callback in the main thread from the worker thread
- Using `static` on a AVX2 counter function increases performance ~10x in MT environment without any change in Compiler optimizations
- Heap sort with multithreading
- windows multithreading CreateMutex
- The problem of "fine-grained locks and two-phase locking algorithm"
- OpenMP multi-threading not working if OpenMPI set to use one or two MPI processor
- WPF Windows Initializing is locking the separated thread in .Net 8
- TCP Client Losing Connection When Writing Data
- vc++ thread constructor throwing compiler error c2672
- ASP.NET Core 6 Web API : best way to pause before resending email
Related Questions in OPERATING-SYSTEM
- the end of the I/O operation is notified to the system by an interrupt.how much system time do the mentioned operations occupy?
- Problem on CPU scheduling algorithms in OS
- OS-wide text autocomplete service with popup
- mkssecreenshotmgr taking a screenshot
- How to prevent app from crashing on android emulator
- Is there a function to end a child process?
- Swapping a healthy and unallocated partition in Windows 10
- ubuntu OS : Why my battery is completely drained of in just 2 hours in suspend mode
- 1 filenames = [] 2 ----> 3 for file in os.zipfile('images.zip'):
- Worth it to access data by blocks on modern OS/hardware?
- How does outlook disable screenshot
- How can I enable my app to access a specific partition directory for reading and writing without showing popup to user?
- Exception of type 'System.Exception' was thrown. Error in Cosmos Project
- Maximum CPU Voltage reading
- Java: get username from uid
Related Questions in GREEN-THREADS
- Python Postgres Connections with Green Threads
- Kernel thread and user thread and their mechanism
- Confusion regarding the Blocking of "peer threads" when a user-level thread blocks
- How Kotlin coroutines will use Project Loom?
- Async and scheduling - how do libraries avoid blocking at the lowest level?
- At which point a goroutine can yield?
- Not able us Virtual Threads using Project Loom
- How to run multiple blocking loops simultaneously in Common Lisp. [Combining cl-async with queues in thread-pool]
- What data are shared between the green thread and the kernel level thread it is bound to?
- Is gevent pool wait_available thread safe
- How does erlang implements preemptive scheduling with one OS thread?
- Main thread context returning in a different hardware thread, undefined behaviour?
- Downside of green threads: host kernel thread blocks
- Green thread vs native thread vs daemon thread vs user thread
- I/O Blocking in Green threads
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
There are THREADS and there are SIMULATED THREAD. What you are calling a "green thread" is a SIMULATED THREAD.
The kernel has no knowledge whatsoever of the existence of a simulated thread.
The answer then is NONE; at least at the operating system level. The process must keep track of the threads in the user space.
The 1:1, n:1 and n:M schemes are complete and total academic BullS*&T designed to confuse students. There is no such thing as an n:M in threading. It is impracticable theoretical nonsense. 1:1 just means real THREADS. n:1 means SIMULATED THREADS.
Only two models exist in real life:
In the classic model, a process consisted of an execution stream and an address space.
In the current model, a process consists of multiple execution streams and an address space.
In the classic model there are no threads. If you want threads, you have to simulate them using libraries with timers; a topic that is not fit for an operating systems course, except for historical background.
In the current model, the multiple execution streams are called threads. There is no reason whatsoever to use simulated/green/user threads in the current model. The textbooks that say simulated/green/user threads have any advantage are only fit to be used for cat box liner.