lab 2.1 overview - Lab 2.1: Overview David Lie ECE344...

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

View Full Document Right Arrow Icon
1 Lab 2.1: Overview David Lie ECE344 University of Toronto
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 ECE344: Operating Systems Function call flow mips_usermode md_forkentry thread_fork sys_fork md_usermode sys_execv
Background image of page 2
3 ECE344: Operating Systems Md_usermode vs md_forkentry Sets up processor for going back to userspace for a brand new process. Initializes: – Status register – Program counter – Argc, argv arguments – Stack Md_forkentry does the same for forked processes. However: – Program counter already exists – Stack already exists – Status register already exists – No argc, argv arguments – Thus actions have to be slightly different
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 ECE344: Operating Systems runprogram Runprogram is what is called when you do a “p xxxx” from the menu: – It’s a hack, normally new programs are started with the execv system call, but since it doesn’t exist, runprogram exists. – Most OSs have some version of runprogram just to run the very first process.
Background image of page 4
5 ECE344: Operating Systems Runprogram & sys_execv
Background image of page 5

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

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

Page1 / 8

lab 2.1 overview - Lab 2.1: Overview David Lie ECE344...

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

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