2000-Programming_Languages-scanned - Comprehensive Exam - P...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Comprehensive Exam - Programming languages Fall 2000 Problem 1 - Activation records (8 points) You want to modify your compiler to support dynamically-sized, stack-allocated variables. Assuming a traditional machine architecture, explain what complications this creates com- pared to the usual constant-size stack allocation, and how you would handle it. 2 - Execution (12 One of CS's core themes is execution. We package it in various ways: procedure calls, threads, processes, co-routines, upcalls, interrupt handlers, etc. 1. (6 points) Ignoring hardware and language details, what do you fundamentally need to "execute" an instruction stream and why? Please pick two of the above abstractions and, at a high level, classify their constituent parts in your categories. 2. points) Whenever we have multiple streams of execution, we have to decide what to which stream to run ("scheduling"). What are some differences between thread scheduling and scheduling which procedure to run? What property of procedure scheduling allows us to use a single stack for procedures but (in general) forces multiple stacks for threads?
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/18/2011 for the course CS 242 at Stanford.

Page1 / 2

2000-Programming_Languages-scanned - Comprehensive Exam - P...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online