| Author |
Message |
lroland@gmail.com
Guest
|
Posted:
Mon Aug 15, 2005 12:15 am Post subject:
Compiler/Architecture course on modern hardware |
|
|
Hi all, this is the forum that I know which contains the highest
density of architecture nerds - I have a question about how best to
teach such topics - so I hope that I am OT if not then I am sorry -
here goes:
Most compiler/architecture courses teached at under graduate/graduate
level today is still old school RISC architectures (MIPS 10000 style
processors rules the text books) - for many years we have thought our
students the vital arch/comp stuff from the following simple project
plan:
1) implement a simple compiler frontend (parsing, syntax analysis, type
checking...).
2) implement a simple (i.e. only integer math) 1 cycle RISC style arch
3) extend project 2 with a pipeline, forwarding and branch prediction.
4) implement a compiler backend (coupled together with the front end
from project 1) which produces code for the architecture created in
project (3).
The plan above has the immediate advantage that it is simple, there are
tons of text books that can be used, it is easy to teach (i.e. minimum
preparation time for the teachers) and makes the student capable of
reading more advanced topics in compiler/architecture design - there
are however also some problems:
1) Most students get a surprised (to say the least) when they encounter
x86 assembler code/addressing modes.
2) Teaching modern OS courses is often done via Linux, this often
results in the students wanting to do there oven pet projects on there
home computer which gets hindered by the fact that paging schemes,
addressing modes and boot code is different and sometimes solve
problems that are non-existing on RISC hardware.
3) Some (most) advances in contemporary (production) compiler
technology is driven by modern architectures and often solve problems
that only arise in them. This makes such advances very hard to teach
when the students view on CPU design stems from RISC.
We could of cause make courses available that upgrades the student from
1990 RISC style to 2005 x86-64 hoopla, but it is my opinion that we -
at least to some degree - should be able to teach architecture concepts
using modern hardware. Unfortunately I have yet to be introduced to a
book which teaches architecture intro concepts from a Intel viewpoint
and most of the book on x86 code are very DOS centric (essentially
16bit stuff only) and thus not more usable than the RISC ones.
What I am interested in is if anyone out there has any experience in
teaching introductory compiler/architecture concepts on modern hardware
? (i.e. it would be nice to discuss x86-64 paging/addressing modes in a
later OS course instead of making the students create there own pet
RISC OS).
--
Lars Roland |
|
| Back to top |
|
 |
Del Cecchi
Guest
|
Posted:
Mon Aug 15, 2005 9:26 pm Post subject:
Re: Compiler/Architecture course on modern hardware |
|
|
lroland@gmail.com wrote:
| Quote: | Hi all, this is the forum that I know which contains the highest
density of architecture nerds - I have a question about how best to
teach such topics - so I hope that I am OT if not then I am sorry -
here goes:
Most compiler/architecture courses teached at under graduate/graduate
level today is still old school RISC architectures (MIPS 10000 style
processors rules the text books) - for many years we have thought our
students the vital arch/comp stuff from the following simple project
plan:
1) implement a simple compiler frontend (parsing, syntax analysis, type
checking...).
2) implement a simple (i.e. only integer math) 1 cycle RISC style arch
3) extend project 2 with a pipeline, forwarding and branch prediction.
4) implement a compiler backend (coupled together with the front end
from project 1) which produces code for the architecture created in
project (3).
The plan above has the immediate advantage that it is simple, there are
tons of text books that can be used, it is easy to teach (i.e. minimum
preparation time for the teachers) and makes the student capable of
reading more advanced topics in compiler/architecture design - there
are however also some problems:
1) Most students get a surprised (to say the least) when they encounter
x86 assembler code/addressing modes.
2) Teaching modern OS courses is often done via Linux, this often
results in the students wanting to do there oven pet projects on there
home computer which gets hindered by the fact that paging schemes,
addressing modes and boot code is different and sometimes solve
problems that are non-existing on RISC hardware.
3) Some (most) advances in contemporary (production) compiler
technology is driven by modern architectures and often solve problems
that only arise in them. This makes such advances very hard to teach
when the students view on CPU design stems from RISC.
We could of cause make courses available that upgrades the student from
1990 RISC style to 2005 x86-64 hoopla, but it is my opinion that we -
at least to some degree - should be able to teach architecture concepts
using modern hardware. Unfortunately I have yet to be introduced to a
book which teaches architecture intro concepts from a Intel viewpoint
and most of the book on x86 code are very DOS centric (essentially
16bit stuff only) and thus not more usable than the RISC ones.
What I am interested in is if anyone out there has any experience in
teaching introductory compiler/architecture concepts on modern hardware
? (i.e. it would be nice to discuss x86-64 paging/addressing modes in a
later OS course instead of making the students create there own pet
RISC OS).
--
Lars Roland
First, I am not a teacher. |
But, X86 is no more modern, and perhaps less modern, than a 1990 risc,
even in the x86-64 incarnation.
Of course if you think x86 is taking over the world and you want the
courses to be x86 centric and you think of that as an "upgrade", then go
for it.
On the other hand, if you believe there are fundamental principles and
techniques of computer architecture then you should focus on examples
and curriculum that best enables the student to comprehend them.
As for addressing modes, etc. Isn't that a core area of computer
architecture? Wouldn't you discuss the different modes and the relative
advantages and disadvantages rather than just introduce the x86 version?
del
--
Del Cecchi
"This post is my own and doesn’t necessarily represent IBM’s positions,
strategies or opinions.” |
|
| Back to top |
|
 |
Guest
|
Posted:
Tue Aug 16, 2005 8:15 am Post subject:
Re: Compiler/Architecture course on modern hardware |
|
|
Why not go for a modern architecture (while there is still time)
This site has references and even course materials
http://www.viika.com/itanium/index.html
Phil |
|
| Back to top |
|
 |
lroland@gmail.com
Guest
|
Posted:
Tue Aug 16, 2005 8:15 am Post subject:
Re: Compiler/Architecture course on modern hardware |
|
|
Del Cecchi wrote:
| Quote: | First, I am not a teacher.
|
that is not needed to have an opnion about how best to teach
architecture stuff
| Quote: |
But, X86 is no more modern, and perhaps less modern, than a 1990 risc,
even in the x86-64 incarnation.
|
That is of cause right, my problem is properly more that it is hard to
continue
teaching other subjects (compiler, kernel programming) when todays
deployed architectures differ as much as they do.
| Quote: |
Of course if you think x86 is taking over the world and you want the
courses to be x86 centric and you think of that as an "upgrade", then go
for it.
|
I hope not - I would rather continue to teach MIPS, but it is a problem
that we do not prepare students enough for the world out there - so
perhaps what I am trying to do is to find the best comprimise, where
both traditional RISC (MIPS/Alpha) and modern stuff such as
x86-64/Itanium can be tought.
| Quote: |
On the other hand, if you believe there are fundamental principles and
techniques of computer architecture then you should focus on examples
and curriculum that best enables the student to comprehend them.
As for addressing modes, etc. Isn't that a core area of computer
architecture? Wouldn't you discuss the different modes and the relative
advantages and disadvantages rather than just introduce the x86 version?
|
We do that now, the only problem is that it can quickly boil down to
the teachers trowing a lot of information at the students without the
students being able to comprehent it and with the lack of understanding
of x86 (which steems from the RICS centric introduction) they are not
able to test there knoldage on any avalibel hardware - most students do
not have access to a alpha, sparc or ppc. |
|
| Back to top |
|
 |
lroland@gmail.com
Guest
|
Posted:
Tue Aug 16, 2005 8:15 am Post subject:
Re: Compiler/Architecture course on modern hardware |
|
|
If I could scratch enough teaching material together then it would be a
dream to teach itanium, there are very good emulators out there that
can be used by the students - also it would fit nicely with a
traditional MIPS introduction to RISC and then continue with itanium -
also some pretty nasty compiler stuff can be tought on this
architecture. |
|
| Back to top |
|
 |
John Savard
Guest
|
Posted:
Wed Aug 17, 2005 6:18 am Post subject:
Re: Compiler/Architecture course on modern hardware |
|
|
On 14 Aug 2005 16:34:30 -0700, "lroland@gmail.com" <lroland@gmail.com>
wrote, in part:
| Quote: | Most compiler/architecture courses teached at under graduate/graduate
level today is still old school RISC architectures (MIPS 10000 style
processors rules the text books) - for many years we have thought our
students the vital arch/comp stuff from the following simple project
plan:
We could of cause make courses available that upgrades the student from
1990 RISC style to 2005 x86-64 hoopla, but it is my opinion that we -
at least to some degree - should be able to teach architecture concepts
using modern hardware. Unfortunately I have yet to be introduced to a
book which teaches architecture intro concepts from a Intel viewpoint
and most of the book on x86 code are very DOS centric (essentially
16bit stuff only) and thus not more usable than the RISC ones.
|
As others have noted, the x86 architecture is one which includes a lot
of legacy characteristics, and it is unclear that it is really more
'modern' than the MIPS type of design.
Myself, I'm partial to the IBM 360 (from 1964!) or the Motorola 68020
architecture.
But if you do want an architecture that is newer than the MIPS, I
suppose you could try teaching students about computer architecture from
the Itanium point of view...
John Savard
http://www.quadibloc.com/index.html
_________________________________________
Usenet Zone Free Binaries Usenet Server
More than 120,000 groups
Unlimited download
http://www.usenetzone.com to open account |
|
| Back to top |
|
 |
David Kanter
Guest
|
Posted:
Wed Aug 17, 2005 6:26 am Post subject:
Re: Compiler/Architecture course on modern hardware |
|
|
John Savard wrote:
| Quote: | On 14 Aug 2005 16:34:30 -0700, "lroland@gmail.com" <lroland@gmail.com
wrote, in part:
Most compiler/architecture courses teached at under graduate/graduate
level today is still old school RISC architectures (MIPS 10000 style
processors rules the text books) - for many years we have thought our
students the vital arch/comp stuff from the following simple project
plan:
We could of cause make courses available that upgrades the student from
1990 RISC style to 2005 x86-64 hoopla, but it is my opinion that we -
at least to some degree - should be able to teach architecture concepts
using modern hardware. Unfortunately I have yet to be introduced to a
book which teaches architecture intro concepts from a Intel viewpoint
and most of the book on x86 code are very DOS centric (essentially
16bit stuff only) and thus not more usable than the RISC ones.
As others have noted, the x86 architecture is one which includes a lot
of legacy characteristics, and it is unclear that it is really more
'modern' than the MIPS type of design.
Myself, I'm partial to the IBM 360 (from 1964!) or the Motorola 68020
architecture.
But if you do want an architecture that is newer than the MIPS, I
suppose you could try teaching students about computer architecture from
the Itanium point of view...
|
I think the OP is really asking whether courses can/should be taught
using modern high performance gear. MIPS is no longer relevant to
desktop/laptop or server computer, only the embedded market. Ditto for
Alpha (sadly) and PA-RISC. So while it makes sense to preserve Alpha
for a good RISC vs. CISC comparison with VAX, perhaps it makes more
sense to start focusing on x86, POWER and IPF. Those are the three
architectures that will obviously be with us the longest (in the
mid-high performance space).
David |
|
| Back to top |
|
 |
Torben Ægidius Mogensen
Guest
|
Posted:
Wed Aug 17, 2005 3:04 pm Post subject:
Re: Compiler/Architecture course on modern hardware |
|
|
"David Kanter" <dkanter@gmail.com> writes:
| Quote: | I think the OP is really asking whether courses can/should be taught
using modern high performance gear. MIPS is no longer relevant to
desktop/laptop or server computer, only the embedded market. Ditto for
Alpha (sadly) and PA-RISC. So while it makes sense to preserve Alpha
for a good RISC vs. CISC comparison with VAX, perhaps it makes more
sense to start focusing on x86, POWER and IPF. Those are the three
architectures that will obviously be with us the longest (in the
mid-high performance space).
|
Why should an architecture/compiler course focus on desktop computers?
Embedded processors are equally interesting from an academic
viewpoint, and it is more likely that a student, after leaving
university, will work with architecture and compilers for embedded
processors than for desktop/server processors. Additionally, given
the high complexity og high-end desktop/server processors, it makes
sense to start with the simpler embedded processors.
Torben |
|
| Back to top |
|
 |
Nick Maclaren
Guest
|
Posted:
Wed Aug 17, 2005 3:16 pm Post subject:
Re: Compiler/Architecture course on modern hardware |
|
|
In article <7zll30j2vm.fsf@tyr.diku.dk>,
torbenm@tyr.diku.dk (=?iso-8859-1?q?Torben_=C6gidius_Mogensen?=) writes:
|>
|> Why should an architecture/compiler course focus on desktop computers?
|> Embedded processors are equally interesting from an academic
|> viewpoint, and it is more likely that a student, after leaving
|> university, will work with architecture and compilers for embedded
|> processors than for desktop/server processors. Additionally, given
|> the high complexity og high-end desktop/server processors, it makes
|> sense to start with the simpler embedded processors.
Unfortunately, the development environment of such things is often
more expensive and more user-hostile than for desktop systems.
Debugging an application process under a general purpose operating
system is relatively easy, even given the ghastly facilities
currently provided.
Regards,
Nick Maclaren. |
|
| Back to top |
|
 |
David Kanter
Guest
|
Posted:
Wed Aug 17, 2005 4:15 pm Post subject:
Computer architecture teaching |
|
|
| Quote: | I think the OP is really asking whether courses can/should be taught
using modern high performance gear. MIPS is no longer relevant to
desktop/laptop or server computer, only the embedded market. Ditto for
Alpha (sadly) and PA-RISC. So while it makes sense to preserve Alpha
for a good RISC vs. CISC comparison with VAX, perhaps it makes more
sense to start focusing on x86, POWER and IPF. Those are the three
architectures that will obviously be with us the longest (in the
mid-high performance space).
Why should an architecture/compiler course focus on desktop computers?
Embedded processors are equally interesting from an academic
viewpoint, and it is more likely that a student, after leaving
university, will work with architecture and compilers for embedded
processors than for desktop/server processors. Additionally, given
the high complexity og high-end desktop/server processors, it makes
sense to start with the simpler embedded processors.
|
To be honest, I agree with you in some sense. The thing is that EVERY
student has an x86 or PPC available to them, and probably the CS/EE
department has an Alpha or a SPARC lying around. There are definitely
benefits to being able to write assembly language stuff as a way of
learning architecture (I never did, but I think it's a good way to
learn).
Perhaps one alternative would be start using ARM as a standard ISA and
buy debug equipment so students can write apps for their cell phones.
Or whatever ISA is commonly used in cell phones...
I honestly think that would be a good thing to do.
David |
|
| Back to top |
|
 |
John Savard
Guest
|
Posted:
Thu Aug 18, 2005 6:10 am Post subject:
Re: Compiler/Architecture course on modern hardware |
|
|
On 17 Aug 2005 10:16:12 GMT, nmm1@cus.cam.ac.uk (Nick Maclaren) wrote,
in part:
| Quote: | In article <7zll30j2vm.fsf@tyr.diku.dk>,
torbenm@tyr.diku.dk (=?iso-8859-1?q?Torben_=C6gidius_Mogensen?=) writes:
|> Why should an architecture/compiler course focus on desktop computers?
|> Embedded processors are equally interesting from an academic
|> viewpoint, and it is more likely that a student, after leaving
|> university, will work with architecture and compilers for embedded
|> processors than for desktop/server processors. Additionally, given
|> the high complexity og high-end desktop/server processors, it makes
|> sense to start with the simpler embedded processors.
Unfortunately, the development environment of such things is often
more expensive and more user-hostile than for desktop systems.
Debugging an application process under a general purpose operating
system is relatively easy, even given the ghastly facilities
currently provided.
|
In which case, Apple's switch from the PowerPC to the x86-64 (or,
rather, EM64T) architecture has had an unintended consequence...
O, Mighty IBM, save us!
John Savard
http://www.quadibloc.com/index.html
_________________________________________
Usenet Zone Free Binaries Usenet Server
More than 140,000 groups
Unlimited download
http://www.usenetzone.com to open account |
|
| Back to top |
|
 |
Nick Maclaren
Guest
|
Posted:
Thu Aug 18, 2005 8:15 am Post subject:
Re: Compiler/Architecture course on modern hardware |
|
|
In article <4303dfb6.1833947@news.usenetzone.com>,
John Savard <jsavard@excxn.aNOSPAMb.cdn.invalid> wrote:
| Quote: | On 17 Aug 2005 10:16:12 GMT, nmm1@cus.cam.ac.uk (Nick Maclaren) wrote,
in part:
In article <7zll30j2vm.fsf@tyr.diku.dk>,
torbenm@tyr.diku.dk (=?iso-8859-1?q?Torben_=C6gidius_Mogensen?=) writes:
|> Why should an architecture/compiler course focus on desktop computers?
|> Embedded processors are equally interesting from an academic
|> viewpoint, and it is more likely that a student, after leaving
|> university, will work with architecture and compilers for embedded
|> processors than for desktop/server processors. Additionally, given
|> the high complexity og high-end desktop/server processors, it makes
|> sense to start with the simpler embedded processors.
Unfortunately, the development environment of such things is often
more expensive and more user-hostile than for desktop systems.
Debugging an application process under a general purpose operating
system is relatively easy, even given the ghastly facilities
currently provided.
In which case, Apple's switch from the PowerPC to the x86-64 (or,
rather, EM64T) architecture has had an unintended consequence...
O, Mighty IBM, save us!
|
Doing so is no longer IBM corporate strategy. Sorry.
I don't know if Sun intend to make a cheap Niagara workstation, but
I have tried leaning on them to do so :-)
Regards,
Nick Maclaren. |
|
| Back to top |
|
 |
Torben Ægidius Mogensen
Guest
|
Posted:
Thu Aug 18, 2005 4:15 pm Post subject:
Re: Computer architecture teaching |
|
|
"David Kanter" <dkanter@gmail.com> writes:
| Quote: | I think the OP is really asking whether courses can/should be taught
using modern high performance gear. MIPS is no longer relevant to
desktop/laptop or server computer, only the embedded market. Ditto for
Alpha (sadly) and PA-RISC. So while it makes sense to preserve Alpha
for a good RISC vs. CISC comparison with VAX, perhaps it makes more
sense to start focusing on x86, POWER and IPF. Those are the three
architectures that will obviously be with us the longest (in the
mid-high performance space).
Why should an architecture/compiler course focus on desktop computers?
Embedded processors are equally interesting from an academic
viewpoint, and it is more likely that a student, after leaving
university, will work with architecture and compilers for embedded
processors than for desktop/server processors. Additionally, given
the high complexity og high-end desktop/server processors, it makes
sense to start with the simpler embedded processors.
To be honest, I agree with you in some sense. The thing is that EVERY
student has an x86 or PPC available to them, and probably the CS/EE
department has an Alpha or a SPARC lying around. There are definitely
benefits to being able to write assembly language stuff as a way of
learning architecture (I never did, but I think it's a good way to
learn).
Perhaps one alternative would be start using ARM as a standard ISA and
buy debug equipment so students can write apps for their cell phones.
Or whatever ISA is commonly used in cell phones...
|
You can get a long way with emulation. While there is some
satisfaction in running on "real metal", the academic benefit of doing
so is minimal. Additionally, emulation often allows more
opportunities for looking at internal state and collecting execution
statistics. And emulators can run on the students' own PCs.
Torben |
|
| Back to top |
|
 |
John Savard
Guest
|
Posted:
Thu Aug 18, 2005 4:15 pm Post subject:
Re: Compiler/Architecture course on modern hardware |
|
|
On 18 Aug 2005 08:04:36 GMT, nmm1@cus.cam.ac.uk (Nick Maclaren) wrote,
in part:
| Quote: | In article <4303dfb6.1833947@news.usenetzone.com>,
John Savard <jsavard@excxn.aNOSPAMb.cdn.invalid> wrote:
O, Mighty IBM, save us!
Doing so is no longer IBM corporate strategy. Sorry.
|
Not that I can blame them. A POWER5 workstation powered by OS/2, however
cute and interesting it might be, isn't going to displace the Microsoft
hold on the desktop.
Instead, IBM is making money where its name means something, in the
mainframe market, with its various z/Architecture machines.
John Savard
http://www.quadibloc.com/index.html
_________________________________________
Usenet Zone Free Binaries Usenet Server
More than 140,000 groups
Unlimited download
http://www.usenetzone.com to open account |
|
| Back to top |
|
 |
Stephen Fuld
Guest
|
Posted:
Thu Aug 18, 2005 9:40 pm Post subject:
Re: Compiler/Architecture course on modern hardware |
|
|
"John Savard" <jsavard@excxn.aNOSPAMb.cdn.invalid> wrote in message
news:43049443.652535@news.usenetzone.com...
| Quote: | On 18 Aug 2005 08:04:36 GMT, nmm1@cus.cam.ac.uk (Nick Maclaren) wrote,
in part:
In article <4303dfb6.1833947@news.usenetzone.com>,
John Savard <jsavard@excxn.aNOSPAMb.cdn.invalid> wrote:
O, Mighty IBM, save us!
Doing so is no longer IBM corporate strategy. Sorry.
Not that I can blame them. A POWER5 workstation powered by OS/2, however
cute and interesting it might be, isn't going to displace the Microsoft
hold on the desktop.
Instead, IBM is making money where its name means something, in the
mainframe market, with its various z/Architecture machines.
|
Del can chime in here, but I also believe they are making lots of money on
AS/400s (I series?). Of course they also make money on things like selling
their fab services and some special purpose things.
--
- Stephen Fuld
e-mail address disguised to prevent spam |
|
| Back to top |
|
 |
|
|
|
|