This document provides an overview of threads and processes. It defines a process as an executable file and thread as a function within a process. Each process has its own address space and resources, while each thread has its own program counter, stack, and registers. It discusses single-threaded and multi-threaded processes, as well as user space and kernel space. The document also covers concurrency on single-core and multi-core systems, different threading models (many-to-one, one-to-one, many-to-many), and benefits of multi-threading like responsiveness and resource sharing. Finally, it briefly discusses user threads, kernel threads, and common thread libraries.
Python Notes for mca i year students osmania university.docx
OS - Thread
1. Threads
Organized By: Vinay Arora
Assistant Professor
CSED, TU
Vinay Arora
CSED
2. Disclaimer
This is NOT A COPYRIGHT MATERIAL
Content has been taken mainly from the following books:
Operating Systems Concepts By Silberschatz & Galvin,
Operating Systems: Internals and Design Principles By William Stallings
www.os-book.com
www.cs.jhu.edu/~yairamir/cs418/os2/sld001.htm
www.personal.kent.edu/~rmuhamma/OpSystems/os.html
http://msdn.microsoft.com/en-us/library/ms685096(VS.85).aspx
http://www.computer.howsttuffworks.com/operating-system6.htm
http://williamstallings.com/OS/Animations.html
Etc…
Vinay Arora
CSED
3. Thread
Application - Set of Multiple Processes
Process – An Executable File (.exe)
Each PROCESS has its own Address Space, CPU Quota, Access to
Hardware Resources and Kernel Resources
THREAD – Function Present within Executable File
Each THREAD has its own PC, Stack , Registers
Vinay Arora
CSED
9. Multicore Programming
Multi-Core Systems putting pressure on programmers, challenges
include
Dividing activities
Balance
Data splitting
Data dependency
Testing and debugging
Vinay Arora
CSED
18. User Thread & Kernel Thread
User Thread - Thread Management done by User-Level Threads Library
Kernel Thread - Supported by the KERNEL
Examples
Windows XP/2000
Solaris
Linux
Tru64 UNIX
Mac OS X
Vinay Arora
CSED
21. Many-to-One Model
Many User-Level Threads mapped to Single Kernel Thread
Examples:
Solaris Green Threads
Vinay Arora
CSED
22. One-to-One Model
Each User-Level Thread maps to KERNEL THREAD
Examples
Linux
Solaris 9 and later
Windows NT/XP/2000
Vinay Arora
CSED
23. 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
Windows NT/2000
Vinay Arora
CSED