Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

How should I do this assignment?

Name: m an idiot 2009-02-16 16:46

I think C++ would be the best to use, but I don't have any clue on how to start this assignment.
http://www.cs.ecu.edu/~gopal/os1/ass1.pdf
It's due today, which I've no illusions I can do, I still need to do it. Too many tests at the same time have stopped me from getting an earlier start on it, and its been some time since I've programmed.
I just want to know how I should start this, including variables, methods, and classes. Any suggestions would be appreciated.

Name: Anonymous 2009-02-16 16:49

no exceptions

Name: Anonymous 2009-02-16 17:31

To implement this program I would create a class Worker for the worker processes and a class Coordinater for the coordinater process. I would also use variables. I would use the variable argv for the command line paramaters and a variable sum. Then I would also create a function compute_sum which computes the sum of the numbers and stores this value in the variable sum.

Name: Anonymous 2009-02-16 17:34

I would use C and fork(2).

Name: Anonymous 2009-02-16 17:38

I didnt see the post

Name: Anonymous 2009-02-16 17:43

Then I would also create a function compute_sum which computes the sum of the numbers and stores this value in the variable sum.
Go back to std::accumulate, please.

Name: Anonymous 2009-02-16 21:09

I would use Java

Name: Anonymous 2009-02-16 21:40

I would use Clojure.

Name: Anonymous 2009-02-16 23:11

I would use my dick

Name: Anonymous 2009-02-16 23:16

>>9
I chortle'd.

Name: Anonymous 2009-02-17 0:16

>>1
Here you go, bro.

-module(ass1).
-export([sum/1, add/3]).

sum(List) -> sum(0, List).    

sum(N, []) -> sum_collect(N);
sum(N, [A]) -> sum(N, [A,0]);              
sum(N, [A|[B|List]]) -> spawn(ass1, add, [self(), A, B]), sum(N+1, List).

sum_collect(0) -> 0;
sum_collect(1) -> receive Result -> Result end;
sum_collect(N) ->
    receive Result1 ->
        receive Result2 ->
            spawn(ass1, add, [self(), Result1, Result2]),
            sum_collect(N-1)
        end
    end.

add(Coordinator,A,B) -> Coordinator ! A+B.

Name: Anonymous 2009-02-17 2:17

There is no spoon().

Name: Anonymous 2009-02-17 7:27

Name: Anonymous 2009-02-17 9:45

>>11
Err, is that C++?

A rough outline of what parameters needs to be in each thing would be excellent, or especially some good reference materials.
I haven't programmed in C++ in over 2 years, and don't know where to start.

Name: Anonymous 2009-02-17 9:50

>>14
It's Fortran.

Name: Anonymous 2009-02-17 9:58

>>14
It's Cobol.

Name: Anonymous 2009-02-17 9:58

>>14
It's Smalltalk.

Name: Anonymous 2009-02-17 10:02

>>14
It's Eiffel.

Name: Anonymous 2009-02-17 10:03

>>14
It's FFFFFFFFFFFUUUUUUUUUUUUUUUUUNCTIONAL PROGRAMMING

Name: Anonymous 2009-02-17 10:22

>>14
It's Io.

Name: Anonymous 2009-02-17 10:50

>>15-20
Isn't it YHBT , though?

Name: Anonymous 2009-02-17 11:21

hack the prof's anus.

Name: Anonymous 2009-02-17 11:24

>>14
Erlang (BEAM) emulator version 5.6.4 [source] [smp:8] [async-threads:0] [kernel-poll:false]

Eshell V5.6.4  (abort with ^G)
1> c(ass1).
{ok,ass1}
2> ass1:sum([1,2,3]).
6

Name: Anonymous 2009-02-17 12:13

>>23
My erl shows just
Eshell V5.6.5  (abort with ^G)
1>
and I feel kinda bad about it :(

Name: Anonymous 2009-02-17 12:32

>>24
Erlang (BEAM) emulator version 5.6.5 [source] [smp:2] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.6.5  (abort with ^G)
1> ( ˃ ヮ˂)

Name: Anonymous 2009-02-17 13:26

Erlang is a shite language from the 70s.

Name: Anonymous 2009-02-17 13:31

>>26
It's from the 1930s

It was designed by Alan van Neuthoven in a sound stage on Mars

Name: Anonymous 2011-02-04 16:51

Name: Anonymous 2014-01-21 20:45

>>29
>le pedophile sage

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List