CAD CAM EDM DRO - Yahoo Group Archive

Re: EMC C Code

Posted by paul@x...
on 1999-06-14 05:02:00 UTC
>
> From: Jon Elson <jmelson@...>
>
>
>
> paul@... wrote:
>
> > > From: "Robert N. Ash" <esccmail@...>
> > >
> > > Thanks
> > >
> > > My misunderstanding as to the real meaning of "code portability of C and
> > > C++". JAVA version would be a platform independent software maybe but still
> > > need a RT OS???
> >
> > The Java program did not do real time machine control.
> >
> >
> > This does not work for something like EMC which relies on real time
> > scheduling support from the OS. This is not something that can be
> > grafted on later, but must be part of the running OS.
>
> Well, not exactly. The real time patch for Linux isn't really part of the
> operating system. the only OS feature that it really uses is the ability
> to have loadable modules which run at kernel priority. This is mostly
> used for loadable device drivers. What the real time code does is
> build an entire new real-time environment underneath the operating
> system, and allow the entire Linux system to run as one of the
> real-time processes, although the lowest on the priority list.
> Other real-time processes can be created, but they run pretty much
> OUTSIDE Linux. They have no ability to allocate/free memory,
> do I/O, or any of the things Linux programs usually are able to
> do. All communication with the rest of Linux and user programs
> is through a shared memory area which is created by telling
> the Linux boot loader program LILO to leave a chunk of memory
> unused at the top of the system memory. The real time patch
> has functions to create memory windows and fifos in this
> area.
>
> So, in fact, the real time feature WAS grafted on later to Linux.
> It was only possible, of course, because the source to the Linux
> kernel is available to anyone who wants to read it (or change
> it). The real time extensions to Windows NT was done in a
> very similar way, but Microsoft charged the outfit that created
> it a bunch to see what they needed to change, and they then
> have to charge the customer to cover this cost.
>
> Jon
>

Well I left myself open for that hair splitter. I was wondering if
somebody was going to jump on it. You did notice I said 'running OS'?

Perhaps 'grafted' was a poor choice of words, considering the
implementation. And really, the implementation details are not
important in this context. Once you load the RT extensions, you have a
RT OS and it wouldn't matter to an application if you were emulating
the whole thing on a virtual CPU. The important point is that these
are capabilities provided by the OS (whether Linux+RT or NT+RT) and
cannot be emulated or supplied by the application.

Which, getting back to the original point, is the reason code written
in C or C++, which is rumoured to be portable, may not be portable to
specific platforms (e.g. Win95 et al) since they lack the underlying
facilities required by the code to operate, even though compilers may
be available.

--
Paul Amaranth | Rochester MI, USA
Aurora Group, Inc. | Software Development
paul@... | Unix / C / Tcl-Tk

Discussion Thread

Robert N. Ash 1999-06-12 06:37:05 UTC Re: EMC C Code Jon Elson 1999-06-12 22:27:02 UTC Re: EMC C Code Robert N. Ash 1999-06-13 05:49:33 UTC Re: EMC C Code paul@x... 1999-06-13 09:51:28 UTC Re: EMC C Code Jon Elson 1999-06-13 22:14:04 UTC Re: EMC C Code Jon Elson 1999-06-13 22:51:09 UTC Re: EMC C Code Matt Shaver 1999-06-14 00:24:00 UTC Re: EMC C Code paul@x... 1999-06-14 05:02:00 UTC Re: EMC C Code shackle@x... 1999-06-14 05:59:29 UTC Re: EMC C Code