adapting unix for a multiprocessor environment using threads
Download
Skip this Video
Download Presentation
Adapting UNIX For A Multiprocessor Environment Using Threads

Loading in 2 Seconds...

play fullscreen
1 / 17

Adapting UNIX For A Multiprocessor Environment Using Threads - PowerPoint PPT Presentation


  • 108 Views
  • Uploaded on

Adapting UNIX For A Multiprocessor Environment Using Threads. Group A3 Jonathan Sippel Jahanzeb Faizan Ka Hou Wong. Introduction. In the 1980’s, systems were developed with multiple processors UNIX was an ideal operating system (O/S) to adapt for these systems

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Adapting UNIX For A Multiprocessor Environment Using Threads' - kaia


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
adapting unix for a multiprocessor environment using threads

Adapting UNIX For A Multiprocessor Environment Using Threads

Group A3

Jonathan Sippel

Jahanzeb Faizan

Ka Hou Wong

introduction
Introduction
  • In the 1980’s, systems were developed with multiple processors
  • UNIX was an ideal operating system (O/S) to adapt for these systems
  • Early implementations of multiprocessor UNIX were asymmetric
  • Scalability declined rapidly as additional processors were added
the unix process model
The UNIX Process Model
  • UNIX is a multitasking environment i.e. several processes are active in the system concurrently
  • Processes contend for resources, with the UNIX kernel acting as a resource manager
  • Only one process can run at a time on the processor
limitations of the unix process model
Limitations of the UNIX Process Model
  • Many applications need to:
    • Run independent tasks concurrently
    • Share a common address space
    • Share other resources
  • On traditional UNIX systems these applications must spawn multiple processes
  • A process cannot take advantage of a multiprocessor architecture because only one processor can be used at a time
improving the unix process model
Improving the UNIX Process Model
  • A traditional process has a single thread of control
  • A multithreaded process is associated with one or more threads of control
  • Threads of control (threads) share the process instructions and most of the process data
  • Each thread executes independently
improving the unix process model cont d
P

P

CPU

P

P

P

time

process

P

address space

Improving the UNIX Process Model (cont’d)
improving the unix process model cont d2
CPU

CPU

blocked

CPU

CPU

blocked

CPU

time

address space

thread

Improving the UNIX Process Model (cont’d)
multithreaded systems
Multithreaded Systems
  • Parallelism – the actual degree of parallel execution achieved by an application. Limited by the number of available processors
  • Concurrency – the maximum parallelism an application can achieve using an unlimited number of processors
multithreaded systems cont d
Multithreaded Systems (cont’d)
  • The kernel provides system concurrency by recognizing multiple threads of control within a process
  • User-level thread libraries are used by applications to provide user concurrency
  • Each concurrency model is of limited value by itself
  • Many systems combine system and user concurrency to implement a dual concurrency model
kernel threads
Kernel Threads
  • Do not need to be associated with a user process
  • Can be independently scheduled and use the standard synchronization mechanisms of the kernel
  • Used for performing synchronous I/O operations and to handle interrupts
lightweight processes
Lightweight Processes
  • A lightweight process (LWP) is a kernel-supported user thread
  • A system must support a kernel thread before it can support LWPs.
  • LWPs are independently scheduled and share the process address space
  • True parallelism exists on a multiprocessor system since each LWP can be scheduled to run on a separate processor
lightweight processes cont d
K

K

K

K

K

K

K

K

K

P

P

L

L

L

L

L

thread scheduler

CPU

CPU

CPU

P

process

kernel thread

L

lightweight process

address space

Lightweight Processes (cont’d)
user threads
User Threads
  • Thread abstraction can be provided entirely at the user level by library packages (e.g. POSIX p-thread and Mach c-thread libraries)
  • The libraries provide all the functions for creating, synchronizing, scheduling and managing threads
  • No special assistance is required from the kernel
user threads cont d
U

U

U

U

U

U

U

U

P

P

P

CPU

CPU

user thread

address space

process

P

User Threads (cont’d)
user threads cont d1
U

U

U

U

U

U

U

U

U

L

L

L

L

L

CPU

CPU

user thread

address space

L

lightweight process

User Threads (cont’d)
summary
Summary
  • Redesigning UNIX around threads has made it a more efficient O/S
  • Applications that need to perform several largely independent tasks concurrently, but must share a common address space, can now take advantage of UNIX thread facilities
  • By having multiple threads of control, UNIX applications can take advantage of the parallelism that a multiprocessor architecture provides
ad