Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Eiffel > Re: eiffel pars...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 34 Topic 872 of 930
Post > Topic >>

Re: eiffel parser in SmartEiffel

by lee <cogneme@[EMAIL PROTECTED] > Jul 25, 2007 at 01:26 PM

On Jul 25, 2:50 am, llothar <llot...@[EMAIL PROTECTED]
> wrote:
> On 25 Jul., 13:10, lee <cogn...@[EMAIL PROTECTED]
> wrote:
>
> > Is this your understanding of lock-free or did I miss something? Let
> > me know and then I can give you my 2 cents on how some of these ideas
might
> > be achieved with SmartEiffel 2.3.
>
> Yes this was exactly what i meant.

Lothar,

Here is a conceptual view of how to implement multi-threading with
smarteiffel.  Now that I have seen the definition of lock-free (which
you provided the impetus for), I think this approach can be lock-free
and possibly wait-free.  First, some assumptions:

1. Data locking is omitted in the following ways:
(a) Each thread has its own data source.
(b) If threads need data from the same source (e.g., a database), the
developer has to ensure that the data is segmented into independent
segments.

2. Inter-thread communication will be necessary:
(a) I assume that threads will have to communicate (e.g., status,
status change commands, and exceptions)
(b) This avenue will also provide a means to control a thread's
execution (e.g. to send a "sleep" or "kill" command).

First, I would define a transaction server that can execute
transactions (of course).
These transactions would make use of the "sequencer" library of SE in
order to possibly use some of those features (e.g. - priority, prepare
procedure, is_ready function, etc.)

Then, the server would execute a JOB (a SE class) from the server's
LOOP_STACK.
The examples/tutorial mentions that these jobs are executed in
parallel, but I could not see the mechanism for that.  By parallel, I
assume that the SE developers meant simultaneously, but they could
have also meant that as one job finished, another job starts, which
would mean sequentially.

If this is the case, then I would use the PROCESS_SCHEDULER class to
launch an exec.  The notes say that following about the PROCESS
class:  "This class is in a beta stage. POSIX and Windows versions are
available but there may be resource leaks or other bugs left."

Even though the PROCESS class is "experimental," the inter-thread
communications would provide a way to implement threading control.
Now, I understand that on Windows and some Unixes (i.e., not Linux),
threads are more lightweight than processes.  So using a process may
involve additional memory, etc., which you already mentioned as a
liability of threads.  My understanding of Linux is that the kernel
makes very little distinction between threads and processes so that
you do not have the overhead issue involved in creating a process
instead of a thread.

While this is not a complete technical description, it should give you
enough information to ask me some questions or to critique it.  Please
let me know.

Lee
 




 34 Posts in Topic:
eiffel parser in SmartEiffel
lee <cogneme@[EMAIL PR  2007-07-18 22:53:24 
Re: eiffel parser in SmartEiffel
llothar <llothar@[EMAI  2007-07-19 21:34:27 
Re: eiffel parser in SmartEiffel
lee <cogneme@[EMAIL PR  2007-07-20 08:54:24 
Re: eiffel parser in SmartEiffel
llothar <llothar@[EMAI  2007-07-25 02:50:17 
Re: eiffel parser in SmartEiffel
lee <cogneme@[EMAIL PR  2007-07-25 13:26:38 
Re: eiffel parser in SmartEiffel
llothar <llothar@[EMAI  2007-07-20 13:56:18 
Re: eiffel parser in SmartEiffel
lee <cogneme@[EMAIL PR  2007-07-20 20:29:23 
Re: eiffel parser in SmartEiffel
llothar <llothar@[EMAI  2007-07-26 08:06:19 
Re: eiffel parser in SmartEiffel
lee <cogneme@[EMAIL PR  2007-07-26 09:07:00 
Re: eiffel parser in SmartEiffel
llothar <llothar@[EMAI  2007-07-20 22:32:43 
Re: eiffel parser in SmartEiffel
Pascal Obry <pascal@[E  2007-07-21 11:21:00 
Re: eiffel parser in SmartEiffel
llothar <llothar@[EMAI  2007-07-21 05:31:16 
Re: eiffel parser in SmartEiffel
Pascal Obry <pascal@[E  2007-07-21 14:39:36 
Re: eiffel parser in SmartEiffel
Friedrich Dominicus <j  2007-07-21 17:01:28 
Re: eiffel parser in SmartEiffel
lee <cogneme@[EMAIL PR  2007-07-21 13:37:23 
Re: eiffel parser in SmartEiffel
Friedrich Dominicus <j  2007-07-23 07:30:40 
Re: eiffel parser in SmartEiffel
llothar <llothar@[EMAI  2007-07-21 15:12:15 
Re: eiffel parser in SmartEiffel
llothar <llothar@[EMAI  2007-07-21 15:20:10 
Re: eiffel parser in SmartEiffel
lee <cogneme@[EMAIL PR  2007-07-22 04:57:02 
Re: eiffel parser in SmartEiffel
llothar <llothar@[EMAI  2007-07-22 02:46:14 
Re: eiffel parser in SmartEiffel
lee <cogneme@[EMAIL PR  2007-07-22 18:27:28 
Re: eiffel parser in SmartEiffel
Eric Bezault <ericb@[E  2007-07-22 21:28:56 
Re: eiffel parser in SmartEiffel
Colin Paul Adams <coli  2007-07-22 20:24:46 
Re: eiffel parser in SmartEiffel
llothar <llothar@[EMAI  2007-07-22 13:51:28 
Re: eiffel parser in SmartEiffel
Eric Bezault <ericb@[E  2007-07-22 22:59:48 
Re: eiffel parser in SmartEiffel
lee <cogneme@[EMAIL PR  2007-07-23 06:15:42 
Re: eiffel parser in SmartEiffel
lee <cogneme@[EMAIL PR  2007-07-23 06:19:28 
Re: eiffel parser in SmartEiffel
llothar <llothar@[EMAI  2007-07-23 00:05:52 
Re: eiffel parser in SmartEiffel
lee <cogneme@[EMAIL PR  2007-07-23 17:44:19 
Re: eiffel parser in SmartEiffel
llothar <llothar@[EMAI  2007-07-24 01:40:41 
Re: eiffel parser in SmartEiffel
lee <cogneme@[EMAIL PR  2007-07-24 19:53:46 
Re: eiffel parser in SmartEiffel
llothar <llothar@[EMAI  2007-07-24 17:17:37 
Re: eiffel parser in SmartEiffel
llothar <llothar@[EMAI  2007-07-24 18:58:30 
Re: eiffel parser in SmartEiffel
lee <cogneme@[EMAIL PR  2007-07-25 06:10:27 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 16:55:29 CDT 2008.