Discussion3 - 10/24/2010 COP4600 Discussion 3 Process,...

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

View Full Document Right Arrow Icon
10/24/2010 1 COP4600 Discussion 3 Process, pipe, system call mechanisms TA: Huafeng Jin hj0@cise.ufl.edu Homework 1 is posted on Sakai. The due date is 9/20 (Mon) at midnight. Quiz in Friday’s class. Reminders OS Concepts Process running program File abstraction for stored data Pipe interprocess communication Shell user interface with OS C System Calls fork() create a process pipe() create a pipe dup2() file redirection execvp() execute a command Discussion 2 Recap What does the following program do? #include<fcntl.h> main(){ int file = open("temp", O_APPEND); dup2(1, file); write(file, “COP4600", 8); close(file); } Questions What does the following program do? #include<fcntl.h> main(){ int file = open("temp", O_APPEND); dup2(1, file); write(file, “COP4600", 8); close(file); } ---- Print “COP4600” on the SCREEN Questions How many processes do we have? main(){ int pid = fork(); if(pid == 0) fork(); else fork(); } Questions
Background image of page 1

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

View Full DocumentRight Arrow Icon
10/24/2010 2 How many processes do we have? main(){ int pid = fork(); if(pid == 0) fork(); else fork(); } ---- 4 processes Questions Process, Pipe Recap Process Process tree Pipe Multiple pipes System Call Mechanism Concepts TRAP Process management SC File management SC Outline Process, Pipe Recap Process Process tree Pipe Multiple pipes System Call Mechanism Concepts TRAP Process management SC File management SC Outline A running program is called a process. A process can create new processes
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/15/2012 for the course COP 4600 taught by Professor Yavuz-kahveci during the Spring '07 term at University of Florida.

Page1 / 8

Discussion3 - 10/24/2010 COP4600 Discussion 3 Process,...

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

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