what does a c program really represent

A

Anupam Kapoor

hi all,

i have a fundamental question :eek:) !

c is said to emulate the von-neumann model of a computer. wherein we
have a cpu connected to store via a pipe (i understand that this is a
_very_ _very_ simplistic model of a machine). in von-neumann model,
words flow between the store and the cpu (via the pipe).

in this context, what i don't understand is the structure of the
abstract c machine, and how it maps to the von-neumann architecture.

can someone please explain it ?

thank you for your insights

kind regards
anupam
 
V

Vladimir S. Oka

Anupam said:
hi all,

i have a fundamental question :eek:) !

c is said to emulate the von-neumann model of a computer. wherein we
have a cpu connected to store via a pipe (i understand that this is a
_very_ _very_ simplistic model of a machine). in von-neumann model,
words flow between the store and the cpu (via the pipe).

in this context, what i don't understand is the structure of the
abstract c machine, and how it maps to the von-neumann architecture.

can someone please explain it ?

I don't think this is really a C question. Still, have a look here:

http://en.wikipedia.org/wiki/Von_Neumann_model

The "abstract C machine", would then live in "Control Unit" and
"Arithmetic Logic Unit" boxes. It operates by the rules of ISO Standard
C.

How this is useful for you to know, escapes me.

PS
Hopefully, I wasn't feeding a troll...
 
J

Jack Klein

hi all,

i have a fundamental question :eek:) !

c is said to emulate the von-neumann model of a computer. wherein we

Who said this? What is their qualification to make this statement?

Personally, I don't think that C was designed to emulate anything. It
was designed to be a highly efficient procedural programming language
that could translate to small and efficient machine language on common
processor architectures.

I doubt if there was much philosophical thought given to emulating a
particular model of abstract computer.
have a cpu connected to store via a pipe (i understand that this is a
_very_ _very_ simplistic model of a machine). in von-neumann model,
words flow between the store and the cpu (via the pipe).

in this context, what i don't understand is the structure of the
abstract c machine, and how it maps to the von-neumann architecture.

can someone please explain it ?

thank you for your insights

kind regards
anupam

Consider, instead, if you will, how you would implement a conforming C
implementation on something that was not a von-neuman computer.
 
A

Anupam Kapoor

maybe i was not clear. in von-neumann model, we have a cpu connected to
a store via some sort of pipe. a program changes the contents of the
store in some (major) way. this is done by sending words back and
forth. most of the traffic is addresses of these words. the addresses
must be present in the cpu (via an earlier send operation) or generated
via a fixed rule e.g. "add one to PC".

i think this is how a very simplified von-neumann machine operates.
which incidentally is similar to how most computers work. imho, it
seems that to program a machine, the language must provide a mapping
to/from this abstract machine. no ?


thank you
kind regards
anupam

ps: i am _not_ a troll.
 
M

Michael Mair

Anupam said:
maybe i was not clear. in von-neumann model, we have a cpu connected to
a store via some sort of pipe. a program changes the contents of the
store in some (major) way. this is done by sending words back and
forth. most of the traffic is addresses of these words. the addresses
must be present in the cpu (via an earlier send operation) or generated
via a fixed rule e.g. "add one to PC".

i think this is how a very simplified von-neumann machine operates.
which incidentally is similar to how most computers work. imho, it
seems that to program a machine, the language must provide a mapping
to/from this abstract machine. no ?

Please quote enough context.
Consider Harvard architecture where the storage for programmes
and the storage for data are separate (STFW for details).
Nothing that hinders you to use this architecture -- the fact
that function pointers cannot be freely converted to and from
void * makes even more sense in this setting.

Cheers
Michael
 
C

CBFalconer

Anupam said:
maybe i was not clear. in von-neumann model, we have a cpu connected to
a store via some sort of pipe. a program changes the contents of the
store in some (major) way. this is done by sending words back and
forth. most of the traffic is addresses of these words. the addresses
must be present in the cpu (via an earlier send operation) or generated
via a fixed rule e.g. "add one to PC".

I don't know about then, but you are certainly unclear now, lacking
any context of any kind. Google is NOT usenet, it is only a foully
flawed interface to the usenet system. Your articles must stand by
themselves. Read my sig. and the URL references below.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Also see <http://www.safalra.com/special/googlegroupsreply/>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,173
Latest member
GeraldReund
Top