[我要考试]计算机体系结构_威斯康星_博士资格考试_Spring1988_Q1_栈结构

1

A "stack" is an excellent structure that allows for the easyimplementation of procedure calls as well as easy expression evaluation.Furthermore, since instructions to manipulate stack operands generally haveimplicit operands, they are much smaller than instructions that have explicitoperands. Because of these reasons, one would expect a proliferation ofstack-oriented computers.

However, one rarely sees stack-oriented computers any more. Why is thisso?

 

Answer:

基于堆栈结构的计算机系统有其优点,例如:

o       通过栈,可以不用指明操作数,因为操作数都是压在栈里面;

o       现在的函数调用,就是通过堆栈进行数据保护,而如果是基于堆栈结构计算机,这个过程就天然应用,而不用像现在的计算机专门开辟一块区域作为堆栈空间;

但是,作为堆栈结构的计算机,有其很多的不足:

o       堆栈结构的数据由于是在栈中,因此不能提供数据的随机访问,在现代处理器中,需要保存很多的中间变量,堆栈不能处理这种需求;

o       堆栈结构的体系,不能让多条指令同时执行,因为缺少数据,就类似会发生数据相关一样;因此,基于堆栈的结构只能是指令的顺序执行;

o       基于堆栈的结构,从编译器角度讲,由于只能从栈顶进行数据访问,很难进行指令优化。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值