So i was wondering how the students know there is no more pizza coming. Do
they get to keep track of the global variables NPIZZAS and NPIZZAMAKERS
and decrement them appropriately? Or can we use another global variable to
see how many pizzamakers are on duty?
Or is there some other way that doesn't involve globals?
--Bryan
Hi,
Is it ever possible for different threads to call cv_wait with different
locks? I'm pretty sure that two threads can't simultaneously wait on one
cv while holding different locks, but if no one is waiting then
(theoretically) it should be okay, although I'm thinking strange things
might happen.
Thanks,
Charles Duan
why do cv_signal() and cv_broadcast() take a ponter
to a lock as a second parameter?
the cv model discussed in Valhala (pg 204) doesn't.
__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com
For those if you in search of a partner, do not fret -- you have company.
If anyone does not yet have a partner for the course, please let me know
ASAP via email. We'll then try to do some last minute matchmaking before
sectioning is due.
-mike
I've implemented locks and cv but i'm still getting a timing problem when
i run whalemating, even without my implementation:
OS/161 kernel [? for menu]: 1a
male whale #0 starting
female whale #0 starting
male whale #1 starting
Operation took 0.096364720 seconds
matchmaker whale #2 starting
matchmaker whale #0 starting
female whale #1 starting
OS/161 kernel [? for menu]: female whale #2 starting
male whale #2 starting
matchmaker whale #1 starting
OS/161 kernel [? for menu]:
Why are the operation results printout and the prompt getting interspersed
with the output of the program? Am i doing something wrong?
Thanks,
Octavian
My Monday section time has been changed from 4:30-5:30 to 4:00-5:00 upon
request of some students. I okay'ed this change with eeveryone who has
sectioned for this time. If you have not sectioned yet, but plan to attend
my Monday section, please note the change in time.
Thank you.
-- Sasha
A couple questions:
1) Do the student threads ever stop running? Or do they just keep eating?
2) Do the pizza maker threads run until they produce their quota of
pizzas, N, and then stop?
3) In the first paragaph, we want to "make sure they don't waste too many
pizzas". Is this accomplished by having the shelf hold a fixed number of
pizzas, P?
Thanks!
David
-------------------------------------
David Chen '03
41 Lowell Mail Center
Cambridge, MA 02138
dychen(a)fas.harvard.edu
www.people.fas.harvard.edu/~dychen
-------------------------------------
When a male and female get set up by a matchmaker, do all three threads
have to return as a group? Or can any 1 male, 1 female, and 1 matchmaker
return when a match is made?
David
-------------------------------------
David Chen '03
41 Lowell Mail Center
Cambridge, MA 02138
dychen(a)fas.harvard.edu
www.people.fas.harvard.edu/~dychen
-------------------------------------
yuri,
if yer out there:
1) forgive me for mispeling yer name.
2) send me mail.
thanks!
__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com
Valhala page 23 describes UNIX as being:
"... re-entrant, meaning that several processes may
be involved in kernel activity concurrently."
is os161 kernel designed to be similarly
"re-entrant"?
if so, where is the code to handle kernel stacks, and
is it written yet or do we (eventually) provide it?
thanks!
__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com