hw8_xv6_sched

hw8_xv6_sched - Homework: Threads and Context Switching...

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

View Full Document Right Arrow Icon
Homework: Threads and Context Switching Read : setjmp.S and proc.c (focus on the code that switches between processes, specifically scheduler and sched ). Hand-In Procedure You are to turn in this homework during lecture. Please write up your answers to the exercises below and hand them in to a 6.828 staff member at the beginning of lecture. Introduction In this homework you will investigate how the kernel switches between two processes. Assignment : Turn in : Where does the scheduler's stack sit in memory? Is it the same stack that a running process uses when executing in the kernel? (The scheduler is in proc.c .) Turn in : What value does setjmp return first to its caller? ( Setjmp is in setjmp.S .) Turn in : What value does setjmp return when it returns the second time to its caller? Turn in: : If we look at a setjmp on a particular jump buffer followed by a longjmp to that same buffer (that is, both functions are called once), setjmp returns twice! and longjmp never returns. How is this accomplished by
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 05/29/2010 for the course 6 828 taught by Professor Guy during the Fall '08 term at MIT.

Page1 / 2

hw8_xv6_sched - Homework: Threads and Context Switching...

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