Why You Should Avoid Processes
Author |
Message |
Martin
![](http://www.compsci.ca/wiki/images/4/46/CanadianStickUp.jpg)
|
Posted: Fri Mar 11, 2005 8:46 am Post subject: (No subject) |
|
|
Oh, it's easy enough to fix, but it's still abstract. It doesn't actually do anything. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Fri Mar 11, 2005 9:24 am Post subject: (No subject) |
|
|
StarGateSG-1 : the code you posted was to demonstrate the monitor, not processes. The abstract consept is that two processes access the same variable and a monitor class queries their requests. |
|
|
|
|
![](images/spacer.gif) |
StarGateSG-1
![](http://img61.imageshack.us/img61/4417/jesushulk2sq.gif)
|
Posted: Fri Mar 11, 2005 12:00 pm Post subject: (No subject) |
|
|
It demostrates that two processes can be run at the same time as well though, and that was the point. I believe all the challege was was to right (or find a program that couldn't be written better without porcesses. This meets those req. |
|
|
|
|
![](images/spacer.gif) |
Martin
![](http://www.compsci.ca/wiki/images/4/46/CanadianStickUp.jpg)
|
Posted: Fri Mar 11, 2005 2:54 pm Post subject: (No subject) |
|
|
Not yet, I definately see where I can improve this.
However, like I said, it would be much easier if you were to post code that actually did something. |
|
|
|
|
![](images/spacer.gif) |
StarGateSG-1
![](http://img61.imageshack.us/img61/4417/jesushulk2sq.gif)
|
Posted: Fri Mar 11, 2005 3:50 pm Post subject: (No subject) |
|
|
It does do something it just has no output! |
|
|
|
|
![](images/spacer.gif) |
Bacchus
![](http://img104.exs.cx/img104/9206/ravenmoon12ns.jpg)
|
Posted: Fri Mar 11, 2005 4:02 pm Post subject: (No subject) |
|
|
just stick a put statment to output the counter variable after one gets added to it, it should never reach 2, but it does lol |
|
|
|
|
![](images/spacer.gif) |
McKenzie
![](http://www.wizards.com/global/images/swtcg_article_27_pic3_en.gif)
|
Posted: Fri Mar 18, 2005 2:00 am Post subject: (No subject) |
|
|
Silly Conest, and silly judging.
OK, don't touch processes until you know what you are doing. (this is about one year after you think you know what you are doing, for some never ) Better or worse is not measured simply be execution time. Better, for the most part, is if it makes the program easier without sacrificing efficiency. The reality is processes can make the program more efficient, but this only happens with advanced programs (e.g. A chess program when the IA is doing it's work while waiting for the player to do his move.) There is no program that is written with processes that can't be written without. The question is "does this program lend itself to processes?" The same can can be said of recursion or even subroutines. You can always do without them, but the real issue is WHEN SHOULD THEY BE USED.
For the record, I would be a happy man if no grade 11 ever used a process (they mostly mess it up) |
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Fri Mar 18, 2005 9:18 am Post subject: (No subject) |
|
|
good point by McKenzie; though I'm still waiting for Martin's code
But yes -- processes are justified to be used only when one knows what he's doing. Oftentimes I saw people do something like
Turing: |
process foo
loop
%program
end loop
end foo
fork foo
|
The reasoning behind such is simply beyond me. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
McKenzie
![](http://www.wizards.com/global/images/swtcg_article_27_pic3_en.gif)
|
Posted: Fri Mar 18, 2005 10:07 am Post subject: (No subject) |
|
|
I know, I see those programs too. I don't know if they think they're being 1337 or if they think that they own a machine with massively parrallel processors. If they come from accross the hall (there are two computer teachers at massey) I'm gently explain how they are adding complexity for no good reason. If they're my student I shake my head in disgust, talk about how I've failed them as a teacher and maybe I should go back to driving taxi. They get the Idea that they may have done something wrong. (It's kinda like Holt's message about "it's not your fault" ... don't kid yourself ... it's your fault) |
|
|
|
|
![](images/spacer.gif) |
Bacchus
![](http://img104.exs.cx/img104/9206/ravenmoon12ns.jpg)
|
Posted: Fri Mar 18, 2005 10:33 am Post subject: (No subject) |
|
|
lol send them on a guilt trip |
|
|
|
|
![](images/spacer.gif) |
StarGateSG-1
![](http://img61.imageshack.us/img61/4417/jesushulk2sq.gif)
|
Posted: Fri Mar 18, 2005 10:48 am Post subject: (No subject) |
|
|
I am Glad to see this topic is warped up with common sense, people finally see it my way as my old singature said. |
|
|
|
|
![](images/spacer.gif) |
StarGateSG-1
![](http://img61.imageshack.us/img61/4417/jesushulk2sq.gif)
|
Posted: Fri Mar 18, 2005 10:52 am Post subject: One last thing |
|
|
Quote:
For the record, I would be a happy man if no grade 11 ever used a process (they mostly mess it up)
You need to make this say forst or second year, not all school start up in grade 11, me I started, way back in grade nine soon to be 5 years. |
|
|
|
|
![](images/spacer.gif) |
McKenzie
![](http://www.wizards.com/global/images/swtcg_article_27_pic3_en.gif)
|
Posted: Fri Mar 18, 2005 3:08 pm Post subject: (No subject) |
|
|
There is a certain amount of mental maturity that is seperate from years of programming experience. Some of this maturinty is physical and some has to with other educational experience (mainly math) |
|
|
|
|
![](images/spacer.gif) |
Martin
![](http://www.compsci.ca/wiki/images/4/46/CanadianStickUp.jpg)
|
Posted: Fri Mar 18, 2005 3:32 pm Post subject: (No subject) |
|
|
Sorry I haven't posted anything yet, I've been working 11 hour days lately, and haven't been up to it. Soon I promise. I've already written myself a stack and a queue class Damn turing's lack of an STL. |
|
|
|
|
![](images/spacer.gif) |
StarGateSG-1
![](http://img61.imageshack.us/img61/4417/jesushulk2sq.gif)
|
Posted: Sat Mar 19, 2005 11:39 am Post subject: (No subject) |
|
|
Quote:
There is a certain amount of mental maturity that is seperate from years of programming experience. Some of this maturinty is physical and some has to with other educational experience (mainly math)
I only said that becasue at my school we have a great teacher, and he is buddy with Tom West, so even comes and visit , and we always get like the newest version before the board. Our school it a trade school so we have a lot of programing courses not just a few bits and pieces. On top of that our school has well trained programers because all of the higher grades peer-tutor the lower ones, Always. I just got a little ticked off because you lumped all grades people together. |
|
|
|
|
![](images/spacer.gif) |
|
|