Assignment2: Calculating of Weighted Mean - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

Assignment2: Calculating of Weighted Mean

Description:

Threads use 'system calls' for actions related to resources (send message... system calls in the 2nd Assignment .. System calls are simulated by. send(), receive ... – PowerPoint PPT presentation

Number of Views:200
Avg rating:3.0/5.0
Slides: 8
Provided by: csBg
Category:

less

Transcript and Presenter's Notes

Title: Assignment2: Calculating of Weighted Mean


1
Assignment2 Calculating of Weighted Mean
Each process Pi keeps value vi and weight wi.
v1 w1
P1
v2 w2
P2
P3
v3 w3
P5
v5 w5
P4
v4 w4
2
Assignment 2 (cont)
  • The Mailer is a Server
  • All threads are Clients
  • There are only two main modules in the System
  • the Scheduler
  • the Mailer

3
The Computing System
P2
P3
Scheduler
P1
P5
Msgs
Mailer
P4
Shell
Net creator
(User interface)
System programs
Application programs
OS
4
more in the 2nd Assignment ..
  • Processes are simulated by threads
  • No process tree, but, the special thread - the
    Shell - creates all other threads
  • The thread-table is very simplistic, the
    Scheduler keeps track on whos ready
  • Inter process communication is enabled for all
    threads - performed by the Mailer
  • Threads have IDs, essential for the routing

5
A view of the 2nd Assignment ..
  • The system is a set of concurrently executing
    threads, all created by the shell
  • Threads use system calls for actions related
    to resources (send message)
  • There is only one independent module in the
    System
  • the Scheduler

6
system calls in the 2nd Assignment ..
  • System calls are simulated by
  • send(), receive()
  • But, there are all the real system calls
  • suspend(), block(), release()
  • So, the best policy is to let these
    extra-functions be called from the system
    module
  • Remember, the (global) function called is part
    of the thread of control...

7
The Mailer
MailBoxMailer Size unbound
send
T3
m
m
. . .
pop
send
Thread Ti
T8
MailBox1 Size 5
push
m
m
T1
receive
. . .
MailBoxn Size 5
m
Write a Comment
User Comments (0)
About PowerShow.com