没有合适的资源?快使用搜索试试~ 我知道了~
The grok project Data Structures and Process Communication .pdf
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 161 浏览量
2024-03-23
16:09:56
上传
评论
收藏 425KB PDF 举报
温馨提示
试读
4页
The grok project Data Structures and Process Communication
资源推荐
资源详情
资源评论
The grok project
Data Structures and Process Communication
Peter Jensen
Institute of Computer Science, University of Copenhagen
Abstract
An overview of the structured data types
proposed for the grok language is given.
The proposal represents a uniform approach
to arrays, records and procedures by re-
garding them as specialized occurences of
the same underlying structure. Structures
are partitioned into three classes accord-
ing to the number of references pointing
to the structure at the same time, and we
show how this may be utilised in synchron-
ization of parallel processes. The well
known producer-consumer example illustrates
this.
Introduction
The grok language - first stage of the grok
project - is under developement at the
institute of computer science, university
of Copenhagen (Denmark). The work is a con-
tinuation of well known efforts to design
machine-independent high level languages
for system implementation. Our main design
consideration has been that if all programs
running on a particular computer are writ-
ten in a high level language, most of the
checking traditionally done by a monitor
(kernel, supervisor) at run-time can in-
stead be performed by the compiler thus ef-
ficiently speeding up the execution of the
program. Since almost the only protection
mechanism in a grok system will be those
implemented by the type checking of the
compiler, assembly programming must be ban-
ned. We consider this no great loss but re-
cognize the increased demand on the compi-
ler to produce "efficient" code. This is
reflected in the syntax of the language
where for instance a simplified procedure
concept has been adopted allowing very fast
and short calling sequences.
In this report we have tried to describe
the data structures available to a grok
programmer along with the considerations
that made us design this part of the lan-
guage that way. The second section describs
how we envisage inter-process communication
in a (future) grok operating system by
means of the "shared" records introduced.
Since the report is a working document and
since the language is not yet frozen, we
do not give a very formal or exact
description.
i. Data Structures
We consider the distinction made for
instance in algol 60 between data structu-
res and procedures to be somewhat artifi-
cial. A couple of simple examples will il-
lustrate this:
- before a structure (e.g. an array) is
used it is usually necessary to initia-
lise ito A sub-program is thus in a
natural way connected intimately with
the creation of the structure.
- a procedure call implies the creation
(and initialisation) of a unique data
structure (the activation record) holding
parameters, return point and structures
local to thebody.
Consequently we have aimed towards removing
this distinction and it is possible in grok
to associate executable sub-programs with
all structured types (block types).
Incorporating reference variables in a lan-
guage one is confronted with the problem of
the "dangling references". Furthermore it
is necessary to decide whether to allow un-
restricted creation and deletion of struc-
tures or to restrict creation so that allo-
cation of storage can be done on a stack
(as in Pascal). We have chosen the "garbage
collector's approach" i.e. it is assumed
that an area will not be reused until an
algorithm has verified that no reference
variable accessible by the program contains
the address of the area. Although storage
regeneration is known to be rather time-
consuming we feel that the price may not be
too heavy even for a systems implementation
language if the language is designed in a
way that allows the careful programmer to
reduce the overhead. Thus it is possible in
grok to write programs that never evoke the
garbage collector (hopefully the grok ope-
rating system will be of this category!)
although the language permits complete
freedom to create structures dynamically.
82.
资源评论
百态老人
- 粉丝: 1608
- 资源: 2万+
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功