Processes, Exceptional Control Flow
|
|
- Edwina Cameron
- 6 years ago
- Views:
Transcription
1 CIS330, Week 9 Prcesses, Exceptinal Cntrl Flw CSAPPe2, Chapter 8
2 Plan fr Tday Exceptinal Cntrl Flw Exceptins Prcess cntext switches Creating and destrying prcesses
3 Cntrl Flw Cmputers d Only One Thing Frm startup t shutdwn, a CPU simply reads and executes (interprets) a sequence f instructins, ne at a time. This sequence is the system s physical cntrl flw (r flw f cntrl). Time Physical cntrl flw <startup> inst 1 inst 2 inst 3 inst n <shutdwn>
4 Altering the Cntrl Flw Up t Nw: tw mechanisms fr changing cntrl flw: Jumps and branches Call and return using the stack discipline. Bth react t changes in prgram state. Insufficient fr a useful system Difficult fr the CPU t react t changes in system state. data arrives frm a disk r a netwrk adapter. Instructin divides by zer User hits Ctrl-c at the keybard System timer expires System needs mechanisms fr exceptinal cntrl flw
5 Exceptinal Cntrl Flw Mechanisms fr exceptinal cntrl flw exists at all levels f a cmputer system. Lw level Mechanism exceptins change in cntrl flw in respnse t a system event (i.e., change in system state) Cmbinatin f hardware and OS sftware Higher Level Mechanisms Prcess cntext switch Signals Nnlcal jumps (setjmp/lngjmp) Implemented by either: Ø OS sftware (cntext switch and signals). Ø C language runtime library: nnlcal jumps.
6 System cntext fr exceptins USB Prts Keybard Muse Mdem Printer Prcessr Interrupt cntrller Timer Serial prt cntrllers Parallel prt cntrller I/O Chip Lcal/IO Bus Memry IDE disk cntrller SATA cntrller Vide adapter Netwrk adapter disk SATA bus Display Netwrk disk CDROM
7 Exceptins An exceptin is a transfer f cntrl t the OS in respnse t sme event (i.e., change in prcessr state) User Prcess OS event current next exceptin exceptin prcessing by exceptin handler exceptin return (ptinal)
8 Interrupt Vectrs n-1 Exceptin numbers interrupt vectr... cde fr exceptin handler 0 cde fr exceptin handler 1 cde fr exceptin handler 2... cde fr exceptin handler n-1 Each type f event has a unique exceptin number k Index int jump table (a.k.a., interrupt vectr) Jump table entry k pints t a functin (exceptin handler). Handler k is called each time exceptin k ccurs.
9 Asynchrnus Exceptins (Interrupts) Caused by events external t the prcessr Indicated by setting the prcessr s interrupt pin handler returns t next instructin. Examples: I/O interrupts hitting ctl-c at the keybard arrival f a packet frm a netwrk arrival f a data sectr frm a disk Hard reset interrupt hitting the reset buttn
10 Synchrnus Exceptins Caused by events that ccur as a result f executing an instructin: Traps intentinal, e.g., system calls, breakpints, special instructins; returns cntrl t next instructin. Faults unintentinal but pssibly recverable, e.g., page faults (recverable), prtectin faults (unrecverable), flatingpint exceptins; re-executes faulting ( current ) instructin r abrts. Abrts: unintentinal and unrecverable, e.g., parity errr, machine check; abrts current prgram
11 Precise vs. Imprecise Faults Precise Faults: the exceptin handler knws exactly which instructin caused the fault. All prir instructins have cmpleted and n subsequent instructins had any effect. Imprecise Faults: the CPU was wrking n multiple instructins cncurrently and an ambiguity may exists as t which instructin caused the Fault. Fr example, multiple FP instructins were in the pipe and ne caused an exceptin.
12 Trap Example Opening a File User calls pen(filename, ptins) 0804d070 < libc_pen>: d082: cd 80 int $0x80 804d084:... 5b pp %ebx Functin pen executes system call instructin int OS must find r create file, get it ready fr reading r writing Returns integer file descriptr User Prcess int pp return exceptin OS Open file
13 Fault Example #1 Memry Reference User writes t memry lcatin That prtin (page) f user s memry is currently n disk Page handler must lad page int physical memry Returns t faulting instructin Successful n secnd try int a[1000]; main () { a[500] = 13; 80483b7: c d d mvl $0xd,0x8049d10 User Prcess OS event mvl return page fault Create page and lad int memry
14 Fault Example #2 Memry Reference with TLB miss User writes t memry lcatin User Prcess int a[1000]; main () { a[500] = 13; That prtin (page) f user s memry is currently in physical memry, but the prcessr has frgtten hw t translate the this virtual address t the physical address TLB must be reladed with current translatin Returns t faulting instructin Successful n secnd try OS r Hardware event mvl return TLB miss Lk up address translatin and stre it in a TLB entry
15 Fault Example Memry Reference User writes t memry lcatin Address is nt valid int a[1000]; main () { a[5000] = 13; 80483b7: c e d mvl $0xd,0x804e360 Page handler detects invalid address Sends SIGSEG signal t user prcess User prcess exits with segmentatin fault User Prcess OS event mvl page fault Detect invalid address Signal prcess
16 Prcesses Definitin: A prcess is an instance f a running prgram. One f the mst prfund ideas in cmputer science Nt the same as prgram r prcessr Prcess prvides each prgram with tw key abstractins: Lgical cntrl flw Each prgram seems t have exclusive use f the CPU Private address space Each prgram seems t have exclusive use f main memry Hw are these Illusins maintained? Prcess executins interleaved (multitasking) Address spaces managed by virtual memry system
17 Lgical Cntrl Flws Each prcess has its wn lgical cntrl flw Prcess A Prcess B Prcess C Time
18 Cncurrent Prcesses Tw prcesses run cncurrently (are cncurrent) if their flws verlap in time. Otherwise, they are sequential. Examples: Cncurrent: A & B, A & C Sequential: B & C Prcess A Prcess B Prcess C Time
19 User View f Cncurrent Prcesses Cntrl flws fr cncurrent prcesses are disjint in time. Hwever, we can think f cncurrent prcesses are running in parallel with each ther. Time Prcess A Prcess B Prcess C
20 Cntext Switching Prcesses are managed by a shared chunk f OS cde called the kernel Imprtant: the kernel is nt a separate prcess, but rather runs as part f sme user prcess Cntrl flw passes frm ne prcess t anther via a cntext switch. Time Prcess A cde Prcess B cde user cde kernel cde user cde kernel cde user cde cntext switch cntext switch
21 Private Address Spaces Each prcess has its wn private address space. 0xffffffff 0xc x kernel virtual memry (cde, data, heap, stack) user stack (created at runtime) memry mapped regin fr shared libraries Memry invisible t user cde %esp (stack pinter) 0x run-time heap (managed by mallc) read/write segment (.data,.bss) read-nly segment (.init,.text,.rdata) unused brk laded frm the executable file
22 execve: Lading and Running Prgrams int execve( char *filename, char *argv[], char *envp ) Lads and runs Executable filename With argument list argv And envirnment variable list envp Des nt return (unless errr) Overwrites prcess, keeps pid Envirnment variables: name=value strings 0xbfffffff Null-terminated envirnment variable strings Stack Null-terminated cmmandline arg strings unused envp[n] = NULL envp[n-1] envp[0] argv[argc] = NULL argv[argc-1] argv[0] Linker vars envp argv argc
23 execve: Example envp[n] = NULL envp[n-1] envp[0] PWD=/hmes/iws/luisceze PRINTER=ps581 USER=luisceze argv[argc] = NULL argv[argc-1] argv[0] /usr/include -l ls
24 Virtual Machines All current general purpse cmputers supprt multiple, cncurrent user-level prcesses. Is it pssible t run multiple kernels n the same machine? Yes: Virtual Machines (VM) were supprted by IBM mainframes fr ver 30 years Intel s IA32 instructin set architecture is nt virtualizable (neither are the Sparc, Mips, and PPC ISAs) With a lt f clever hacking, Vmware managed t virtualize the IA32 ISA in sftware User Mde Linux
25 frk: Creating new prcesses int frk(vid) creates a new prcess (child prcess) that is identical t the calling prcess (parent prcess) returns 0 t the child prcess returns child s pid t the parent prcess if (frk() == 0) { printf("hell frm child\n"); else { printf("hell frm parent\n"); Frk is interesting (and ften cnfusing) because it is called nce but returns twice
26 Frk Example #1 Parent and child bth run same cde Distinguish parent frm child by return value frm frk Start with same state, but each has private cpy Including shared utput file descriptr Relative rdering f their print statements undefined vid frk1() { int x = 1; pid_t pid = frk(); if (pid == 0) { printf("child has x = %d\n", ++x); else { printf("parent has x = %d\n", --x); printf("bye frm prcess %d with x = %d\n", getpid(), x);
27 Frk Example #2 Bth parent and child can cntinue frking vid frk2() { printf("l0\n"); frk(); printf("l1\n"); frk(); printf("bye\n"); L1 L0 L1 Bye Bye Bye Bye
28 Frk Example #3 Bth parent and child can cntinue frking vid frk3() { printf("l0\n"); frk(); printf("l1\n"); frk(); printf("l2\n"); frk(); printf("bye\n"); L0 L2 L1 L2 L2 L1 L2 Bye Bye Bye Bye Bye Bye Bye Bye
29 Frk Example #4 Bth parent and child can cntinue frking vid frk4() { printf("l0\n"); if (frk()!= 0) { printf("l1\n"); if (frk()!= 0) { printf("l2\n"); frk(); printf("bye\n"); child L0 L1 L2 parent Bye Bye Bye Bye
30 Frk Example #5 vid frk5() { printf("l0\n"); if (frk() == 0) { printf("l1\n"); if (frk() == 0) { printf("l2\n"); frk(); printf("bye\n"); L1 L0 Bye L2 Bye Bye Bye
31 exit: Destrying Prcess vid exit(int status) exits a prcess Nrmally return with status 0 atexit() registers functins t be executed upn exit vid cleanup(vid) { printf("cleaning up\n"); vid frk6() { atexit(cleanup); frk(); exit(0);
32 Zmbies Idea When prcess terminates, still cnsumes system resurces Varius tables maintained by OS Called a zmbie Reaping Perfrmed by parent n terminated child Parent is given exit status infrmatin Kernel discards prcess What if Parent Desn t Reap? If any parent terminates withut reaping a child, then child will be reaped by init prcess Only need explicit reaping fr lng-running prcesses E.g., shells and servers
33 Zmbie Example linux>./frks 7 & [1] 6639 Running Parent, PID = 6639 Terminating Child, PID = 6640 linux> ps PID TTY TIME CMD 6585 ttyp9 00:00:00 tcsh 6639 ttyp9 00:00:03 frks 6640 ttyp9 00:00:00 frks <defunct> 6641 ttyp9 00:00:00 ps linux> kill 6639 [1] Terminated linux> ps PID TTY TIME CMD 6585 ttyp9 00:00:00 tcsh 6642 ttyp9 00:00:00 ps ps shws child prcess as defunct Killing parent allws child t be reaped vid frk7() { if (frk() == 0) { /* Child */ printf("terminating Child, PID = %d\n", getpid()); exit(0); else { printf("running Parent, PID = %d\n", getpid()); while (1) ; /* Infinite lp */
34 Nnterminating Child Example Child prcess still active even thugh parent has terminated Must kill explicitly, r else will keep running indefinitely linux>./frks 8 Terminating Parent, PID = 6675 Running Child, PID = 6676 linux> ps PID TTY TIME CMD 6585 ttyp9 00:00:00 tcsh 6676 ttyp9 00:00:06 frks 6677 ttyp9 00:00:00 ps linux> kill 6676 linux> ps PID TTY TIME CMD 6585 ttyp9 00:00:00 tcsh 6678 ttyp9 00:00:00 ps vid frk8() { if (frk() == 0) { /* Child */ printf("running Child, PID = %d\n", getpid()); while (1) ; /* Infinite lp */ else { printf("terminating Parent, PID = %d\n", getpid()); exit(0);
35 wait: Synchrnizing with children int wait(int *child_status) suspends current prcess until ne f its children terminates return value is the pid f the child prcess that terminated if child_status!= NULL, then the bject it pints t will be set t a status indicating why the child prcess terminated
36 wait: Synchrnizing with children vid frk9() { int child_status; if (frk() == 0) { printf("hc: hell frm child\n"); else { printf("hp: hell frm parent\n"); wait(&child_status); printf("ct: child has terminated\n"); printf("bye\n"); exit(); HC Bye HP CT Bye
37 Wait() Example If multiple children cmpleted, will take in arbitrary rder Can use macrs WIFEXITED and WEXITSTATUS t get infrmatin abut exit status vid frk10() { pid_t pid[n]; int i; int child_status; fr (i = 0; i < N; i++) if ((pid[i] = frk()) == 0) exit(100+i); /* Child */ fr (i = 0; i < N; i++) { pid_t wpid = wait(&child_status); if (WIFEXITED(child_status)) printf("child %d terminated with exit status %d\n", wpid, WEXITSTATUS(child_status)); else printf("child %d terminate abnrmally\n", wpid);
38 Waitpid() waitpid(pid, &status, ptins) Can wait fr specific prcess Varius ptins vid frk11() { pid_t pid[n]; int i; int child_status; fr (i = 0; i < N; i++) if ((pid[i] = frk()) == 0) exit(100+i); /* Child */ fr (i = 0; i < N; i++) { pid_t wpid = waitpid(pid[i], &child_status, 0); if (WIFEXITED(child_status)) printf("child %d terminated with exit status %d\n", wpid, WEXITSTATUS(child_status)); else printf("child %d terminated abnrmally\n", wpid);
39 Wait/Waitpid Example Outputs Using wait (frk10) Child 3565 terminated with exit status 103 Child 3564 terminated with exit status 102 Child 3563 terminated with exit status 101 Child 3562 terminated with exit status 100 Child 3566 terminated with exit status 104 Using waitpid (frk11) Child 3568 terminated with exit status 100 Child 3569 terminated with exit status 101 Child 3570 terminated with exit status 102 Child 3571 terminated with exit status 103 Child 3572 terminated with exit status 104
40 exec: Running new prgrams int execl(char *path, char *arg0, char *arg1,, 0) lads and runs executable at path with args arg0, arg1, path is the cmplete path f an executable arg0 becmes the name f the prcess typically arg0 is either identical t path, r else it cntains nly the executable filename frm path real arguments t the executable start with arg1, etc. list f args is terminated by a (char *)0 argument returns -1 if errr, therwise desn t return! main() { if (frk() == 0) execl("/usr/bin/cp", "cp", "f", "bar", 0); wait(null); printf("cpy cmpleted\n"); exit();
41 Summary Exceptins Events that require nn-standard cntrl flw Generated externally (interrupts) r internally (traps and faults) Prcesses At any given time, system has multiple active prcesses Only ne can execute at a time, hwever, Each prcess appears t have ttal cntrl f the prcessr + has a private memry space
42 Summary (cnt d) Spawning prcesses Call t frk One call, tw returns Prcess cmpletin Call exit One call, n return Reaping and waiting fr Prcesses Call wait r waitpid Lading and running Prgrams Call execl (r variant) One call, (nrmally) n return
Processes, Exceptional
CIS330, Week 9 Processes, Exceptional Control Flow CSAPPe2, Chapter 8 Control Flow Computers do Only One Thing o From startup to shutdown, a CPU simply reads and executes (interprets) a sequence of instructions,
More informationControl Flow. Systemprogrammering 2007 Föreläsning 2 Exceptional Control Flow Part I. Exceptional Control Flow. Altering the Control Flow
Systemprogrammering 2007 Föreläsning 2 Exceptional Control Flow Part I Topics Exceptions Process context switches Creating and destroying processes Control Flow Computers do Only One Thing From startup
More informationExceptional Control Flow Part I Oct. 17, 2002
15-213 The course that gives CMU its Zip! Exceptional Control Flow Part I Oct. 17, 2002 Topics Exceptions Process context switches Creating and destroying processes class16.ppt Control Flow Computers do
More informationExceptional Control Flow Part I
Exceptional Control Flow Part I Today Exceptions Process context switches Creating and destroying processes Next time Signals, non-local jumps, Chris Riesbeck, Fall 2011 Original: Fabian Bustamante Control
More informationExceptional Control Flow Part I September 22, 2008
15-213 Exceptional Control Flow Part I September 22, 2008 Topics Exceptions Process context switches Creating and destroying processes class11.ppt Control Flow Computers do only one thing: From startup
More informationGiving credit where credit is due
CSCE 230J Computer Organization Exceptional Control Flow Part I Dr. Steve Goddard goddard@cse.unl.edu http://cse.unl.edu/~goddard/courses/csce230j Giving credit where credit is due Most of slides for this
More informationAre branches/calls the only way we can get the processor to go somewhere in a program? What is a program? A processor? A process?
Processes and control flow Are branches/calls the only way we can get the processor to go somewhere in a program? What is a program? A processor? A process? 1 Control Flow Processors do only one thing:
More informationExceptional Control Flow: Exceptions and Processes
Exceptional Control Flow: Exceptions and Processes 15-213 / 18-213: Introduction to Computer Systems 12 th Lecture, June 18, 2013 Instructors: Greg Kesden 1 Today Exceptional Control Flow Processes 2 Control
More informationExceptional Control Flow Part I
Exceptional Control Flow Part I Today! Exceptions! Process context switches! Creating and destroying processes Next time! Signals, non-local jumps, Fabián E. Bustamante, 2007 Control flow! Computers do
More informationProcesses. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University
Processes Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Processes An instance of a program in execution. One of the most profound ideas in computer
More informationToday. Exceptional Control Flow Processes. Exceptions and Processes. Control Flow. Altering the Control Flow
Today Exceptional Control Flow: Exceptions and Processes Exceptional Control Flow Processes 15 213 / 18 213: Introduction to Computer Systems 13 th Lecture, Feb 26, 2013 Instructors: Seth Copen Goldstein,
More informationToday. Introduction to Computer Systems /18 243, Fall th Lecture. Control Flow. Altering the Control Flow.
Today Introduction to Computer Systems 15 213/18 243, Fall 2009 11 th Lecture Exceptional Control Flow Processes Instructors: Greg Ganger and Roger Dannenberg Control Flow Processors do only one thing:
More informationExceptional Control Flow Part I Oct. 28, 2009"
Exceptional Control Flow Part I Oct. 28, 2009" Control Flow" Time" Physical control flow" " inst 1 " inst 2 " inst 3 " " inst n " " 2! 3! Altering the Control Flow" Exceptional Control
More informationProcesses: Introduction. CS 241 February 13, 2012
Processes: Introduction CS 241 February 13, 2012 1 Announcements MP2 due tomorrow Deadline and contest cutoff 11:59 p.m. Fabulous prizes on Wednesday MP3 out Wednesday: Shell (1 week) Code from this lecture
More informationIntroduction to Computer Systems , fall th Lecture, Oct. 7 th
Introduction to Computer Systems 15 213, fall 2009 12 th Lecture, Oct. 7 th Instructors: Majd Sakr and Khaled Harras Last Time Cache Organization Memory Mountain Optimization for the memory hierarchy Cache
More informationQ & A (1) Where were string literals stored? Virtual Address. SSE2033: System Software Experiment 2 Spring 2016 Jin-Soo Kim
Processes Prof. Jin-Soo Kim(jinsookim@skku.edu) TA - Dong-Yun Lee (dylee@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Q & A (1) Where were string literals stored?
More informationUniversity of Washington What is a process?
What is a process? What is a program? A processor? A process? 1 What is a process? Why are we learning about processes? Processes are another abstrac'on in our computer system the process abstrac9on provides
More informationAnnouncement (1) sys.skku.edu is now available
Processes Prof. Jin-Soo Kim( jinsookim@skku.edu) TA JinHong Kim( jinhong.kim@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Announcement (1) sys.skku.edu is now available
More informationAltering the Control Flow
Altering the Control Flow Up to Now: two mechanisms for changing control flow: Jumps and branches Call and return using the stack discipline. Both react to changes in program state. Insufficient for a
More informationProgram and OS interac0ons: Excep0ons and Processes
Program and OS interac0ons: Excep0ons and Processes Andrew Case Slides adapted from Jinyang Li, Randy Bryant and Dave O Hallaron 1 User- level programs vs. OS safari httpd bomb OS kernel Send/recv packets,
More informationAltering the Control Flow
Altering the Control Flow Up to Now: two mechanisms for changing control flow: Jumps and branches Call and return using the stack discipline. Both react to changes in program state. Insufficient for a
More informationCSE351 Inaugural Edi7on Spring
Today Excep7onal Control Flow Processes CSE351 Inaugural Edi7on Spring 2010 1 Control Flow Processors do only one thing: From startup to shutdown, a CPU simply reads and executes (interprets) a sequence
More informationCarnegie Mellon. Processes. Lecture 12, May 19 th Alexandre David. Credits to Randy Bryant & Dave O Hallaron from Carnegie Mellon
Processes Lecture 12, May 19 th 2011. Alexandre David Credits to Randy Bryant & Dave O Hallaron from Carnegie Mellon 1 Processes Defini=on: A process is an instance of a running program. One of the most
More informationAre branches/calls the only way we can get the processor to go somewhere in a program? What is a program? A processor? A process?
Processes and control flow Are branches/calls the only way we can get the processor to go somewhere in a program? What is a program? A processor? A process? 1 Control Flow Processors do only one thing:
More informationExcep onal Control Flow: Excep ons and Processes
Excep onal Control Flow: Excep ons and Processes 15-213 / 18-213: Introduc on to Computer Systems 13 th Lecture, Oct. 8, 2013 Instructors: Randy Bryant, Dave O Hallaron, and Greg Kesden 1 Today The Process
More informationOS Interaction and Processes
Multiprogramming Interaction and Processes Kai Shen So far we looked at how machine codes run on hardware and how compilers generate machine codes from high level programs Fine if your program uses the
More informationExcep&onal Control Flow: Excep&ons and Processes
Excep&onal Control Flow: Excep&ons and Processes 15-213 / 18-213: Introduc2on to Computer Systems 13 th Lecture, Oct. 11, 2011 Instructors: Dave O Hallaron, Greg Ganger, and Greg Kesden 1 Today Excep&onal
More informationProcesses. CSE 351 Autumn Instructor: Justin Hsia
Processes CSE 351 Autumn 2016 Instructor: Justin Hsia Teaching Assistants: Chris Ma Hunter Zahn John Kaltenbach Kevin Bi Sachin Mehta Suraj Bhat Thomas Neuman Waylon Huang Xi Liu Yufang Sun https://xkcd.com/627/
More informationCSC 252: Computer Organization Spring 2018: Lecture 19
CSC 252: Computer Organization Spring 2018: Lecture 19 Instructor: Yuhao Zhu Department of Computer Science University of Rochester Action Items: Programming Assignment 3 grades are out Programming Assignment
More informationProcesses. CSE 351 Autumn Instructor: Justin Hsia
Processes CSE 351 Autumn 2017 Instructor: Justin Hsia Teaching Assistants: Lucas Wotton Michael Zhang Parker DeWilde Ryan Wong Sam Gehman Sam Wolfson Savanna Yee Vinny Palaniappan http://xkcd.com/292/
More informationExceptions, Processes and Signals
Exceptions, Processes and Signals Computer Systems Organization (Spring 2017) CSCI-UA 201, Section 3 Instructor: Joanna Klukowska Slides adapted from Randal E. Bryant and David R. O Hallaron (CMU) Mohamed
More informationCS 201. Processes. Gerson Robboy Portland State University
CS 201 Processes Gerson Robboy Portland State University Review Definition: A process is an instance of a running program. One of the most fundamental concepts in computer science. Not the same as program
More informationApproaches to Concurrency
PROCESS AND THREADS Approaches to Concurrency Processes Hard to share resources: Easy to avoid unintended sharing High overhead in adding/removing clients Threads Easy to share resources: Perhaps too easy
More informationExceptional Control Flow: Exceptions and Processes
Exceptional Control Flow: Exceptions and Processes 15-213 : Introduction to Computer Systems 14 th Lecture, June 21, 2018 Instructor: Brian Railing 1 Today Exceptional Control Flow Exceptions Processes
More informationRoadmap. Java: Assembly language: OS: Machine code: Computer system:
Roadmap C: car *c = malloc(sizeof(car)); c->miles = 100; c->gals = 17; float mpg = get_mpg(c); free(c); Assembly language: Machine code: Computer system: get_mpg: pushq movq... popq ret %rbp %rsp, %rbp
More informationExcep&onal+Control+Flow:++ Excep&ons+and+Processes+ + 15C213':'Introduc;on'to'Computer'Systems' 14 th 'Lecture,'Oct.'15,'2015'
Excep&onal+Control+Flow:++ Excep&ons+and+Processes+ + 15C213':'Introduc;on'to'Computer'Systems' 14 th 'Lecture,'Oct.'15,'2015' Instructors:'' Randal'E.'Bryant'and'David'R.'O Hallaron' 1 Today+! Excep&onal+Control+Flow+!
More informationCSE3320 Operating Systems Processes Jia Rao
CSE3320 Operating Systems Prcesses Jia Ra Department f Cmputer Science and Engineering http://ranger.uta.edu/~jra Recap f the Last Class Cmputer hardware Time-sharing Space-sharing Characteristics } Lcality,
More informationProcesses. CSE 351 Spring Instructor: Ruth Anderson
Processes CSE 351 Spring 2017 Instructor: Ruth Anderson Teaching Assistants: Dylan Johnson Kevin Bi Linxing Preston Jiang Cody Ohlsen Yufang Sun Joshua Curtis Administrivia Midterms Graded If you did not
More informationOperating System. Chapter 3. Process. Lynn Choi School of Electrical Engineering
Operating System Chapter 3. Process Lynn Choi School of Electrical Engineering Process Def: A process is an instance of a program in execution. One of the most profound ideas in computer science. Not the
More informationCS4500/5500 Operating Systems Processes
Operating Systems Prcesses Yanyan Zhuang Department f Cmputer Science http://www.cs.uccs.edu/~yzhuang UC. Clrad Springs Ref. MOS3E, OS@Austin, Clumbia, Rchester Recap f the Last Class Cmputer hardware
More informationFoundations of Computer Systems
18-600 Foundations of Computer Systems Lecture 15: Exceptional Control Flow I: Exceptions and Processes John P. Shen & Zhiyi Yu October 19, 2016 18-600 SE PL OS CA Required Reading Assignment: Chapter
More informationFoundations of Computer Systems
18-600 Foundations of Computer Systems Lecture 12: Exceptional Control Flow I: Exceptions and Processes October 9, 2017 18-600 SE PL OS CA Required Reading Assignment: Chapter 8 of CS:APP (3 rd edition)
More informationProcesses, Virtual Memory I
Processes, Virtual Memory I CSE 351 Summer 2018 Instructor: Justin Hsia Teaching Assistants: Josie Lee Natalie Andreeva Teagan Horkan http://rebrn.com/re/bad-chrome-1162082/ Administrivia Homework 4 due
More informationOperating systems. Module 15 kernel I/O subsystem. Tami Sorgente 1
Operating systems Mdule 15 kernel I/O subsystem Tami Srgente 1 SWAP SPACE MANAGEMENT Swap space can be defined as a temprary strage lcatin that is used when system s memry requirements exceed the size
More informationVirtual Memory I. CSE 351 Autumn Instructor: Justin Hsia
Virtual Memory I CSE 351 Autumn 2018 Instructor: Justin Hsia Teaching Assistants: Akshat Aggarwal An Wang Andrew Hu Brian Dai Britt Henderson James Shin Kevin Bi Kory Watson Riley Germundson Sophie Tian
More informationCSE 3320 Operating Systems Computer and Operating Systems Overview Jia Rao
CSE 3320 Operating Systems Cmputer and Operating Systems Overview Jia Ra Department f Cmputer Science and Engineering http://ranger.uta.edu/~jra Overview Recap f last class What is an perating system?
More informationAssignment #5: Rootkit. ECE 650 Fall 2018
General Instructins Assignment #5: Rtkit ECE 650 Fall 2018 See curse site fr due date Updated 4/10/2018, changes nted in green 1. Yu will wrk individually n this assignment. 2. The cde fr this assignment
More informationExceptions and Processes
Exceptions and Processes Samira Khan April 18, 2017 Control Flow Processors do only one thing: From startup to shutdown, a simply reads and executes (interprets) a sequence of instructions, one at a time
More informationExcep&onal Control Flow: Excep&ons and Processes. (Chapter 8)
Excep&onal Control Flow: Excep&ons and Processes (Chapter 8) 1 Outline! Excep&onal Control Flow! Interrupts! Traps! Excep/ons! Processes! Fork! Execve! Exit! Wait 2 Control Flow Processors do only one
More informationCS4500/5500 Operating Systems Computer and Operating Systems Overview
Operating Systems Cmputer and Operating Systems Overview Yanyan Zhuang Department f Cmputer Science http://www.cs.uccs.edu/~yzhuang UC. Clrad Springs Ref. MOS4E, OS@Austin, Clumbia, UWisc Overview Recap
More informationIt has hardware. It has application software.
Q.1 What is System? Explain with an example A system is an arrangement in which all its unit assemble wrk tgether accrding t a set f rules. It can als be defined as a way f wrking, rganizing r ding ne
More informationCS3733: Operating Systems
Outline CS3733: Operating Systems Topics: Programs and Processes (SGG 3.1-3.2; USP 2) Programs and Processes States of a process and transitions PCB: Process Control Block Process (program image) in memory
More informationPROCESS PROGRAMMING INTERFACE
Reading Reference: Textbook 1 Chapter 3 Molay Reference Text: Chapter 8 PROCESS PROGRAMMING INTERFACE Tanzir Ahmed CSCE 313 FALL 2018 Theme of Today s Lecture Talk a bit about Unix Shell Introduce some
More informationTekmos. TK68020 Microprocessor. Features. General Description. 9/03/14 1
Tekms TK68020 Micrprcessr September 3, 2014 Prduct Overview Features Addressing Mde Extensins fr Enhanced Supprt f High-Level Languages Object-Cde Cmpatible with Earlier M68000 Micrprcessrs Addressing
More informationARM Programmer s Model
ARM Prgrammer s Mdel Hsung-Pin Chang Department f Cmputer Science Natinal Chung Hsing University PDF created with FinePrint pdffactry Pr trial versin www.pdffactry.cm Outline ARM Data Types ARM Prcessr
More informationINSTALLING CCRQINVOICE
INSTALLING CCRQINVOICE Thank yu fr selecting CCRQInvice. This dcument prvides a quick review f hw t install CCRQInvice. Detailed instructins can be fund in the prgram manual. While this may seem like a
More information!"#$%&'()*+,'(-.'*+/*'01+!"#$%&'(2+)(3+4.'#$22$2
!"#$%&'()*+,'(-.'*+/*'01+!"#$%&'(2+)(3+4.'#$22$2!"#$%&'()*+,-./01-*(+-(!-23/+4,("56+426!"#$%&'$(%)( 78-296(!:(;,466-/. 1,'(-.'*+/*'0 4.'#$22'.2+3'+'(*>+'($+-=8(?1 (9(!?@(6A23B5(,49.6(9*.(4C40/+46(DA*+4,3,4+6E(
More informationCS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 20
CS24: INTRODUCTION TO COMPUTING SYSTEMS Spring 2018 Lecture 20 LAST TIME: UNIX PROCESS MODEL Began covering the UNIX process model and API Information associated with each process: A PID (process ID) to
More informationComputer Organization and Architecture
Campus de Gualtar 4710-057 Braga UNIVERSIDADE DO MINHO ESCOLA DE ENGENHARIA Departament de Infrmática Cmputer Organizatin and Architecture 5th Editin, 2000 by William Stallings Table f Cntents I. OVERVIEW.
More informationInfrastructure Series
Infrastructure Series TechDc WebSphere Message Brker / IBM Integratin Bus Parallel Prcessing (Aggregatin) (Message Flw Develpment) February 2015 Authr(s): - IBM Message Brker - Develpment Parallel Prcessing
More informationAscii Art Capstone project in C
Ascii Art Capstne prject in C CSSE 120 Intrductin t Sftware Develpment (Rbtics) Spring 2010-2011 Hw t begin the Ascii Art prject Page 1 Prceed as fllws, in the rder listed. 1. If yu have nt dne s already,
More informationIT Essentials (ITE v6.0) Chapter 5 Exam Answers 100% 2016
IT Essentials (ITE v6.0) Chapter 5 Exam Answers 100% 2016 1. What are tw functins f an perating system? (Chse tw.) cntrlling hardware access managing applicatins text prcessing flw chart editing prgram
More informationCS 201. Exceptions and Processes. Gerson Robboy Portland State University
CS 201 Exceptions and Processes Gerson Robboy Portland State University Control Flow Computers Do One Thing From startup to shutdown, a CPU reads and executes (interprets) a sequence of instructions, one
More informationProcesses & Signals. System Runs Many Processes Concurrently. State consists of memory image + register values + program counter
Processes & Signals Topics Process Hierarchy Shells Signals The World of Multitasking System Runs Many Processes Concurrently Process: executing program State consists of memory image + register values
More informationIntroduction to InfoSec Recitation 2. Nir Krakowski (nirkrako at post.tau.ac.il) Itamar Gilad (itamargi at post.tau.ac.il)
Intrductin t InfSec Recitatin 2 Nir Krakwski (nirkrak at pst.tau.ac.il) Itamar Gilad (itamargi at pst.tau.ac.il) Mre assembly tips Review f the stack Stack verflws Implementatin Tls Tday Little vs Big
More informationOperating systems. Module 7 IPC (Interprocess communication) PART I. Tami Sorgente 1
Operating systems Mdule 7 IPC (Interprcess cmmunicatin) PART I Tami Srgente 1 INTERPROCESS COMMUNICATION Prcesses within a system may be independent r cperating Cperating prcess can affect r be affected
More informationCS213. Exceptional Control Flow Part II. Topics Process Hierarchy Signals
CS213 Exceptional Control Flow Part II Topics Process Hierarchy Signals ECF Exists at All Levels of a System Exceptions Hardware and operating system kernel software Concurrent processes Hardware timer
More informationCSE 3320 Operating Systems Page Replacement Algorithms and Segmentation Jia Rao
CSE 0 Operating Systems Page Replacement Algrithms and Segmentatin Jia Ra Department f Cmputer Science and Engineering http://ranger.uta.edu/~jra Recap f last Class Virtual memry Memry verlad What if the
More informationChapter 10: Information System Controls for System Reliability Part 3: Processing Integrity and Availability
Chapter 10: Infrmatin System Cntrls fr System Reliability Part 3: Prcessing Integrity and Availability Cntrls Ensuring Prcessing Integrity Input Prcess Output Input Cntrls Garbage-in Garbage-ut Frm Design
More informationExceptional Control Flow Part II Nov. 2, 2009"
Exceptional Control Flow Part II Nov. 2, 2009" Unix Startup: Step 2" [0] /etc/inittab Daemons" e.g. ftpd, httpd" init [1] getty init forks and execs daemons per /etc/ inittab, and forks and execs a getty
More informationOperating Systems Components. What is an Operating System? Process Management. Memory Management. Operating Systems 9/7/2018 CSC 256/456 1
What is an Operating System? Operating Systems Components Software that abstracts the computer hardware Hides the messy details of the underlying hardware Presents users with a resource abstraction that
More informationSignals. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University
Signals Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Multitasking (1) Programmer s model of multitasking fork() spawns new process Called once,
More informationCSE 361S Intro to Systems Software Lab #2
Due: Thursday, September 22, 2011 CSE 361S Intr t Systems Sftware Lab #2 Intrductin This lab will intrduce yu t the GNU tls in the Linux prgramming envirnment we will be using fr CSE 361S this semester,
More informationInstructions for Accessing Online Testing Resources
Instructins fr Accessing Online Testing Resurces 2018-2019 Hw t get help fr Testing Applicatin Functinality / System Errrs (nt lgin issues): IMPORTANT: The rle f the District s IT staff and Help Desk in
More informationMemory Hierarchy. Goal of a memory hierarchy. Typical numbers. Processor-Memory Performance Gap. Principle of locality. Caches
Memry Hierarchy Gal f a memry hierarchy Memry: hierarchy f cmpnents f varius speeds and capacities Hierarchy driven by cst and perfrmance In early days Primary memry = main memry Secndary memry = disks
More informationProgramming Project: Building a Web Server
Prgramming Prject: Building a Web Server Submissin Instructin: Grup prject Submit yur cde thrugh Bb by Dec. 8, 2014 11:59 PM. Yu need t generate a simple index.html page displaying all yur grup members
More informationMultitasking. Programmer s model of multitasking. fork() spawns new process. exit() terminates own process
Signals Prof. Jin-Soo Kim( jinsookim@skku.edu) TA JinHong Kim( jinhong.kim@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Multitasking Programmer s model of multitasking
More informationPerformance of VSA in VMware vsphere 5
Perfrmance f VSA in VMware vsphere 5 Perfrmance Study TECHNICAL WHITE PAPER Table f Cntents Intrductin... 3 Executive Summary... 3 Test Envirnment... 3 Key Factrs f VSA Perfrmance... 4 Cmmn Strage Perfrmance
More informationChapter 2. The OSI Model and TCP/IP Protocol Suite. PDF created with FinePrint pdffactory Pro trial version
Chapter 2 The OSI Mdel and TCP/IP Prtcl Suite PDF created with FinePrint pdffactry Pr trial versin www.pdffactry.cm Outline THE OSI MODEL LAYERS IN THE OSI MODEL TCP/IP PROTOCOL SUITE ADDRESSING TCP/IP
More informationCS4500/5500 Operating Systems Synchronization
Operating Systems Synchrnizatin Yanyan Zhuang Department f Cmputer Science http://www.cs.uccs.edu/~yzhuang UC. Clrad Springs Recap f the Last Class Multiprcessr scheduling Tw implementatins f the ready
More informationLecture 24: Multitasking and Signals
CSCI-UA.0201-003 Computer Systems Organization Lecture 24: Multitasking and Signals Mohamed Zahran (aka Z) mzahran@cs.nyu.edu http://www.mzahran.com Some slides adapted (and slightly modified) from: Clark
More informationThese tasks can now be performed by a special program called FTP clients.
FTP Cmmander FAQ: Intrductin FTP (File Transfer Prtcl) was first used in Unix systems a lng time ag t cpy and mve shared files. With the develpment f the Internet, FTP became widely used t uplad and dwnlad
More informationXilinx Answer Xilinx PCI Express DMA Drivers and Software Guide
Xilinx Answer 65444 Xilinx PCI Express DMA Drivers and Sftware Guide Imprtant Nte: This dwnladable PDF f an Answer Recrd is prvided t enhance its usability and readability. It is imprtant t nte that Answer
More informationTRAINING GUIDE. Lucity Mobile
TRAINING GUIDE The Lucity mbile app gives users the pwer f the Lucity tls while in the field. They can lkup asset infrmatin, review and create wrk rders, create inspectins, and many mre things. This manual
More informationB Tech Project First Stage Report on
B Tech Prject First Stage Reprt n GPU Based Image Prcessing Submitted by Sumit Shekhar (05007028) Under the guidance f Prf Subhasis Chaudhari 1. Intrductin 1.1 Graphic Prcessr Units A graphic prcessr unit
More informationThe UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Yu will learn the fllwing in this lab: The UNIVERSITY f NORTH CAROLINA at CHAPEL HILL Cmp 541 Digital Lgic and Cmputer Design Spring 2016 Lab Prject (PART A): A Full Cmputer! Issued Fri 4/8/16; Suggested
More informationTransmission Control Protocol Introduction
Transmissin Cntrl Prtcl Intrductin TCP is ne f the mst imprtant prtcls f Internet Prtcls suite. It is mst widely used prtcl fr data transmissin in cmmunicatin netwrk such as Internet. Features TCP is reliable
More informationOperating 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 informationLab 1 - Calculator. K&R All of Chapter 1, 7.4, and Appendix B1.2
UNIVERSITY OF CALIFORNIA, SANTA CRUZ BOARD OF STUDIES IN COMPUTER ENGINEERING CMPE13/L: INTRODUCTION TO PROGRAMMING IN C SPRING 2012 Lab 1 - Calculatr Intrductin In this lab yu will be writing yur first
More informationThe UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Yu will learn the fllwing in this lab: The UNIVERSITY f NORTH CAROLINA at CHAPEL HILL Designing a mdule with multiple memries Designing and using a bitmap fnt Designing a memry-mapped display Cmp 541 Digital
More informationProgramming Assignments will be.. All the PAs are continuous 3 major factors that you should consider
Signals Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Dong-Yun Lee (dylee@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu NOTICE Programming Assignments will be.. All
More informationAPPLY PAGE: LOGON PAGE:
APPLY PAGE: Upn accessing the system fr the first time, yu will land n the Apply Page. This page will shw yu any currently pen pprtunities that yu can apply fr, as well as any relevant deadlines r ther
More informationCSE 3320 Operating Systems Synchronization Jia Rao
CSE 3320 Operating Systems Synchrnizatin Jia Ra Department f Cmputer Science and Engineering http://ranger.uta.edu/~jra Recap f the Last Class Multiprcessr scheduling Tw implementatins f the ready queue
More information2. When logging is used, which severity level indicates that a device is unusable?
CCNA 4 Chapter 8 v5.0 Exam Answers 2015 (100%) 1. What are the mst cmmn syslg messages? thse that ccur when a packet matches a parameter cnditin in an access cntrl list link up and link dwn messages utput
More information- Replacement of a single statement with a sequence of statements(promotes regularity)
ALGOL - Java and C built using ALGOL 60 - Simple and cncise and elegance - Universal - Clse as pssible t mathematical ntatin - Language can describe the algrithms - Mechanically translatable t machine
More informationLAB 7 (June 29/July 4) Structures, Stream I/O, Self-referential structures (Linked list) in C
LAB 7 (June 29/July 4) Structures, Stream I/O, Self-referential structures (Linked list) in C Due: July 9 (Sun) 11:59 pm 1. Prblem A Subject: Structure declaratin, initializatin and assignment. Structure
More informationProject 4: System Calls 1
CMPT 300 1. Preparatin Prject 4: System Calls 1 T cmplete this assignment, it is vital that yu have carefully cmpleted and understd the cntent in the fllwing guides which are psted n the curse website:
More informationQuick Start Guide. Basic Concepts. DemoPad Designer - Quick Start Guide
Quick Start Guide This guide will explain the prcess f installing & using the DemPad Designer sftware fr PC, which allws yu t create a custmised Graphical User Interface (GUI) fr an iphne / ipad & embed
More informationIFSP PDF Upload/Download Guidance
IFSP PDF Uplad/Dwnlad Guidance Intr/backgrund The dwnladable IFSP was created t assist FSC s in writing an IFSP r IFSP review n a visit withut the need fr internet cnnectin. Adbe Acrbat is required fr
More informationMunicode Website Instructions
Municde Website instructins Municde Website Instructins The new and imprved Municde site allws yu t navigate t, print, save, e-mail and link t desired sectins f the Online Cde f Ordinances with greater
More information