Courses/Computer Science/CPSC 457.W2012/Lecture Notes/Creation

= Process Creation =

In this session, we will continue our examination of how processes come to be. We will start by considering what a process is (see task_struct). We will also briefly trace our understanding of control flow involving invoking parts of the system call interface.

We will also have a multi-perspective look at the routines


 * execve
 * fork / clone / vfork

involved in process creation. We will glance over the source code of the kernel's routines for creating (or cloning) a process and loading an executable (i.e., ELF) image into a process address space. They lead to a chain of procedures in the OS that is a bit deeper and more complex than the system call interface might otherwise imply.

= Notes =


 * slides from today (augmented deck from last time)
 * wiki and piazza announcement
 * NSERC USRA 2012 announcement
 * Recall: Outcomes listed on Course Intro page (how are we doing with that list of skills?)
 * HW1 released (due Sat 28 Jan)
 * Virtual Machines (needed for HW2, 4, 5)
 * Amazon EC2 free micro instances
 * VMWare Player free samples
 * BackTrack
 * other "bootable" CDROM or ISO image (Fedora, Ubuntu,...)
 * other...
 * finish up shellcode example for execve(2)
 * how to invoke execve with an argument of /bin/bash
 * http://www.shell-storm.org/shellcode/files/shellcode-606.php
 * examine fork(2)
 * man 2 fork
 * do_fork routine: http://lxr.linux.no/#linux+v2.6.27.41/kernel/fork.c#L1314
 * copy_process routine: http://lxr.linux.no/#linux+v2.6.27.41/kernel/fork.c#L887

= Readings =
 * MOS: Section 2.1: Processes (this should be partly review of what we've talked about in class)
 * MOS: Section 3.2.1: The Notion of an Address Space
 * MOS: Section 3.7 (all except 3.7.2) (this should review some of what we touched on in the previous class and lay some groundwork for talking about memory management)
 * MOS: Section 10.2.5 (Linux kernel structure)
 * MOS: Section 10.3.1 (about processes in Linux) should reinforce some class discussion

Reminder: Tomorrow is the last day to drop a class.