Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFYn=yCvX_SXnkimd3+_zFJsuUd+6yRXwHRF1F3C00yua9=5Yw@mail.gmail.com>
Date: Thu, 25 Jul 2013 07:21:20 -0400
From: Yaniv Sapir <yaniv@...pteva.com>
To: john-dev@...ts.openwall.com
Subject: Re: Parallella: bcrypt (was: Katja's weekly report #6)

Alexander,

Yaniv - what would be a safe approach to start computation on an
> Epiphany core only when all (new) data is available to the core, and to
> read its results only when all (new) results are available to the host?
>
>
Considering my earlier email - if the data is written to the on-core local
memory, then a safe approach to start is to:

1. e_load() the program
2. e_write() the data
3. e_start() the program

If you are certain that the data is not written on the program image itself
(the global/static variables space) then you could do step 2 first, and
then steps 1 and 3 combined.

Similarly, a safe approach to read results would be to:

1. e_write() to clear a local-memory mailbox
2. use the e_write_ack() function (from previous email) to verify completion
3. start the program.
4. poll the mailbox until reading "done"
5. when program ends, it writes the mailbox with "done"

Again, the above sequences assume on-core activity only.

If the program should be run in a TSR mode (as a service), then replace the
"e_start()" calls with a "start" signal passed through the mailbox.

>From my experience, it is best to check the flow of the program and its
immunity to races by running a framework program that does not do any
calculation, but rather just does the signalling between the agents. When
this is robust, add the calculation itself.

Yaniv.

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.