Laboratory work in TDDB68 Pintos Assignments 2, 3. Viacheslav Izosimov

Size: px
Start display at page:

Download "Laboratory work in TDDB68 Pintos Assignments 2, 3. Viacheslav Izosimov"

Transcription

1 Laboratory work in TDDB68 Pintos Assignments 2, 3 Viacheslav Izosimov viaiz@ida.liu.se

2 Timeline Lab 2: System calls Description Pintos stack Pintos memory Pintos file system Halt, Exit Create, Open/Close Read/Write Outline (1)

3 Outline (2) Lab 3: Execution, termination and synchronization of user programs Description Loading executable, starting a user program Wait, queuing mechanism Exit, pass the exit code! Argument passing Description of the 3rd lab will be available by 30th of September ( on viaiz@ida.liu.se if you want to obtain a draft version earlier, only for those who have already passed lab 2).

4 Timeline Pass assignments on time!!! Lab 00, 0 passed Lab 1 20 th of September Lab 2 15 th of October Lab 3 15 th of November Lab 4 10 th of December

5 Lab 2 :: General Description Lab 2: System calls System calls Single user program Memory issues Console

6 Lab 2 :: Systems Calls At High Level System calls: communication between the user program and the kernel functions, called from the user program and performed by the kernel computers often use interrupts to accomplish that switch from user code to system code

7 Lab 2:: Systems Calls At High Level Calling corresponding function in the wrapper user_program.c Calling } corresponding exception in Pintos kernel the kernel bool flag; flag = create( file.txt, 1000); System call wrapper pintos/src/lib/user/syscall.c bool create (const char *file, unsigned initial_size) { return syscall2 (SYS_CREATE, file, initial_size); User exception handler // Your code here! Return result back to the user program pintos/src/userprog/syscall.c Return result back to the wrapper

8 Lab 2::Preparatory Questions (1) 1. What is the idea behind the system calls? Why, for example, the code of the system calls cannot be available simply as a library to user processes? 2. Pintos uses one interrupt (0x30) for all system calls, so there is only one interrupt handler syscall_handler to be called for different system calls. How it is possible to distinguish in syscall_handler which system call it is? Where are the arguments of a system call stored (if there are any) and how can you access them? 3. Where are the user-mode stack and the kernel-mode stack of a process located? How can you address the user-mode stack in the kernel code, particularly, in an interrupt handler? What is the reason of having two stacks instead of one?

9 Lab 2::Preparatory Questions (2) 4. When a user program executes a system call like Open(), an address to a string containing the file name is provided as an argument. In which memory is this string stored, and how can we access it in the kernel code? 5. In some system calls the user passes pointers as arguments, which is supposed to point to some data in the user-space (for instance, a pointer to a string with a file name in Create()). Specify the situations when accessing the data via that pointer can lead to problems. What can be done about it? 6. Assume that in the kernel code you have got a pointer to a data in the user space which potentially spans across few pages. Reconsider the previous question again. Does your solution still works? Improve it, if not. Is the solution efficient?

10 Lab 2::Preparatory Questions (3) 7. Why a user (program) cannot just call functions in filesys directly instead of calling system calls? 8. All (or almost all) operating systems require that user programs first open a file before using (reading or writing from) it and close when they are done. Explain the motivation behind such a requirement. In other words, why cannot we have only read and write system calls in an operating system without open and close? Answer on the preparatory questions before you begin with the lab assignment!!!

11 Lab 2::What to Implement? You will need to implement: create - creates a file. open - opens a file. close - closes a file. read - reads from a file or the console (the keyboard). write - writes to a file or the console (the monitor). halt - halts the processor. exit - Terminates a program and deallocates resources occupied by the program, for example, closes all files opened by the program.

12 Lab 2::Useful Files You have to have a look at: pintos/src/lib/user/syscall[.h.c] the wrapper userprog/syscall[.h.c] Your implementation of system calls!!! threads/interrupt.[h c] important structures!!! lib/syscall-nr.h system call constants filesys/filesys.[h c] Pintos file system implementation examples/lab2test.c the official test program for this lab filesys/file.[h c] useful functions for operations with files. Things which you don t find in filesys, you find here userprog/process.c Look up what is here and tell me

13 Lab 2::How Do I Start? (1) STEP 1 Understand what the user program is Look into examples directory and a couple of the user programs, especially halt.c Look into Makefile in this directory to understand how the user programs are compiled Compile the user programs by gmake STEP 2 Prepare Pintos disk Copy one or two user programs to the disk

14 Lab 2::How Do I Start? (2) STEP 2 (Continuation) Dealing with Pintos disk In userprog/build : mkdisk fs.dsk 2 This will create a file fs.dsk with a 2MB simulated disk in the directory. Format: pintos --qemu -- -f -q. Copy user programs: pintos --qemu -p programname -- -q with new name pintos --qemu -p programname -a newname -- -q

15 Lab 2::How Do I Start? (3) STEP 2 (Continuation) Dealing with Pintos disk Example: pintos --qemu -p../../examples/halt -a severe_student_program -- -q To copy a file from the disk: pintos --qemu -g programname -- -q or pintos --qemu -g programname -a newname -- -q * -p = put, -g = get To run: pintos --qemu -- run programname Example: pintos --qemu -- run severe_student_program

16 Lab 2::How Do I Start? (4) STEP 3 into userprog/process.c, find setup_stack() *esp = PHYS_BASE; change to *esp = PHYS_BASE - 12; STEP 4 Make sure that you understand the problems which may arise if you access (in the kernel) data stored in the user memory using the pointers provided by the user program as system call arguments. (First, make sure that you understand what this sentence means )

17 Lab 2::Shutdown Example halt.c #include <syscall.h> int main (void){ halt (); } userprog/syscall.c #include "userprog/syscall.h #include <stdio.h> #include <syscall-nr.h> #include "threads/interrupt.h #include "threads/thread.h static void syscall_handler (struct intr_frame *); voidsyscall_init (void) { intr_register_int (0x30, 3, INTR_ON, syscall_handler, "syscall"); } static void syscall_handler (struct intr_frame *f UNUSED) printf ("system call!\n"); thread_exit (); }

18 system call! 18

19 Lab 2::Shutdown Example halt.c #include <syscall.h> int main (void){ halt (); } userprog/syscall.c #include "userprog/syscall.h #include <stdio.h> #include <syscall-nr.h> get a name of the system callthread_exit (); SYS_HALT from the stack} use power_off() #include "threads/interrupt.h #include "threads/thread.h static void syscall_handler (struct intr_frame *); voidsyscall_init (void) { intr_register_int (0x30, 3, INTR_ON, syscall_handler, "syscall"); } static void syscall_handler (struct intr_frame *f UNUSED) printf ("system call!\n");! f->esp stack pointer

20 Lab 2::Useful Files for Shutdown You have to have a look at: pintos/src/lib/user/syscall[.h.c] the wrapper userprog/syscall[.h.c] Your implementation of system calls!!! threads/interrupt.[h c] important structures!!! lib/syscall-nr.h system call constants filesys/filesys.[h c] Pintos file system implementation examples/lab2test.c the official test program for this lab filesys/file.[h c] useful functions for operations with files. Things which you don t find in filesys, you find here userprog/process.c Look up what is here and tell me

21 Pintos Stack (1) 21

22 Why 4? Pintos Stack (2) f->esp f->esp + 4 f->esp + 8 f->esp

23 Lab 2::Create Example bool create (const char *file, unsigned initial_size) Example: create( file.txt, 1000); How to get them? Answer: f->esp Hint: note that, in order to get a string, you will need get a void pointer from esp and then get a char pointer to which points that void pointer. The char pointer will point to the first element of the string How to return a value? Answer: f->eax

24 f->esp 24

25 Lab 2::Create Example To implement the system calls, which operate with files, look at filesys/filesys.[h c] and filesys/file.[h c]. Everything is already done there for you! Just call the functions So simple? Not yet Memory issues!!!

26 All the pointers on the variables, which you get from the user program, must be validated!

27 Problem 1: If the pointer above PHYS_BASE, It points to Kernel memory! UNSAFE! 27

28 Memory Issues in Pintos Kernel VM Physical Memory Kernel process PHYS_BASE User process Page directory If no entry? a)kill user b) Handle page fault

29 Lab 2::Memory Issues in Pintos Kernel VM Physical Memory Kernel process PHYS_BASE Check if the pointer is below User process Page directory Check if the pointer is in the page directory If no entry? a)kill user b) Handle page fault

30 STRUCT THREAD 30

31 Lab 2::Other System Calls (1) To implement the system calls, which operate with files, look at filesys/filesys.[h c] and filesys/file.[h c]. Everything is already done there for you! Just call the functions!

32 Lab 2::Other System Calls (2) int open (const char *file) void close (int fd) Sink when you manage file IDs! I suggest using an array of *file elements and return indexes of this array as file IDs 0 and 1 IDs must be always reserved for the console! NO SYNCHRONIZATION YET!!!

33 Lab 2::Other System Calls (3) int read (int fd, void *buffer, unsigned size) Reads size bytes from the file open as fd into buffer. Returns the number of bytes actually read (0 at end of file), or -1 if the file could not be read (due to a condition other than end of file). Fd 0 reads from the keyboard using input_getc() (defined in devices/input.h). NO SYNCHRONIZATION YET!!!

34 Lab 2::Other System Calls (4) int write (int fd, const void *buffer, unsigned size) Writes size bytes from buffer to the open file fd. Returns the number of bytes actually written or -1 if the file could not be written. Writing past end-of-file would normally extend the file, but file growth is not implemented by the basic file system. The expected behavior is to write as many bytes as possible up to end-of-file and return the actual number written or -1 if no bytes could be written at all. When fd=1 then the system call should write to the console. Your code which writes to the console should write all of buffer in one call to putbuf() (check lib/kernel/stdio.h and lib/kernel/console.c), at least as long as size is not bigger than a few hundred bytes. (It is reasonable to break up larger buffers.) Otherwise, lines of text output by different processes may end up interleaved on the console, confusing the user. NO SYNCHRONIZATION YET!!!

35 Lab 2::Other System Calls (5) void exit (int status) Terminates the current user program, returning status to the kernel. Conventionally, a status of 0 indicates success and nonzero values indicate errors. Remember to free all the resources will be not needed anymore. This system call will be improved in the following labs. CLOSE ALL OPEN FILES CLOSE ALL OP

36 Lab 2::Other System Calls (6) Where did I take this piece of code from?

37

38 Lab 3:: General Description Lab 3: Execution, termination and synchronization of user programs Handling program arguments Execution of several user programs Termination of a user program Synchronization of shared data structures Wait system call

39 Lab 3 Description of the 3rd lab will be available by 30th of September ( on viaiz@ida.liu.se if you want to obtain a draft version earlier, only for those who have already passed lab 2).

40 Lab 3::Preparatory Questions (1) 1. What does wait() is doing? How to call mechanism of using wait/exit? Do we need them in case of one user program? What is the child and what is the parent process? 2. What is the default value, which is returned by exit. Do you know any typical error exit codes that are returned by the user programs in Linux/Windows? 3. Name which data structures in your implementation will be shared? Which synchronization mechanisms do you need to use for them? 4. What are the possible situations with wait() regarding completion of parent and child processes?

41 Lab 3::Preparatory Questions (2) 5. How can you avoid using busy waiting in wait()? 6. What is the page allocation? How is it implemented in Pintos? Why do we need that? What are the advantages vs. continuous memory allocation? 7. When the program starts, what and how should be initialized? E.g. registers, program counter, Look into current Pintos implementation. 8. When you exit, how would you close all open files associated to the current thread? Think about extension of your implementation from Lab 2. Any synchronization problems? 9. How does Pintos handle program arguments?

42 Lab 3::Main Goals Provide synchronization for multiple programs Provide synchronization between programs Add loading program arguments (Part extra) File synchronization: Not yet addressed. It is a part of Lab 4

43 Lab 3::What is already done? Loading several programs into the memory Initialization of user program That was really hard to do in Nachos many students failed. So, you are lucky! However! You must understand how it is done in Pintos before you do anything! Look into pintos/src/userprog/process.c.

44 Lab 3::Exec, Exit and Wait (1) pid_t exec (const char *cmd_line) int wait (pid t pid) void exit (int status) Currently: For exec(), you may want to look at start_process() in process.c It should help. int process_wait (tid_t child_tid UNUSED) { return -1; } Certain functionalities are already in exit() from Lab 2

45 Lab 3::Exec, Exit and Wait (2) pid_t exec (const char *cmd_line) Runs the executable whose name is given in cmd line, passing any given arguments, and returns the new process s program id (pid). Must return pid -1, which otherwise should not be a valid pid, if the program cannot load or run for any reason.

46 Lab 3::Exec, Exit and Wait (3) void exit (int status) Terminates the current user program, returning status to the kernel. If the process s parent waits for it, this is the status that will be returned. a status of 0 indicates success and nonzero values indicate errors.

47 Lab 3::Exec, Exit and Wait (4) int wait (pid t pid) provides synchronization between user programs waits for process pid to die and returns the status it passed to exit. Sounds very simple? Well

48 Lab 3::Exec, Exit and Wait (5) Consider all possible situations with Wait that your program must handle before starting your implementation: "Parent" exits before the "child". "Child" exits before the "parent": "parent" calls Wait; "parent" will exit without calling Wait. "Parent" calls Wait before the "child" exits. 48

49 Lab 3 Commemorative Issues Synchronization is one of the most essential aspects in these assignments. Requirements regarding synchronization are as follows: Parts of the functions accessing shared resources must be thread safe (especially in the system calls), e.g. employ synchronization techniques such as locks and semaphores. Particularly, access to global objects and data must be synchronized. Only one threat can have access to the Console at a time. Other threads must wait 49 until completion of reading/writing.

50 Lab 3::Possible Test To de defined! 50

51 Lab 3::Mandatory extra Part (1) Task: Load program arguments. Lab 2::STEP 3 into userprog/process.c, find setup_stack() *esp = PHYS_BASE; change to *esp = PHYS_BASE - 12; CHANGE IT BACK! 51

52 Lab 3::Mandatory extra Part (2) A user program may be called with arguments in the command line. Implement arguments passing, so the arguments of a user program can be accessible within it. Although you can parse the string from the command line any way you like, we can recommend to take a look at the function strtok_r(), prototyped in lib/string.h and implemented with thorough comments in lib/string.c. You can find more about it by looking at the man page (run man strtok_r at the prompt). Necessary details about setting up the stack for this task you can find in Program Startup Details section of Pintos documentation. 52

53 Lab 3::Mandatory extra Part (3) From Pintos Manual: Consider how to handle arguments for the following example command: /bin/ls -l foo bar. First, break the command into words: /bin/ls, - l, foo, bar. Place the words at the top of the stack. Order doesn't matter, because they will be referenced through pointers. In general very similar to what you are doing when you need to get system call parameters from the stack 53

54 Address Name Data Type 0xbffffffc argv[3][...] bar\0 char[4] 0xbffffff8 argv[2][...] foo\0 char[4] 0xbffffff5 argv[1][...] -l\0 char[3] 0xbfffffed argv[0][...] /bin/ls\0 char[8] 0xbfffffec word-align 0 uint8_t 0xbfffffe8 argv[4] 0 char * 0xbfffffe4 argv[3] 0xbffffffc char * 0xbfffffe0 argv[2] 0xbffffff8 char * 0xbfffffdc argv[1] 0xbffffff5 char * 0xbfffffd8 argv[0] 0xbfffffed char * 0xbfffffd4 argv 0xbfffffd8 char ** 0xbfffffd0 argc 4 int 0xbfffffcc return address 0 54 void (*) ()

55 Lab 2 & Lab 3 Lab 2 15th of October Lab 3 15th of November Discussion about Lab 4 + Repetition of Lab 3 next lesson 55

Laboratory work in TDDI04 Pintos Assignments 2, 3

Laboratory work in TDDI04 Pintos Assignments 2, 3 Laboratory work in TDDI04 Pintos Assignments 2, 3 Viacheslav Izosimov 2008-01-28 viaiz@ida.liu.se Instead of Motivation The deadline for Lab 1 is extended to 1st of February! KERNEL PANIC!!! YOUR PINTOS

More information

According to this plan, you should have started with Lab 2 now Around 50% have passed Lab 1. The environment (1)

According to this plan, you should have started with Lab 2 now Around 50% have passed Lab 1. The environment (1) TDDB68 Lesson 2 Pintos Assignments 2 & 3 Mattias Eriksson 2009 mater@ida.liu.se some slides by Viacheslav Izosimov 2007-2008 Comments on muddy card evaluation Environment to build, run and test on Windows/

More information

User Programs. Computer Systems Laboratory Sungkyunkwan University

User Programs. Computer Systems Laboratory Sungkyunkwan University Project 2: User Programs Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Supporting User Programs What should be done to run user programs? 1. Provide

More information

Project 2-1 User Programs

Project 2-1 User Programs Project 2-1 User Programs Prof. Jin-Soo Kim ( jinsookim@skku.edu) T.A. Sejun Kwon (sejun000@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Supporting User Programs

More information

TDDB68 Lesson 2 Pintos Assignments 3 & 4. Mattias Eriksson 2010 (or

TDDB68 Lesson 2 Pintos Assignments 3 & 4. Mattias Eriksson 2010 (or TDDB68 Lesson 2 Pintos Assignments 3 & 4 Mattias Eriksson 2010 mater@ida.liu.se (or mattias.eriksson@liu.se) some slides by Viacheslav Izosimov 2007-2008 Instead of Motivation Plan for something like this:

More information

Project 2: User Programs

Project 2: User Programs Project 2: User Programs Presented by Jaishankar Sundararaman 21 February 2008 Till now All code part of Pintos Kernel Code compiled directly with the kernel This required that the tests call some functions

More information

Project 2: User Programs

Project 2: User Programs Project 2: User Programs CS140 - Winter 2010 Slides by Andrew He, adapted from previous CS140 offerings Overview Project 2 is due Thursday, February 4 This project requires an understanding of: How user

More information

CS 140 Project 2: User Programs. Fall 2015

CS 140 Project 2: User Programs. Fall 2015 CS 140 Project 2: User Programs Fall 2015 Important Dates Project 1: DUE TODAY (Friday, October 9 th ) at 12pm Project 2 will be due Friday, October 23 rd at 12pm 2 weeks Start early J 2 Overview Project

More information

Pintos Project 2 User Programs. September 28, 2016

Pintos Project 2 User Programs. September 28, 2016 Pintos Project 2 User Programs September 28, 2016 Overview What are user programs? Anything you run on the command line: ~$ls ~$git push ~$./my_project arg1 arg2 Overview of Part 1: Setup Stack User Hey

More information

TDDB68. Lesson 1. Simon Ståhlberg

TDDB68. Lesson 1. Simon Ståhlberg TDDB68 Lesson 1 Simon Ståhlberg Contents General information about the labs Overview of the labs Memory layout of C programs ("Lab 00") General information about Pintos System calls Lab 1 Debugging Administration

More information

TDDB68 Lesson 3. Simon Ståhlberg

TDDB68 Lesson 3. Simon Ståhlberg TDDB68 Lesson 3 Simon Ståhlberg Contents Overview of lab 3 A: Exec, wait, exit B: Program arguments C: Termination of ill-behaving user processes Testing your implementation Overview of lab 4 File system

More information

TDDB68 Lesson 1 Introduction to Pintos Assignments 00, 0, 1, 2

TDDB68 Lesson 1 Introduction to Pintos Assignments 00, 0, 1, 2 TDDB68 Lesson 1 Introduction to Pintos Assignments 00, 0, 1, 2 Mattias Eriksson 2010 mater@ida.liu.se Some slides by Viacheslav Izosimov 2007-2008 Outline Administration Introduction to Pintos Important

More information

TDDB Lesson 3 Pintos Assignments (2), 3 & 4. Erik Hansson

TDDB Lesson 3 Pintos Assignments (2), 3 & 4. Erik Hansson TDDB68 2015 Lesson 3 Pintos Assignments (2), 3 & 4 Erik Hansson erik.hansson@liu.se Most slides by Mattias Eriksson 2009-2010 and Viacheslav Izosimov 2007-2008 Remember Pass assignments on time to get

More information

TDDB Lesson 2 Pintos Assignments (2), 3 & 4. Erik Hansson

TDDB Lesson 2 Pintos Assignments (2), 3 & 4. Erik Hansson TDDB68 2013 Lesson 2 Pintos Assignments (2), 3 & 4 Erik Hansson erik.hansson@liu.se Most slides by Mattias Eriksson 2009-2010 and Viacheslav Izosimov 2007-2008 Instead of Motivation Some of you should

More information

Project 2--User Programs

Project 2--User Programs Project 2--User Programs Jason Bau CS140 Winter 09 Slides Acknowledgements to previous CS140 TAs User Program/Process What happens in Unix shell when? myth13:~/> cp r pintos. 1. Shell handles user input

More information

TDDB Lesson 3 Pintos Assignments (2), 3 & 4. Erik Hansson

TDDB Lesson 3 Pintos Assignments (2), 3 & 4. Erik Hansson TDDB68 2016 Lesson 3 Pintos Assignments (2), 3 & 4 Erik Hansson erik.hansson@liu.se Most slides by Mattias Eriksson 2009-2010 and Viacheslav Izosimov 2007-2008 Plan your time Plan your time with your

More information

TDDB Lesson 2 Introduction to Pintos Assignments (1) and 2

TDDB Lesson 2 Introduction to Pintos Assignments (1) and 2 TDDB68 2015 Lesson 2 Introduction to Pintos Assignments (1) and 2 Erik Hansson erik.hansson@liu.se Most slides by Mattias Eriksson 2009-2010 and Viacheslav Izosimov 2007-2008. Outline Administration Introduction

More information

Pintos Project 2 User Programs

Pintos Project 2 User Programs 1 Pintos Project 2 User Programs COS 450 - Fall 2018 Project 1 Submissions Easy Things to Fix 2 Project submission Code style ASSERT and malloc() Design document questions Code Style 1.2.2.2 3 Match the

More information

Project-2 Review. (Extending the functionality of PintOS user program implementation) Summer 2018

Project-2 Review. (Extending the functionality of PintOS user program implementation) Summer 2018 Project-2 Review (Extending the functionality of PintOS user program implementation) Summer 2018 Overview Necessities and Organization Argument passing in PintOS Implementation of System Calls Metedata

More information

Project 3: Virtual Memory

Project 3: Virtual Memory Project 3: Virtual Memory Prof. Jin-Soo Kim ( jinsookim@skku.edu) TA Bak jin-yeong (dongdm@gmail.com) Go gyeong-min (gkm2164@gmail.com) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu

More information

Computer Systems Assignment 2: Fork and Threads Package

Computer Systems Assignment 2: Fork and Threads Package Autumn Term 2018 Distributed Computing Computer Systems Assignment 2: Fork and Threads Package Assigned on: October 5, 2018 Due by: October 12, 2018 1 Understanding fork() and exec() Creating new processes

More information

Project 4: Virtual Memory

Project 4: Virtual Memory Project 4: Virtual Memory by Ben Pfaff USF modifications by Greg Benson Chapter 1: Project 4: Virtual Memory 1 1 Project 4: Virtual Memory By now you should be familiar with the inner workings of Pintos.

More information

LAB3: VIRTUAL MEMORY. Operating Systems 2015 Spring by Euiseong Seo

LAB3: VIRTUAL MEMORY. Operating Systems 2015 Spring by Euiseong Seo LAB3: VIRTUAL MEMORY Operating Systems 2015 Spring by Euiseong Seo Background: Paging (1) Paging in the x86 architecture Background: Paging (2) Current Pintos VM implementation Use paging Page size: 4KB

More information

Section 7: Wait/Exit, Address Translation

Section 7: Wait/Exit, Address Translation William Liu October 15, 2014 Contents 1 Wait and Exit 2 1.1 Thinking about what you need to do.............................. 2 1.2 Code................................................ 2 2 Vocabulary 4

More information

Project #1 Exceptions and Simple System Calls

Project #1 Exceptions and Simple System Calls Project #1 Exceptions and Simple System Calls Introduction to Operating Systems Assigned: January 21, 2004 CSE421 Due: February 17, 2004 11:59:59 PM The first project is designed to further your understanding

More information

Project 5: File Systems

Project 5: File Systems Project 5: File Systems by Ben Pfaff USF modifications by Greg Benson Chapter 1: Project 5: File Systems 1 1 Project 5: File Systems In the previous two assignments, you made extensive use of a file system

More information

CS 140 Project 4 File Systems Review Session

CS 140 Project 4 File Systems Review Session CS 140 Project 4 File Systems Review Session Prachetaa Due Friday March, 14 Administrivia Course withdrawal deadline today (Feb 28 th ) 5 pm Project 3 due today (Feb 28 th ) Review section for Finals on

More information

Section 2: Processes

Section 2: Processes September 7, 2016 Contents 1 Warmup 2 1.1 Hello World............................................ 2 2 Vocabulary 2 3 Problems 3 3.1 Forks................................................ 3 3.2 Stack Allocation.........................................

More information

Operating Systems and Networks Assignment 2

Operating Systems and Networks Assignment 2 Spring Term 2014 Operating Systems and Networks Assignment 2 Assigned on: 27th February 2014 Due by: 6th March 2014 1 Scheduling The following table describes tasks to be scheduled. The table contains

More information

SYSTEM CALL IMPLEMENTATION. CS124 Operating Systems Fall , Lecture 14

SYSTEM CALL IMPLEMENTATION. CS124 Operating Systems Fall , Lecture 14 SYSTEM CALL IMPLEMENTATION CS124 Operating Systems Fall 2017-2018, Lecture 14 2 User Processes and System Calls Previously stated that user applications interact with the kernel via system calls Typically

More information

Section 4: Threads CS162. September 15, Warmup Hello World Vocabulary 2

Section 4: Threads CS162. September 15, Warmup Hello World Vocabulary 2 CS162 September 15, 2016 Contents 1 Warmup 2 1.1 Hello World............................................ 2 2 Vocabulary 2 3 Problems 3 3.1 Join................................................ 3 3.2 Stack

More information

Processes (Intro) Yannis Smaragdakis, U. Athens

Processes (Intro) Yannis Smaragdakis, U. Athens Processes (Intro) Yannis Smaragdakis, U. Athens Process: CPU Virtualization Process = Program, instantiated has memory, code, current state What kind of memory do we have? registers + address space Let's

More information

by Marina Cholakyan, Hyduke Noshadi, Sepehr Sahba and Young Cha

by Marina Cholakyan, Hyduke Noshadi, Sepehr Sahba and Young Cha CS 111 Scribe Notes for 4/11/05 by Marina Cholakyan, Hyduke Noshadi, Sepehr Sahba and Young Cha Processes What is a process? A process is a running instance of a program. The Web browser you're using to

More information

CSC369 Lecture 2. Larry Zhang, September 21, 2015

CSC369 Lecture 2. Larry Zhang, September 21, 2015 CSC369 Lecture 2 Larry Zhang, September 21, 2015 1 Volunteer note-taker needed by accessibility service see announcement on Piazza for details 2 Change to office hour to resolve conflict with CSC373 lecture

More information

Midterm Exam #2 April 20, 2016 CS162 Operating Systems

Midterm Exam #2 April 20, 2016 CS162 Operating Systems University of California, Berkeley College of Engineering Computer Science Division EECS Spring 2016 Anthony D. Joseph Midterm Exam #2 April 20, 2016 CS162 Operating Systems Your Name: SID AND 162 Login:

More information

Pintos Project 3 Virtual Memory. October 26, 2016

Pintos Project 3 Virtual Memory. October 26, 2016 Pintos Project 3 Virtual Memory October 26, 2016 Background Definitions First Virtual Address: Physical Address in the eyes of a procses Page Fault: Process accessing memory not allocated to it Page: A

More information

Pebbles Kernel Specification September 26, 2004

Pebbles Kernel Specification September 26, 2004 15-410, Operating System Design & Implementation Pebbles Kernel Specification September 26, 2004 Contents 1 Introduction 2 1.1 Overview...................................... 2 2 User Execution Environment

More information

Interrupts, Fork, I/O Basics

Interrupts, Fork, I/O Basics Interrupts, Fork, I/O Basics 12 November 2017 Lecture 4 Slides adapted from John Kubiatowicz (UC Berkeley) 12 Nov 2017 SE 317: Operating Systems 1 Topics for Today Interrupts Native control of Process

More information

Section 4: Threads and Context Switching

Section 4: Threads and Context Switching CS162 September 19-20, 2017 Contents 1 Warmup 2 1.1 Hello World............................................ 2 2 Vocabulary 2 3 Problems 3 3.1 Join................................................ 3 3.2

More information

Project 2: Shell with History1

Project 2: Shell with History1 Project 2: Shell with History1 See course webpage for due date. Submit deliverables to CourSys: https://courses.cs.sfu.ca/ Late penalty is 10% per calendar day (each 0 to 24 hour period past due). Maximum

More information

CSCI 350: Getting Started with C Written by: Stephen Tsung-Han Sher June 12, 2016

CSCI 350: Getting Started with C Written by: Stephen Tsung-Han Sher June 12, 2016 CSCI 350: Getting Started with C Written by: Stephen Tsung-Han Sher June 12, 2016 Introduction As you have been informed, your work with Pintos will be almost exclusively with C. Since you have taken CSCI-103

More information

Operating System Structure

Operating System Structure Operating System Structure CSCI 4061 Introduction to Operating Systems Applications Instructor: Abhishek Chandra Operating System Hardware 2 Questions Operating System Structure How does the OS manage

More information

CS140 Project 3: Virtual Memory. TA: Diveesh Singh

CS140 Project 3: Virtual Memory. TA: Diveesh Singh CS140 Project 3: Virtual Memory TA: Diveesh Singh High level Project requirements High level goal: Remove current limitation that the number and size of programs running in Pintos is limited by main memory

More information

Processes. Johan Montelius KTH

Processes. Johan Montelius KTH Processes Johan Montelius KTH 2017 1 / 47 A process What is a process?... a computation a program i.e. a sequence of operations a set of data structures a set of registers means to interact with other

More information

CSC369 Lecture 2. Larry Zhang

CSC369 Lecture 2. Larry Zhang CSC369 Lecture 2 Larry Zhang 1 Announcements Lecture slides Midterm timing issue Assignment 1 will be out soon! Start early, and ask questions. We will have bonus for groups that finish early. 2 Assignment

More information

A process. the stack

A process. the stack A process Processes Johan Montelius What is a process?... a computation KTH 2017 a program i.e. a sequence of operations a set of data structures a set of registers means to interact with other processes

More information

UNIVERSITY OF NEBRASKA AT OMAHA Computer Science 4500/8506 Operating Systems Fall Programming Assignment 1 (updated 9/16/2017)

UNIVERSITY OF NEBRASKA AT OMAHA Computer Science 4500/8506 Operating Systems Fall Programming Assignment 1 (updated 9/16/2017) UNIVERSITY OF NEBRASKA AT OMAHA Computer Science 4500/8506 Operating Systems Fall 2017 Programming Assignment 1 (updated 9/16/2017) Introduction The purpose of this programming assignment is to give you

More information

Last time: introduction. Networks and Operating Systems ( ) Chapter 2: Processes. This time. General OS structure. The kernel is a program!

Last time: introduction. Networks and Operating Systems ( ) Chapter 2: Processes. This time. General OS structure. The kernel is a program! ADRIAN PERRIG & TORSTEN HOEFLER Networks and Operating Systems (252-0062-00) Chapter 2: Processes Last time: introduction Introduction: Why? February 12, 2016 Roles of the OS Referee Illusionist Glue Structure

More information

The operating system The operating system runs java programs as you saw in phase 1.

The operating system The operating system runs java programs as you saw in phase 1. 1 Introduction Nachos is divided into 2 parts: The operating system The operating system runs java programs as you saw in phase 1. User programs User programs are written in C and compiled into MIPS machine

More information

Project 2! CSE 421/521 - Operating Systems! Virtual Memory in Pintos

Project 2! CSE 421/521 - Operating Systems! Virtual Memory in Pintos Project 2! CSE 421/521 - Operating Systems! Virtual Memory in Pintos Deadline: December 4, 2013 @ 11.59pm Muhammed Fatih Bulut Preparation Chapters 8-9 from Silberschatz.! Lecture slides on Memory and

More information

Midterm Exam #1 February 28, 2018 CS162 Operating Systems

Midterm Exam #1 February 28, 2018 CS162 Operating Systems University of California, Berkeley College of Engineering Computer Science Division EECS Spring 2018 Anthony D. Joseph and Jonathan Ragan-Kelley Midterm Exam #1 February 28, 2018 CS162 Operating Systems

More information

Cache Lab Implementation and Blocking

Cache Lab Implementation and Blocking Cache Lab Implementation and Blocking Lou Clark February 24 th, 2014 1 Welcome to the World of Pointers! 2 Class Schedule Cache Lab Due Thursday. Start soon if you haven t yet! Exam Soon! Start doing practice

More information

The Process Abstraction. CMPU 334 Operating Systems Jason Waterman

The Process Abstraction. CMPU 334 Operating Systems Jason Waterman The Process Abstraction CMPU 334 Operating Systems Jason Waterman How to Provide the Illusion of Many CPUs? Goal: run N processes at once even though there are M CPUs N >> M CPU virtualizing The OS can

More information

CPS 310 first midterm exam, 10/6/2014

CPS 310 first midterm exam, 10/6/2014 CPS 310 first midterm exam, 10/6/2014 Your name please: Part 1. More fun with fork and exec* What is the output generated by this program? Please assume that each executed print statement completes, e.g.,

More information

CPSC 341 OS & Networks. Processes. Dr. Yingwu Zhu

CPSC 341 OS & Networks. Processes. Dr. Yingwu Zhu CPSC 341 OS & Networks Processes Dr. Yingwu Zhu Process Concept Process a program in execution What is not a process? -- program on a disk A process is an active object, but a program is just a file It

More information

1. Overview This project will help you understand address spaces and virtual memory management.

1. Overview This project will help you understand address spaces and virtual memory management. Project 2--Memory Worth: 12 points Assigned: Due: 1. Overview This project will help you understand address spaces and virtual memory management. In this project, you will implement an external pager,

More information

There are 10 total numbered pages, 5 Questions. You have 60 minutes. Budget your time carefully!

There are 10 total numbered pages, 5 Questions. You have 60 minutes. Budget your time carefully! UNIVERSITY OF TORONTO FACULTY OF APPLIED SCIENCE AND ENGINEERING MIDTERM EXAMINATION, February, 2018 Third Year Materials ECE344H1 - Operating Systems Calculator Type: 2 Exam Type: A Examiner D. Yuan Please

More information

Fall 2015 COMP Operating Systems. Lab #3

Fall 2015 COMP Operating Systems. Lab #3 Fall 2015 COMP 3511 Operating Systems Lab #3 Outline n Operating System Debugging, Generation and System Boot n Review Questions n Process Control n UNIX fork() and Examples on fork() n exec family: execute

More information

518 Lecture Notes Week 3

518 Lecture Notes Week 3 518 Lecture Notes Week 3 (Sept. 15, 2014) 1/8 518 Lecture Notes Week 3 1 Topics Process management Process creation with fork() Overlaying an existing process with exec Notes on Lab 3 2 Process management

More information

(In columns, of course.)

(In columns, of course.) CPS 310 first midterm exam, 10/9/2013 Your name please: Part 1. Fun with forks (a) What is the output generated by this program? In fact the output is not uniquely defined, i.e., it is not always the same.

More information

Project 1 System Calls

Project 1 System Calls Project 1 System Calls Introduction In this project, you will become familiar with: 1. Using the xv6 Makefile 2. Using conditional compilation. 3. The xv6 system call invocation path. 4. Implementing a

More information

Unix-Linux 2. Unix is supposed to leave room in the process table for a superuser process that could be used to kill errant processes.

Unix-Linux 2. Unix is supposed to leave room in the process table for a superuser process that could be used to kill errant processes. Unix-Linux 2 fork( ) system call is successful parent suspended child created fork( ) returns child pid to parent fork( ) returns zero value to child; zero is the pid of the swapper/scheduler process both

More information

Recitation 8: Tshlab + VM

Recitation 8: Tshlab + VM Recitation 8: Tshlab + VM Instructor: TAs 1 Outline Labs Signals IO Virtual Memory 2 TshLab and MallocLab TshLab due Tuesday MallocLab is released immediately after Start early Do the checkpoint first,

More information

Operating Systems (234123) Spring 2017 (Homework Wet 1) Homework 1 Wet

Operating Systems (234123) Spring 2017 (Homework Wet 1) Homework 1 Wet Homework 1 Wet Due Date: 30/4/2017 23:00 Teaching assistant in charge: Yehonatan Buchnik Important: the Q&A for the exercise will take place at a public forum Piazza only. Critical updates about the HW

More information

CS 322 Operating Systems Practice Midterm Questions

CS 322 Operating Systems Practice Midterm Questions ! CS 322 Operating Systems 1. Processes go through the following states in their lifetime. time slice ends Consider the following events and answer the questions that follow. Assume there are 5 processes,

More information

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017 ECE 550D Fundamentals of Computer Systems and Engineering Fall 2017 The Operating System (OS) Prof. John Board Duke University Slides are derived from work by Profs. Tyler Bletsch and Andrew Hilton (Duke)

More information

Carnegie Mellon. Cache Lab. Recitation 7: Oct 11 th, 2016

Carnegie Mellon. Cache Lab. Recitation 7: Oct 11 th, 2016 1 Cache Lab Recitation 7: Oct 11 th, 2016 2 Outline Memory organization Caching Different types of locality Cache organization Cache lab Part (a) Building Cache Simulator Part (b) Efficient Matrix Transpose

More information

CSE 333 SECTION 3. POSIX I/O Functions

CSE 333 SECTION 3. POSIX I/O Functions CSE 333 SECTION 3 POSIX I/O Functions Administrivia Questions (?) HW1 Due Tonight Exercise 7 due Monday (out later today) POSIX Portable Operating System Interface Family of standards specified by the

More information

CSCE Operating Systems Interrupts, Exceptions, and Signals. Qiang Zeng, Ph.D. Fall 2018

CSCE Operating Systems Interrupts, Exceptions, and Signals. Qiang Zeng, Ph.D. Fall 2018 CSCE 311 - Operating Systems Interrupts, Exceptions, and Signals Qiang Zeng, Ph.D. Fall 2018 Previous Class Process state transition Ready, blocked, running Call Stack Execution Context Process switch

More information

Fall 2017 :: CSE 306. Process Abstraction. Nima Honarmand

Fall 2017 :: CSE 306. Process Abstraction. Nima Honarmand Process Abstraction Nima Honarmand Administrivia Course staff email: cse306ta at cs.stonybrook.edu Both Babak and I will be monitoring the account to ensure a timely response What to use it for: any email

More information

Processes & Threads. Today. Next Time. ! Process concept! Process model! Implementing processes! Multiprocessing once again. ! More of the same J

Processes & Threads. Today. Next Time. ! Process concept! Process model! Implementing processes! Multiprocessing once again. ! More of the same J Processes & Threads Today! Process concept! Process model! Implementing processes! Multiprocessing once again Next Time! More of the same J The process model! Most computers can do more than one thing

More information

Windows architecture. user. mode. Env. subsystems. Executive. Device drivers Kernel. kernel. mode HAL. Hardware. Process B. Process C.

Windows architecture. user. mode. Env. subsystems. Executive. Device drivers Kernel. kernel. mode HAL. Hardware. Process B. Process C. Structure Unix architecture users Functions of the System tools (shell, editors, compilers, ) standard library System call Standard library (printf, fork, ) OS kernel: processes, memory management, file

More information

TCSS 422: OPERATING SYSTEMS

TCSS 422: OPERATING SYSTEMS TCSS 422: OPERATING SYSTEMS fork() Process API, Limited Direct Execution Wes J. Lloyd Institute of Technology University of Washington - Tacoma Creates a new process - think of a fork in the road Parent

More information

Processes. Operating System CS 217. Supports virtual machines. Provides services: User Process. User Process. OS Kernel. Hardware

Processes. Operating System CS 217. Supports virtual machines. Provides services: User Process. User Process. OS Kernel. Hardware es CS 217 Operating System Supports virtual machines Promises each process the illusion of having whole machine to itself Provides services: Protection Scheduling Memory management File systems Synchronization

More information

CS 475. Process = Address space + one thread of control Concurrent program = multiple threads of control

CS 475. Process = Address space + one thread of control Concurrent program = multiple threads of control Processes & Threads Concurrent Programs Process = Address space + one thread of control Concurrent program = multiple threads of control Multiple single-threaded processes Multi-threaded process 2 1 Concurrent

More information

628 Lecture Notes Week 4

628 Lecture Notes Week 4 628 Lecture Notes Week 4 (February 3, 2016) 1/8 628 Lecture Notes Week 4 1 Topics I/O Redirection Notes on Lab 4 Introduction to Threads Review Memory spaces #include #include int

More information

Hint #1. Define a syscall

Hint #1. Define a syscall PC 5 System call Exercice Clone the git repository git clone http://gitlab.montefiore.ulg.ac.be/info0940/kernel-4.4.50.git Make a "PC4" branch Add a sys_forkexec system call It is the equivalent of calling

More information

Design Overview of the FreeBSD Kernel CIS 657

Design Overview of the FreeBSD Kernel CIS 657 Design Overview of the FreeBSD Kernel CIS 657 Organization of the Kernel Machine-independent 86% of the kernel (80% in 4.4BSD) C code Machine-dependent 14% of kernel Only 0.6% of kernel in assembler (2%

More information

Design Overview of the FreeBSD Kernel. Organization of the Kernel. What Code is Machine Independent?

Design Overview of the FreeBSD Kernel. Organization of the Kernel. What Code is Machine Independent? Design Overview of the FreeBSD Kernel CIS 657 Organization of the Kernel Machine-independent 86% of the kernel (80% in 4.4BSD) C C code Machine-dependent 14% of kernel Only 0.6% of kernel in assembler

More information

UNIVERSITY OF NEBRASKA AT OMAHA Computer Science 4500/8506 Operating Systems Summer 2016 Programming Assignment 1 Introduction The purpose of this

UNIVERSITY OF NEBRASKA AT OMAHA Computer Science 4500/8506 Operating Systems Summer 2016 Programming Assignment 1 Introduction The purpose of this UNIVERSITY OF NEBRASKA AT OMAHA Computer Science 4500/8506 Operating Systems Summer 2016 Programming Assignment 1 Introduction The purpose of this programming assignment is to give you some experience

More information

ENGR 3950U / CSCI 3020U Midterm Exam SOLUTIONS, Fall 2012 SOLUTIONS

ENGR 3950U / CSCI 3020U Midterm Exam SOLUTIONS, Fall 2012 SOLUTIONS SOLUTIONS ENGR 3950U / CSCI 3020U (Operating Systems) Midterm Exam October 23, 2012, Duration: 80 Minutes (10 pages, 12 questions, 100 Marks) Instructor: Dr. Kamran Sartipi Question 1 (Computer Systgem)

More information

Computer Architecture and Operating Systems Course: International University Bremen Date: Final Examination

Computer Architecture and Operating Systems Course: International University Bremen Date: Final Examination Computer Architecture and Operating Systems Course: 320202 International University Bremen Date: 2006-05-22 Dr. Jürgen Schönwälder Type: open book Final Examination Problem F.1: operating systems (2+2+2+2+2=10

More information

Operating Systems and Networks Assignment 9

Operating Systems and Networks Assignment 9 Spring Term 01 Operating Systems and Networks Assignment 9 Assigned on: rd May 01 Due by: 10th May 01 1 General Operating Systems Questions a) What is the purpose of having a kernel? Answer: A kernel is

More information

Today s class. Finish review of C Process description and control. Informationsteknologi. Tuesday, September 18, 2007

Today s class. Finish review of C Process description and control. Informationsteknologi. Tuesday, September 18, 2007 Today s class Finish review of C Process description and control Computer Systems/Operating Systems - Class 6 1 Finish review of C Review in class exercise 3 #1: game cptr is 5004 #2: The value of c is

More information

CS354/CS350 Operating Systems Winter 2004

CS354/CS350 Operating Systems Winter 2004 CS354/CS350 Operating Systems Winter 2004 Assignment Three (March 14 VERSION) Design and Preliminary Testing Document Due: Tuesday March 23, 11:59 am Full Assignment Due: Tuesday March 30, 11:59 am 1 Nachos

More information

CS 326: Operating Systems. Process Execution. Lecture 5

CS 326: Operating Systems. Process Execution. Lecture 5 CS 326: Operating Systems Process Execution Lecture 5 Today s Schedule Process Creation Threads Limited Direct Execution Basic Scheduling 2/5/18 CS 326: Operating Systems 2 Today s Schedule Process Creation

More information

Lab 4. Out: Friday, February 25th, 2005

Lab 4. Out: Friday, February 25th, 2005 CS034 Intro to Systems Programming Doeppner & Van Hentenryck Lab 4 Out: Friday, February 25th, 2005 What you ll learn. In this lab, you ll learn to use function pointers in a variety of applications. You

More information

Final CSE 131B Spring 2004

Final CSE 131B Spring 2004 Login name Signature Name Student ID Final CSE 131B Spring 2004 Page 1 Page 2 Page 3 Page 4 Page 5 Page 6 Page 7 Page 8 (25 points) (24 points) (32 points) (24 points) (28 points) (26 points) (22 points)

More information

Prepared by Prof. Hui Jiang Process. Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University

Prepared by Prof. Hui Jiang Process. Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University EECS3221.3 Operating System Fundamentals No.2 Process Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University How OS manages CPU usage? How CPU is used? Users use CPU to run

More information

W4118 Operating Systems. Junfeng Yang

W4118 Operating Systems. Junfeng Yang W4118 Operating Systems Junfeng Yang What is a process? Outline Process dispatching Common process operations Inter-process Communication What is a process Program in execution virtual CPU Process: an

More information

CS 470 Operating Systems Spring 2013 Shell Project

CS 470 Operating Systems Spring 2013 Shell Project CS 470 Operating Systems Spring 2013 Shell Project 40 points Out: January 11, 2013 Due: January 25, 2012 (Friday) The purpose of this project is provide experience with process manipulation and signal

More information

CS Lab 1 xv6 Introduction Setup and exercise

CS Lab 1 xv6 Introduction Setup and exercise CS 1550 Lab 1 xv6 Introduction Setup and exercise CS 1550 Kernel Space vs User Space OS manages hardware, services and user processes CPU Memory (Address space) I/O devices (Disk, mouse, video card, sound,

More information

Understanding Pointers

Understanding Pointers Division of Mathematics and Computer Science Maryville College Pointers and Addresses Memory is organized into a big array. Every data item occupies one or more cells. A pointer stores an address. A pointer

More information

Process. Prepared by Prof. Hui Jiang Dept. of EECS, York Univ. 1. Process in Memory (I) PROCESS. Process. How OS manages CPU usage? No.

Process. Prepared by Prof. Hui Jiang Dept. of EECS, York Univ. 1. Process in Memory (I) PROCESS. Process. How OS manages CPU usage? No. EECS3221.3 Operating System Fundamentals No.2 Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University How OS manages CPU usage? How CPU is used? Users use CPU to run programs

More information

Programming Assignment Multi-Threading and Debugging 2

Programming Assignment Multi-Threading and Debugging 2 Programming Assignment Multi-Threading and Debugging 2 Due Date: Friday, June 1 @ 11:59 pm PAMT2 Assignment Overview The purpose of this mini-assignment is to continue your introduction to parallel programming

More information

CSci 4061 Introduction to Operating Systems. IPC: Basics, Pipes

CSci 4061 Introduction to Operating Systems. IPC: Basics, Pipes CSci 4061 Introduction to Operating Systems IPC: Basics, Pipes Today Directory wrap-up Communication/IPC Test in one week Communication Abstraction: conduit for data exchange between two or more processes

More information

Processes. CS439: Principles of Computer Systems January 30, 2019

Processes. CS439: Principles of Computer Systems January 30, 2019 Processes CS439: Principles of Computer Systems January 30, 2019 What We Know Operating system complexity increased over time in response to economic and technological changes The three roles did not show

More information

Processes. CS439: Principles of Computer Systems January 24, 2018

Processes. CS439: Principles of Computer Systems January 24, 2018 Processes CS439: Principles of Computer Systems January 24, 2018 Last Time History Lesson Hardware expensive, humans cheap Hardware cheap, humans expensive Hardware very cheap, humans very expensive Dual-mode

More information

Hello, World! in C. Johann Myrkraverk Oskarsson October 23, The Quintessential Example Program 1. I Printing Text 2. II The Main Function 3

Hello, World! in C. Johann Myrkraverk Oskarsson October 23, The Quintessential Example Program 1. I Printing Text 2. II The Main Function 3 Hello, World! in C Johann Myrkraverk Oskarsson October 23, 2018 Contents 1 The Quintessential Example Program 1 I Printing Text 2 II The Main Function 3 III The Header Files 4 IV Compiling and Running

More information

CS 33. Architecture and the OS. CS33 Intro to Computer Systems XIX 1 Copyright 2018 Thomas W. Doeppner. All rights reserved.

CS 33. Architecture and the OS. CS33 Intro to Computer Systems XIX 1 Copyright 2018 Thomas W. Doeppner. All rights reserved. CS 33 Architecture and the OS CS33 Intro to Computer Systems XIX 1 Copyright 2018 Thomas W. Doeppner. All rights reserved. The Operating System My Program Mary s Program Bob s Program OS CS33 Intro to

More information