Courses/Computer Science/CPSC 457.W2013/Lecture Notes/Startup

From wiki.ucalgary.ca
< Courses‎ | Computer Science‎ | CPSC 457.W2013‎ | Lecture Notes
Revision as of 23:29, 21 January 2013 by Locasto (talk | contribs) (Created page with "= System Startup = In this session, we will examine how an operating system actually starts up and transitions from a simple sequential loading program to a concurrent system...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

System Startup

In this session, we will examine how an operating system actually starts up and transitions from a simple sequential loading program to a concurrent system of processes.

Besides highlighting the relationship between system code and the hardware/architecture, it provides a good segue to concurrency.

Focus Question

How does an OS create the environment and conditions on the hardware necessary to support the concurrent execution of multiple processes?

Agenda

  • Boot.
  • OS startup slides
  • OS startup code (see call chain list below)

Notes and References

The call chain involved here is interesting for several reasons:

  • It shows you how deep some kernel call chains are (reflecting the design pattern of doing a little bit of work and deferring the next little bit of work to someone else)
  • It demonstrates how closely the startup code is related to the underlying machine
  • It is an exact reflection of going from sequential assembly code to a concurrent system by "manually" setting up kernel data structures, initializing subsystems, asking the scheduler to start, and creating a new kernel thread (via do_fork()) that eventually calls sys_execve() to load in the "first" user level process: /sbin/init.

Fascinating stuff.

Readings