Showing posts with label os 5. Show all posts
Showing posts with label os 5. Show all posts
Thursday, July 30, 2009 at 4:07 AM | 0 comments  
Many-to-One
* Many user-level threads mapped to single kernel thread
* Examples:
-Solaris Green Threads-GNU Portable Threads





















One-to-One
* Each user-level thread maps to kernel thread
* Examples
-Windows NT/XP/2000
-Linux
-Solaris 9 and later










Many-to-Many Model
* Allows many user level threads to be mapped to many kernel threads
* Allows the operating system to create a sufficient number of kernel threads
* Solaris prior to version 9* Windows NT/2000 with the Thread Fiber package




Posted by Roger Labels:
* Thread library provides programmer with API for creating and managing threads
* Two primary ways of implementing
-Library entirely in user space
-Kernel-level library supported by the OS
Posted by Roger Labels:
* Supported by the Kernel
* Examples
-Windows XP/2000
-Solaris
-Linux
-Tru64 UNIX
-Mac OS X
Posted by Roger Labels:
User thread
* Thread management done by user-level threads library
* Three primary thread libraries:
- POSIX Threads
- Win32 threads
- Java threads
Posted by Roger Labels:
In computer science, a thread of execution results from a fork of a computer program into two or more concurrently running tasks. The implementation of threads and processes differs from one operating system to another, but in most cases, a thread is contained inside a process. Multiple threads can exist within the same process and share resources such as memory, while different processes do not share these resources.


single thread process

Single-threaded Apartments-Single-threaded apartments consist of exactly one thread, so all COM objects that live in a single-threaded apartment can receive method calls only from the one thread that belongs to that apartment. All method calls to a COM object in a single-threaded apartment are synchronized with the windows message queue for the single-threaded apartment's thread. A process with a single thread of execution is simply a special case of this model.



multi-thread process

Multithreaded Apartments-Multithreaded apartments consist of one or more threads, so all COM objects that live in an multithreaded apartment can receive method calls directly from any of the threads that belong to the multithreaded apartment. Threads in a multithreaded apartment use a model called free-threading. Calls to COM objects in a multithreaded apartment are synchronized by the objects themselves."
Posted by Roger Labels:
Visit the Site
MARVEL and SPIDER-MAN: TM & 2007 Marvel Characters, Inc. Motion Picture © 2007 Columbia Pictures Industries, Inc. All Rights Reserved. 2007 Sony Pictures Digital Inc. All rights reserved. blogger templates