L2.14: Multi Threaded Models

L2.14: Multi Threaded Models

Introduction to Multi-Threaded Models

Overview of Thread Types

  • The discussion begins with an introduction to user-level and kernel-level threads, highlighting their differences and applications.

Architectural Models of Threads

  • Three architectural models are defined: many-to-one, one-to-one, and many-to-many, each representing different threading approaches.

User-Level Threads Explained

  • User-level threads can map multiple threads in user space to a single kernel thread; this is illustrated as an example of user-level threading.

Limitations of User-Level Threads

  • A significant limitation is that if one thread makes an I/O request, the entire process blocks due to only one kernel thread being available for management.

One-to-One Model Description

  • The one-to-one model creates a corresponding kernel thread for each user thread in user space, which introduces limitations based on the maximum number of manageable kernel threads.

Complexity in Management

  • Managing individual kernel threads for every user thread is complex and resource-intensive; blocking issues arise when any single thread requests I/O.

Many-to-Many Mechanism Introduction

  • To reduce overhead from creating too many kernel threads per user thread, the many-to-many mechanism allows for equal or fewer kernel threads than user-level threads.

Benefits of Many-to-Many Model

  • This model prevents the entire process from blocking if a single thread makes an I/O request by allowing switching between other available threads instead.

Summary of Threading Models

  • The three discussed models include: many-to-one (user-level), one-to-one (kernel level), and many-to-many (a hybrid approach).

Kernel Support Clarification

  • Implementation details regarding these threading models fall under operating system support, emphasizing that all overhead remains within the OS's domain.

Conclusion on Threading Discussion

  • The lecture concludes with a note that while these concepts may be questioned in various contexts, they have not been prominently featured in GATE examinations thus far.

Turn any video into a summary like this

YouTube links, meetings, lectures. With transcripts, search, and chat.