Project 4 output

74 views
Skip to first unread message

akirah

unread,
Apr 9, 2018, 9:56:59 PM4/9/18
to asu-cse-430
Hai,


I was wondering if the output of Project 4 is 

1 1 1
2 2 2 
3 3 3 
4 4 4 
.
.
N N N

OR 

Can the parent thread start printing after any one of the child thread is completed ??
 like 
0 1 0
1 1 0

Can someone help with the output format, please.

Thanks

jawi...@asu.edu

unread,
Apr 10, 2018, 1:58:53 PM4/10/18
to asu-cse-430
I believe that output is fine. In addition, you can print the in between steps as well. The TA recommended this to us. I had each child print, basically so you know which one grabbed the CS first.

kvbh...@asu.edu

unread,
Apr 11, 2018, 1:06:24 AM4/11/18
to asu-cse-430
Hello,
Only main/parent does the printing. And the output should be 
1 1 1
2 2 2 
.   .  . 
N N N

If your output doesn't look like this then there's a bug. 

Tip: Make sure to test your program by removing sleep() statements (if any).  

Hope it helps.
--Kushal

On Monday, April 9, 2018 at 6:56:59 PM UTC-7, akirah wrote:

Haarika Dasari

unread,
Apr 12, 2018, 7:57:59 PM4/12/18
to asu-c...@googlegroups.com
Great ! Thanks 

--
You received this message because you are subscribed to the Google Groups "asu-cse-430" group.
To unsubscribe from this group and stop receiving emails from it, send an email to asu-cse-430+unsubscribe@googlegroups.com.
To post to this group, send email to asu-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/asu-cse-430.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages