week2_tutorial_2010 - CSCC 69H3 Operating Systems Winter...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: CSCC 69H3 Operating Systems Winter 2010 Professor Bianca Schroeder U of T What is an Operating System? Turns ugly hardware into beautiful abstractions (provides services) Serves as a resource manager Serves as a control program (protection) The software layer between user applications and hardware. Application programs Operating system Hardware Will spend much of the rest of the semester on three core abstractions and resource management services: Processes & threads Memory management File & I/O systems Part 1: The Process Concept process = job / unit of work process = a program in execution A process contains all state of program in execution An address space Set of OS resources Open files, network connections Set of general-purpose registers with current values Accounting info A process is named by its process ID (PID) Stack Heap Data Text SP PC Operations on Processes processes execute concurrently and must be created and deleted dynamically process creation : parent, child, tree of processes process termination : when a process finishes executing last statement when a parent causes the termination of a child Process Creation: Unix In Unix, processes are created using fork() int fork() fork() Creates a new address space Initializes the address space with a copy of the entire contents of the address space of the parent Initializes the kernel resources to point to the resources used by parent (e.g., open files) Fork returns twice Returns the childs PID to the parent, 0 to the child Huh? fork() int main(int argc, char *argv) { char *name = argv[0]; int child_pid = fork(); if (child_pid == 0) {...
View Full Document

This note was uploaded on 05/22/2010 for the course CS CSCC69 taught by Professor Bianca during the Spring '10 term at University of Toronto- Toronto.

Page1 / 25

week2_tutorial_2010 - CSCC 69H3 Operating Systems Winter...

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

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