lec3_proc

lec3_proc - Announcement CSE120 Principles of Operating...

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

View Full Document Right Arrow Icon
1 CSE120 Principles of Operating Systems Prof Yuanyuan (YY) Zhou Lecture 3: Process Apr 4th, 2011 4/3/2011 CSE120 - Operating Systems, Yuanyuan Zhou 2 Announcement Project 0 (installation & Submission) due on Wednesday 6th Project groups When you have chosen groups, send your group info to Matt Assembly Code 3 Convert to assembly: while (save[i] == k) i += 1; i and k are in $s3 and $s5 and base of array save[] is in $s6 Loop: sll $t1, $s3, 2 add $t1, $t1, $s6 lw $t0, 0($t1) bne $t0, $s5, Exit addi $s3, $s3, 1 j Loop Exit: Function Call 4/3/2011 CSE120 - Operating Systems, Yuanyuan Zhou 4 #Listing 3 .globl main main: movl $10, %eax call foo ret foo: addl $5, %eax ret
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 System Call More information can be found in http://www.int80h.org/ 4/3/2011 CSE120 - Operating Systems, Yuanyuan Zhou 5 open: push dword mode push dword flags push dword path mov eax, 5 push eax ; Or any other dword int 80h add esp, byte 16 4/3/2011 CSE 120 – Lecture 2 – Architectural Support for OSes 6 Steps in Making a System Call Example: read (fd, buffer,nbytes) System call file in Linux If you need to use the other convention implemented in the Linux emulation mode, read /usr/src/sys/i386/linux/syscalls.master. 0 STD NOHIDE { int nosys(void); } syscall nosys_args int 1 STD NOHIDE { void exit(int rval); } exit rexit_args void 2 STD POSIX { int fork(void); } 3 STD POSIX { ssize_t read(int fd, void *buf, size_t nbyte); } 4 STD POSIX { ssize_t write(int fd, const void *buf, size_t nbyte); } 5STD POSIX { int open(char *path, int flags, int mode); } 6STD POSIX { int close(int fd); } ... 4/3/2011 CSE120 - Operating Systems, Yuanyuan Zhou 7 Review: Interrupt Vector Table 4/3/2011 CSE120 - Operating Systems, Yuanyuan Zhou 8
Background image of page 2
3 4/3/2011 CSE120 - Operating Systems, Yuanyuan Zhou 9 Processes This lecture starts a class segment that covers processes, threads, and synchronization These topics are perhaps the most important in CSE120 You can rest assured that they will be covered in the exams Today’s topics are processes and process management What are the units of execution? How are those units of execution represented in the OS? What are the possible execution states of a process? How does a process move from one state to another? 4/3/2011 CSE120 - Operating Systems, Yuanyuan Zhou 10 Users, Programs Users have accounts on the system Users launch programs Many users may launch same program One user may launch many instances of the same program Then what is a process? 4/3/2011 CSE120 - Operating Systems, Yuanyuan Zhou 11 The Process The process is the OS abstraction for execution It is the unit of execution It is the dynamic execution context of a program A process is sometimes called a job or a task Real life analogy? 4/3/2011
Background image of page 3

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

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

This note was uploaded on 02/26/2012 for the course CSE 120 taught by Professor Staff during the Spring '08 term at UCSD.

Page1 / 12

lec3_proc - Announcement CSE120 Principles of Operating...

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

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