Hw1 - CSCE 313 Introduction to Computer Systems Fall 2011...

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

View Full Document Right Arrow Icon
1 CSCE 313 Introduction to Computer Systems Fall 2011 Homework 1 (25 points) This homework assignment requires the course textbook and the Programs located on the book website: http://usp.cs.utsa.edu/usp/ . 1. Download the programs for Chapter 3. You’ll find a Program 3.1 simplechain.c and its executable simplechain in the tar file. Run simplechain three times with a parameter of 4. Turn in the output of these three runs. Explain why the output appears intermingled. 2. For each of the three runs, what is the chain of process IDs created? Eg. System Process 5117 creates process 10152 corresponding to the program simplechain. When i=1, process 10152 (the original parent) creates child process 10153, breaks the loop, executes the fprintf statement and terminates. When i=2, process 10152 becomes a parent and creates process 10153, breaks, executes the fprintf statement and terminates. When i=3, 10153 becomes a parent and creates 10154, breaks, executes the fprintf statement and terminates. Process 10154 finds that i=4 and terminates the for loop then it executes the
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 02/14/2012 for the course CSCE 313 taught by Professor Gu during the Spring '11 term at Texas A&M.

Page1 / 2

Hw1 - CSCE 313 Introduction to Computer Systems Fall 2011...

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