The Gateway to Computer Science Excellence
+1 vote
156 views

Match the following with respect to activation record fields:

A 1 → A, D; 2 → B, C

B 1 → A, C; 2 → B, D

C 1 → B, C; 2 → A, D

D 1 → B, D; 2 → A, C

Doubt:- Control link points to caller activation record.Can some one confirm?

in Compiler Design by Boss (25.3k points)
edited by | 156 views
+1
1-> A is correct..
0
No.Access link is not dynamic link.It is static link.And What i have read that control link point to Caller activation record and not the calling activation record.I need to confirm this but as i read it sometime back
+1
what I comment is control link is the point to activation record of calling procedure.
since one function(its activation record is on a stack, even for main() activation record is on the stack) call to another procedure.
what you asked, and your comment about access link.
0

I misunderstood you first comment as that you are suggesting a as the answer.:(

If A calls B, now according to given in question A control link points to B

but shoudn't it be  B control link point to A

See https://www.cs.nmsu.edu/~rth/cs/cs471/f00/ARIs.html

"The dynamic link points to the top of the ARI of the caller." So B control link point to A.Why is this not correct?

+1

According to question it simple says control link point to calling procedure like if A calls B then Control link from B points to A since A is calling procedure. B is called procudre so Control link to calling procedure or from called procedure.

Always calling procedure is pointing

+1
thanks got that now.

2 Answers

0 votes
Control link is a dynamic link +

Control link pointing to the caller

 

Hence Answer=B
by (347 points)
0 votes
Answer b: 1-A,C 2- B,D

Access link(static link) refers to non local data held on activation record.

Control link(dynamic link): point to activation record of caller.
by Active (4.6k points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,647 questions
56,475 answers
195,396 comments
100,379 users