CS 3411 Systems Programming

Size: px
Start display at page:

Download "CS 3411 Systems Programming"

Transcription

1 CS 3411 Systems Programming Department of Computer Science Michigan Technological University Unix Processes

2 Today s Topics Unix Processes Creating New Processes

3 Unix Processes Process is the image of a program in execution Processes are sequential in nature Processes may reside in memory simultaneously Time multiplex the CPU(s) to get required results

4 Creating Child Processes Use fork()! As usual, read the manual page. fork() creates a child process that is a copy of the parent process, with some exceptions Execution continues just after the fork() call in both processes fork() returns the PID of the new process to the parent, and 0 to the child process The child is a copy of the parent. No memory is shared.

5 fork() #i n c l u d e <u n i s t d. h> main ( ) { f o r k ( ) ; w r i t e ( 1, " Hi \n", 4 ) ; #i n c l u d e <u n i s t d. h> main ( ) { i f ( f o r k ( ) == 0) { / C h i l d w r i t e s : / w r i t e ( 1, " Hi \n", 4 ) ; e l s e { / Parent w r i t e s : / w r i t e ( 1, "Hey \n", 5 ) ;

6 fork() #i n c l u d e <u n i s t d. h> #i n c l u d e <s t d i o. h> i n t x = 0 ; main ( ) { i f ( f o r k ( ) == 0) { / C h i l d w r i t e s : / x++; p r i n t f ( " C h i l d : x=%d\n", x ) ; f f l u s h ( s t d o u t ) ; e l s e { / Parent w r i t e s : / x++; p r i n t f ( " Parent : x=%d\n", x ) ; f f l u s h ( s t d o u t ) ;

7 fork() A forked child inherits open files of the parent The child process descriptor is a copy of the parent s process descriptor, except: Return value from fork() PID, PPID Pending signals and alarms File locks Execution times

8 File Descriptors Example #i n c l u d e <u n i s t d. h> #i n c l u d e < f c n t l. h> #i n c l u d e <s t d i o. h> main ( ) { i n t f d ; char ch1, ch2 ; f d = open ( " d a t a f i l e ",O_RDWR) ; r e a d ( fd,& ch1, 1 ) ; p r i n t f ( " I n p a r e n t : ch1 = %c \n", ch1 ) ; f f l u s h ( s t d o u t ) ; i f ( f o r k ( ) == 0) { / C h i l d / r e a d ( fd,& ch2, 1 ) ; p r i n t f ( " I n c h i l d : ch2 = %c \n", ch2 ) ; f f l u s h ( s t d o u t ) ;

9 Executing a New Binary execve() is used to execute a new program Manual page! This function executes the program it is pointed to On success, execve() does not return: The process calling execve() is completely replaced by the newly executed process On error, -1 is returned File descriptors may be set to close on exec!

10 Creating a New Process Exec is most useful when used with fork In Unix, a new process is created by first forking an existing process, then calling a variant of exec from there Most process attributes are preserved, including the PID, PPID, file locks, pending signals, execution times and open files

11 execve() Example #i n c l u d e <s t d i o. h> #i n c l u d e <e r r n o. h> #i n c l u d e < s t d l i b. h> main ( ) { char a [ 4 ], e [ 3 ] ; a [ 0 ] = " c h i l d " ; a [ 1 ] = " argument1 " ; a [ 2 ] = " argument2 " ; a [ 3 ] = NULL ; e [ 0 ] = "ENV0=v a l 0 " ; e [ 1 ] = "ENV1=v a l 1 " ; e [ 2 ] = NULL ; e x e c v e ( " c h i l d 1 ", a, e ) ; / I f we g e t here, something went wrong / p e r r o r ( " p a r e n t 1 " ) ; e x i t ( 1 ) ;

12 execve() Example #i n c l u d e <s t d i o. h> main ( argc, argv, envp ) i n t a r g c ; char a r g v [ ], envp [ ] ; { i n t i ; char ep ; p r i n t f ( " c h i l d i s r u n n i n g \n" ) ; f o r ( i = 0 ; i < a r g c ; i ++) { p r i n t f ( " a r g v [%d]=%s \n", i, a r g v [ i ] ) ; f o r ( ep = envp ; ep ; ep++) { p r i n t f ( "%s \n", ep ) ;

13 Convenience Calls To Exec execl, execlp, execle, execv, execvp are all convenience calls to execve The manual page has details!

14 More Examples #i n c l u d e < f c n t l. h> #i n c l u d e <s t d i o. h> #i n c l u d e <u n i s t d. h> #i n c l u d e < s t d l i b. h> main ( argc, a r g v ) i n t a r g c ; char a r g v [ ] ; { i n t f o r k i d, charnum ; char f d v a l [ 2 0 ] ; i f ( a r g c!= 3) { f p r i n t f ( s t d e r r, " Usage : pexec f i l e n a m e charnum \n" ) ; e x i t ( 1 ) ; i f ( ( f o r k i d = open ( a r g v [ 1 ], O_RDONLY) ) < 0 ) { f p r i n t f ( s t d e r r, " Cannot open %s \n", a r g v [ 1 ] ) ; e x i t ( 2 ) ; s p r i n t f ( f d v a l, "%d", f o r k i d ) ; / s p r i n t f! / i f ( f o r k ( ) == 0) { e x e c l ( " p c h i l d ", " p c h i l d ", f d v a l, a r g v [ 2 ], ( char ) 0 ) ; f p r i n t f ( s t d e r r, " Unable to e x e c \n" ) ; e x i t ( 3 ) ; p r i n t f ( " Parent i s a f t e r f o r k / e x e c \n" ) ;

15 More Examples #i n c l u d e <s y s / t y p e s. h> #i n c l u d e <u n i s t d. h> #i n c l u d e <s t d i o. h> #i n c l u d e < s t d l i b. h> main ( argc, a r g v ) i n t a r g c ; char a r g v [ ] ; { i n t myfd ; char gotch, v a l ; i f ( a r g c!= 3) { f p r i n t f ( s t d e r r, " Usage : p c h i l d f i l e n a m e charnum \n" ) ; e x i t ( 1 ) ; myfd = a t o i ( a r g v [ 1 ] ) ; gotch = a t o i ( a r g v [ 2 ] ) ; l s e e k ( myfd, ( o f f _ t ) gotch, SEEK_SET ) ; r e a d ( myfd, &v a l, 1 ) ; p r i n t f ( " C h i l d got c h a r %d from f d %d : %c \n", gotch, myfd, v a l ) ;

16 More Examples #i n c l u d e < f c n t l. h> #i n c l u d e <s t d i o. h> #i n c l u d e <u n i s t d. h> #i n c l u d e < s t d l i b. h> main ( argc, a r g v ) i n t a r g c ; char a r g v [ ] ; { i n t f o r k i d, charnum ; i f ( a r g c!= 3) { f p r i n t f ( s t d e r r, " Usage : p i o e x e c f i l e n a m e charnum \n" ) ; e x i t ( 1 ) ; i f ( ( f o r k i d = open ( a r g v [ 1 ], O_RDONLY) ) < 0 ) { f p r i n t f ( s t d e r r, " Cannot open %s \n", a r g v [ 1 ] ) ; e x i t ( 2 ) ; i f ( f o r k ( ) == 0) { c l o s e ( 0 ) ; dup ( f o r k i d ) ; c l o s e ( f o r k i d ) ; e x e c l ( " p i o c h i l d ", " p i o c h i l d ", a r g v [ 2 ], ( char ) 0 ) ; f p r i n t f ( s t d e r r, " Unable to e x e c \n" ) ; e x i t ( 3 ) ; p r i n t f ( " Parent i s a f t e r f o r k / e x e c \n" ) ;

17 More Examples #i n c l u d e <s y s / t y p e s. h> #i n c l u d e <u n i s t d. h> #i n c l u d e <s t d i o. h> #i n c l u d e < s t d l i b. h> main ( argc, a r g v ) i n t a r g c ; char a r g v [ ] ; { i n t myfd ; char gotch, v a l ; i f ( a r g c!= 2) { f p r i n t f ( s t d e r r, " Usage : p i o k i d charnum \n" ) ; e x i t ( 1 ) ; gotch = a t o i ( a r g v [ 1 ] ) ; l s e e k ( 0, ( o f f _ t ) gotch, SEEK_SET ) ; r e a d ( 0, &v a l, 1 ) ; p r i n t f ( " C h i l d got c h a r %d from s t d i n : %c \n", gotch, v a l ) ;

CS 3411 Systems Programming

CS 3411 Systems Programming CS 3411 Systems Programming Department of Computer Science Michigan Technological University Pipe Inter-Process Communication in Unix Today's Topics How to communicate between processes without using signals

More information

Part I. System call overview. Secure Operating System Design and Implementation System Calls. Overview. Abstraction. Jon A. Solworth.

Part I. System call overview. Secure Operating System Design and Implementation System Calls. Overview. Abstraction. Jon A. Solworth. Secure Operating System Design and Implementation System Calls Jon A. Solworth Part I System call overview Dept. of Computer Science University of Illinois at Chicago February 1, 2011 Overview Abstraction

More information

Computer Architecture

Computer Architecture Computer Architecture QtSpim, a Mips simulator S. Coudert and R. Pacalet January 4, 2018..................... Memory Mapping 0xFFFF000C 0xFFFF0008 0xFFFF0004 0xffff0000 0x90000000 0x80000000 0x7ffff4d4

More information

CS429: Computer Organization and Architecture

CS429: Computer Organization and Architecture CS429: Computer Organization and Architecture Warren Hunt, Jr. and Bill Young Department of Computer Sciences University of Texas at Austin Last updated: September 3, 2014 at 08:38 CS429 Slideset C: 1

More information

CS 3411 Systems Programming

CS 3411 Systems Programming CS 3411 Systems Programming Department of Computer Science Michigan Technological University Sockets Today's Topics New Way of Communicating Between Processes Sockets Standard" Unix Processes/IPC IPC stands

More information

Boolean Algebra, Gates and Circuits

Boolean Algebra, Gates and Circuits Boolean Algebra, Gates and Circuits Kasper Brink November 21, 2017 (Images taken from Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc.) Outline Last week: Von

More information

10:00 12:30. Do not open this problem booklet until the start of the examination is announced.

10:00 12:30. Do not open this problem booklet until the start of the examination is announced. 21 I 20 8 26 10:00 12:30 (1),. Do not open this problem booklet until the start of the examination is announced. (2) 4.. Answer the following 4 problems. Use the designated answer sheet for each problem.

More information

Concurrent HTTP Proxy Server. CS425 - Computer Networks Vaibhav Nagar(14785)

Concurrent HTTP Proxy Server. CS425 - Computer Networks Vaibhav Nagar(14785) Concurrent HTTP Proxy Server CS425 - Computer Networks Vaibhav Nagar(14785) Email: vaibhavn@iitk.ac.in August 31, 2016 Elementary features of Proxy Server Proxy server supports the GET method to serve

More information

Auto-Tuning Complex Array Layouts for GPUs - Supplemental Material

Auto-Tuning Complex Array Layouts for GPUs - Supplemental Material BIN COUNT EGPGV,. This is the author version of the work. It is posted here by permission of Eurographics for your personal use. Not for redistribution. The definitive version is available at http://diglib.eg.org/.

More information

VMI-PL: A monitoring language for virtual platforms using virtual machine introspection

VMI-PL: A monitoring language for virtual platforms using virtual machine introspection VMI-PL: A monitoring language for virtual platforms using virtual machine introspection Florian Westphal 1,2 Stefan Axelsson 1 Christian Neuhaus 2 Andreas Polze 2 1 Blekinge Institute of Technology Karlskrona,

More information

Homework. Turing Machines. Announcements. Plan for today. Now our picture looks like. Languages

Homework. Turing Machines. Announcements. Plan for today. Now our picture looks like. Languages Homework s TM Variants and the Universal TM Homework #6 returned Homework #7 due today Homework #8 (the LAST homework!) Page 262 -- Exercise 10 (build with JFLAP) Page 270 -- Exercise 2 Page 282 -- Exercise

More information

CS276 Homework 1: ns-2

CS276 Homework 1: ns-2 CS276 Homework 1: ns-2 Erik Peterson October 28, 2006 1 Part 1 - Fairness between TCP variants 1.1 Method After learning ns-2, I wrote a script (Listing 3) that runs a simulation of one or two tcp flows

More information

APPENDIX A FASTFLOW A.1 DESIGN PRINCIPLES

APPENDIX A FASTFLOW A.1 DESIGN PRINCIPLES APPENDIX A FASTFLOW A.1 DESIGN PRINCIPLES FastFlow 1 has been designed to provide programmers with efficient parallelism exploitation patterns suitable to implement (fine grain) stream parallel applications.

More information

Numerical differentiation

Numerical differentiation Chapter 3 Numerical differentiation 3.1 Introduction Numerical integration and differentiation are some of the most frequently needed methods in computational physics. Quite often we are confronted with

More information

Lecture: Pipelining Basics

Lecture: Pipelining Basics Lecture: Pipelining Basics Topics: Performance equations wrap-up, Basic pipelining implementation Video 1: What is pipelining? Video 2: Clocks and latches Video 3: An example 5-stage pipeline Video 4:

More information

Oversubscribing inotify on Embedded Platforms

Oversubscribing inotify on Embedded Platforms Oversubscribing inotify on Embedded Platforms By Donald Percivalle (CPE) and Scott Vanderlind (CSC) Senior Project California Polytechnic State University San Luis Obispo Dr. Zachary Peterson June 11,

More information

Comp 11 Lectures. Mike Shah. July 12, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 12, / 33

Comp 11 Lectures. Mike Shah. July 12, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 12, / 33 Comp 11 Lectures Mike Shah Tufts University July 12, 2017 Mike Shah (Tufts University) Comp 11 Lectures July 12, 2017 1 / 33 Please do not distribute or host these slides without prior permission. Mike

More information

Universal Turing Machine. Lecture 20

Universal Turing Machine. Lecture 20 Universal Turing Machine Lecture 20 1 Turing Machine move the head left or right by one cell read write sequentially accessed infinite memory finite memory (state) next-action look-up table Variants don

More information

Multidomain Design and Optimization based on COMSOL Multiphysics: Applications for Mechatronic Devices Ara Bissal, Octavian Craciun, Veronica

Multidomain Design and Optimization based on COMSOL Multiphysics: Applications for Mechatronic Devices Ara Bissal, Octavian Craciun, Veronica Multidomain Design and Optimization based on COMSOL Multiphysics: Applications for Mechatronic Devices Ara Bissal, Octavian Craciun, Veronica Biagini, & Jesper Magnusson Table of contents Introduction

More information

High-performance processing and development with Madagascar. July 24, 2010 Madagascar development team

High-performance processing and development with Madagascar. July 24, 2010 Madagascar development team High-performance processing and development with Madagascar July 24, 2010 Madagascar development team Outline 1 HPC terminology and frameworks 2 Utilizing data parallelism 3 HPC development with Madagascar

More information

Instance Methods and Inheritance (1/2)

Instance Methods and Inheritance (1/2) Instance Methods and Inheritance (1/2) 1 class Professor { 2 p u b l i c void say_hello ( ) { 3 System. out. p r i n t l n ( " Hello! " ) ; 4 } 5 } 6 class CSIEProfessor extends Professor { 7 p u b l i

More information

Enrico Nardelli Logic Circuits and Computer Architecture

Enrico Nardelli Logic Circuits and Computer Architecture Enrico Nardelli Logic Circuits and Computer Architecture Appendix B The design of VS0: a very simple CPU Rev. 1.4 (2009-10) by Enrico Nardelli B - 1 Instruction set Just 4 instructions LOAD M - Copy into

More information

CS 6112 (Fall 2011) Foundations of Concurrency

CS 6112 (Fall 2011) Foundations of Concurrency CS 6112 (Fall 2011) Foundations of Concurrency 29 November 2011 Scribe: Jean-Baptiste Jeannin 1 Readings The readings for today were: Eventually Consistent Transactions, by Sebastian Burckhardt, Manuel

More information

FACTORS AFFECTING CONCURRENT TRUNCATE

FACTORS AFFECTING CONCURRENT TRUNCATE T E C H N I C A L N O T E FACTORS AFFECTING CONCURRENT TRUNCATE DURING BATCH PROCESSES Prepared By David Kurtz, Go-Faster Consultancy Ltd. Technical Note Version 1.00 Thursday 2 April 2009 (E-mail: david.kurtz@go-faster.co.uk,

More information

When they compared their results, they had an interesting discussion:

When they compared their results, they had an interesting discussion: 27 2.5 Making My Point A Solidify Understanding Task Zac and Sione were working on predicting the number of quilt blocks in this pattern: CC BY Camille King https://flic.kr/p/hrfp When they compared their

More information

CS 16 Fall 2009 Mid-term exam

CS 16 Fall 2009 Mid-term exam CS 16 Fall 2009 Mid-term exam This is a closed-book, closed-note exam. Answer all of the questions clearly, completely, and concisely. You have 50 minutes, so be sure to use your time wisely. All work

More information

Administrivia. Course Objectives. Overview. Lecture Notes Week markem/cs333/ 2. Staff. 3. Prerequisites. 4. Grading. 1. Theory and application

Administrivia. Course Objectives. Overview. Lecture Notes Week markem/cs333/ 2. Staff. 3. Prerequisites. 4. Grading. 1. Theory and application Administrivia 1. markem/cs333/ 2. Staff 3. Prerequisites 4. Grading Course Objectives 1. Theory and application 2. Benefits 3. Labs TAs Overview 1. What is a computer system? CPU PC ALU System bus Memory

More information

ENS Lyon Camp. Day 5. Basic group. C October

ENS Lyon Camp. Day 5. Basic group. C October ENS Lyon Camp. Day 5. Basic group. C++. 30 October Contents 1 Input/Output 1 1.1 C-style.......................................... 1 1. C++-style........................................ Stack Overflow

More information

Lecture 14: State Tables, Diagrams, Latches, and Flip Flop

Lecture 14: State Tables, Diagrams, Latches, and Flip Flop EE210: Switching Systems Lecture 14: State Tables, Diagrams, Latches, and Flip Flop Prof. YingLi Tian Nov. 6, 2017 Department of Electrical Engineering The City College of New York The City University

More information

Comp 11 Lectures. Mike Shah. July 26, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 26, / 40

Comp 11 Lectures. Mike Shah. July 26, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 26, / 40 Comp 11 Lectures Mike Shah Tufts University July 26, 2017 Mike Shah (Tufts University) Comp 11 Lectures July 26, 2017 1 / 40 Please do not distribute or host these slides without prior permission. Mike

More information

Models of Computation. by Costas Busch, LSU

Models of Computation. by Costas Busch, LSU Models of Computation by Costas Busch, LSU 1 Computation CPU memory 2 temporary memory input memory CPU output memory Program memory 3 Example: f ( x) x 3 temporary memory input memory Program memory compute

More information

High-Performance Scientific Computing

High-Performance Scientific Computing High-Performance Scientific Computing Instructor: Randy LeVeque TA: Grady Lemoine Applied Mathematics 483/583, Spring 2011 http://www.amath.washington.edu/~rjl/am583 World s fastest computers http://top500.org

More information

Memory Elements I. CS31 Pascal Van Hentenryck. CS031 Lecture 6 Page 1

Memory Elements I. CS31 Pascal Van Hentenryck. CS031 Lecture 6 Page 1 Memory Elements I CS31 Pascal Van Hentenryck CS031 Lecture 6 Page 1 Memory Elements (I) Combinational devices are good for computing Boolean functions pocket calculator Computers also need to remember

More information

We are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors

We are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors CSC258 Week 3 1 Logistics If you cannot login to MarkUs, email me your UTORID and name. Check lab marks on MarkUs, if it s recorded wrong, contact Larry within a week after the lab. Quiz 1 average: 86%

More information

Lisp Introduction. Dr. Neil T. Dantam. Spring CSCI-498/598 RPM, Colorado School of Mines. Dantam (Mines CSCI, RPM) Lisp Spring / 88

Lisp Introduction. Dr. Neil T. Dantam. Spring CSCI-498/598 RPM, Colorado School of Mines. Dantam (Mines CSCI, RPM) Lisp Spring / 88 Lisp Introduction Dr. Neil T. Dantam CSCI-498/598 RPM, Colorado School of Mines Spring 28 Dantam (Mines CSCI, RPM) Lisp Spring 28 / 88 Outline Lisp Common Lisp by Example Implementation Details Typing

More information

Introduction to functions

Introduction to functions Introduction to functions Comp Sci 1570 Introduction to C++ Outline 1 2 Functions A function is a reusable sequence of s designed to do a particular job. In C++, a function is a group of s that is given

More information

CMSC 313 Lecture 16 Announcement: no office hours today. Good-bye Assembly Language Programming Overview of second half on Digital Logic DigSim Demo

CMSC 313 Lecture 16 Announcement: no office hours today. Good-bye Assembly Language Programming Overview of second half on Digital Logic DigSim Demo CMSC 33 Lecture 6 nnouncement: no office hours today. Good-bye ssembly Language Programming Overview of second half on Digital Logic DigSim Demo UMC, CMSC33, Richard Chang Good-bye ssembly

More information

Combinatorial Logic Design Multiplexers and ALUs CS 64: Computer Organization and Design Logic Lecture #13

Combinatorial Logic Design Multiplexers and ALUs CS 64: Computer Organization and Design Logic Lecture #13 Combinatorial Logic Design Multiplexers and ALUs CS 64: Computer Organization and Design Logic Lecture #13 Ziad Matni Dept. of Computer Science, UCSB Administrative Re: Midterm Exam #2 Graded! 5/22/18

More information

Lecture 1: Introduction to Sublinear Algorithms

Lecture 1: Introduction to Sublinear Algorithms CSE 522: Sublinear (and Streaming) Algorithms Spring 2014 Lecture 1: Introduction to Sublinear Algorithms March 31, 2014 Lecturer: Paul Beame Scribe: Paul Beame Too much data, too little time, space for

More information

A First Course on Kinetics and Reaction Engineering Example 2.2

A First Course on Kinetics and Reaction Engineering Example 2.2 Example 2.2 Problem Purpose his problem illustrates how to calculate a heat of reaction using standard heat of combustion data. It also shows one way to handle the situation where one of the reagents undergoes

More information

UC Santa Barbara. Operating Systems. Christopher Kruegel Department of Computer Science UC Santa Barbara

UC Santa Barbara. Operating Systems. Christopher Kruegel Department of Computer Science UC Santa Barbara Operating Systems Christopher Kruegel Department of Computer Science http://www.cs.ucsb.edu/~chris/ Many processes to execute, but one CPU OS time-multiplexes the CPU by operating context switching Between

More information

Lecture 13: Sequential Circuits, FSM

Lecture 13: Sequential Circuits, FSM Lecture 13: Sequential Circuits, FSM Today s topics: Sequential circuits Finite state machines Reminder: midterm on Tue 2/28 will cover Chapters 1-3, App A, B if you understand all slides, assignments,

More information

Evolving a New Feature for a Working Program

Evolving a New Feature for a Working Program Evolving a New Feature for a Working Program Mike Stimpson arxiv:1104.0283v1 [cs.ne] 2 Apr 2011 January 18, 2013 Abstract A genetic programming system is created. A first fitness function f 1 is used to

More information

Creative Data Mining

Creative Data Mining Creative Data Mining Using ML algorithms in python Artem Chirkin Dr. Daniel Zünd Danielle Griego Lecture 7 0.04.207 /7 What we will cover today Outline Getting started Explore dataset content Inspect visually

More information

Reading Selection: How do species change over time?

Reading Selection: How do species change over time? Reading Selection: How do species change over time? 1. Who first studied how species change over time? Jean-Baptiste Lamarck (1744-1829) and Charles Darwin (1809-1882) both had ideas about how life on

More information

CAAM420: Week 3 Wednesday Notes

CAAM420: Week 3 Wednesday Notes CAAM420: Week 3 Wednesday Notes Justin DeVito 09/11/13 1 Overview of Homework 3 For an example function declaration: int rand ( ) int - return type rand - function name () - argument list (which can be

More information

Lecture 2: Metrics to Evaluate Systems

Lecture 2: Metrics to Evaluate Systems Lecture 2: Metrics to Evaluate Systems Topics: Metrics: power, reliability, cost, benchmark suites, performance equation, summarizing performance with AM, GM, HM Sign up for the class mailing list! Video

More information

The Bell-LaPadula Model

The Bell-LaPadula Model The Bell-LaPadula Model CSM27 Computer Security Dr Hans Georg Schaathun University of Surrey Autumn 2007 Dr Hans Georg Schaathun The Bell-LaPadula Model Autumn 2007 1 / 25 The session Session objectives

More information

Knowledge Discovery and Data Mining 1 (VO) ( )

Knowledge Discovery and Data Mining 1 (VO) ( ) Knowledge Discovery and Data Mining 1 (VO) (707.003) Map-Reduce Denis Helic KTI, TU Graz Oct 24, 2013 Denis Helic (KTI, TU Graz) KDDM1 Oct 24, 2013 1 / 82 Big picture: KDDM Probability Theory Linear Algebra

More information

Introduction to MPI. School of Computational Science, 21 October 2005

Introduction to MPI. School of Computational Science, 21 October 2005 Introduction to MPI John Burkardt School of Computational Science Florida State University... http://people.sc.fsu.edu/ jburkardt/presentations/ mpi 2005 fsu.pdf School of Computational Science, 21 October

More information

Information Security Theory vs. Reality

Information Security Theory vs. Reality Information Security Theory vs. Reality 0368-4474-01, Winter 2011 Lecture 7: Information flow control Eran Tromer 1 Slides credit: Max Krohn, MIT Ian Goldberg and Urs Hengartner, University of Waterloo

More information

Exploring the Potential of Instruction-Level Parallelism of Exposed Datapath Architectures with Buffered Processing Units

Exploring the Potential of Instruction-Level Parallelism of Exposed Datapath Architectures with Buffered Processing Units Exploring the Potential of Instruction-Level Parallelism of Exposed Datapath Architectures with Buffered Processing Units Anoop Bhagyanath and Klaus Schneider Embedded Systems Chair University of Kaiserslautern

More information

Lecture 13: Sequential Circuits, FSM

Lecture 13: Sequential Circuits, FSM Lecture 13: Sequential Circuits, FSM Today s topics: Sequential circuits Finite state machines 1 Clocks A microprocessor is composed of many different circuits that are operating simultaneously if each

More information

6.830 Lecture 11. Recap 10/15/2018

6.830 Lecture 11. Recap 10/15/2018 6.830 Lecture 11 Recap 10/15/2018 Celebration of Knowledge 1.5h No phones, No laptops Bring your Student-ID The 5 things allowed on your desk Calculator allowed 4 pages (2 pages double sided) of your liking

More information

CMP 334: Seventh Class

CMP 334: Seventh Class CMP 334: Seventh Class Performance HW 5 solution Averages and weighted averages (review) Amdahl's law Ripple-carry adder circuits Binary addition Half-adder circuits Full-adder circuits Subtraction, negative

More information

Programsystemkonstruktion med C++: Övning 1. Karl Palmskog Translated by: Siavash Soleimanifard. September 2011

Programsystemkonstruktion med C++: Övning 1. Karl Palmskog Translated by: Siavash Soleimanifard. September 2011 Programsystemkonstruktion med C++: Övning 1 Karl Palmskog palmskog@kth.se Translated by: Siavash Soleimanifard September 2011 Programuppbyggnad Klassens uppbyggnad A C++ class consists of a declaration

More information

An Automotive Case Study ERTSS 2016

An Automotive Case Study ERTSS 2016 Institut Mines-Telecom Virtual Yet Precise Prototyping: An Automotive Case Study Paris Sorbonne University Daniela Genius, Ludovic Apvrille daniela.genius@lip6.fr ludovic.apvrille@telecom-paristech.fr

More information

The Sieve of Erastothenes

The Sieve of Erastothenes The Sieve of Erastothenes Parallel and Distributed Computing Department of Computer Science and Engineering (DEI) Instituto Superior Técnico October 25, 2010 José Monteiro (DEI / IST) Parallel and Distributed

More information

Binary Search Trees. Motivation

Binary Search Trees. Motivation Binary Search Trees Motivation Searching for a particular record in an unordered list takes O(n), too slow for large lists (databases) If the list is ordered, can use an array implementation and use binary

More information

Socket Programming. Daniel Zappala. CS 360 Internet Programming Brigham Young University

Socket Programming. Daniel Zappala. CS 360 Internet Programming Brigham Young University Socket Programming Daniel Zappala CS 360 Internet Programming Brigham Young University Sockets, Addresses, Ports Clients and Servers 3/33 clients request a service from a server using a protocol need an

More information

IBIS EBD Modeling, Usage and Enhancement An Example of Memory Channel Multi-board Simulation

IBIS EBD Modeling, Usage and Enhancement An Example of Memory Channel Multi-board Simulation IBIS EBD Modeling, Usage and Enhancement An Example of Memory Channel Multi-board Simulation Tao Xu Asian IBIS Summit taoxu@sigrity.com Shanghai China November 11, 2008 Agenda Memory channel simulation

More information

Recursion. Recursion. Steven Zeil. November 25, 2013

Recursion. Recursion. Steven Zeil. November 25, 2013 Steven Zeil November 25, 2013 Outline 1 2 Example: Compressing a Picture 3 Outline I 1 2 Example: Compressing a Picture 3 A function is recursive if it calls itself or calls some other function that eventually

More information

Speculative Parallelism in Cilk++

Speculative Parallelism in Cilk++ Speculative Parallelism in Cilk++ Ruben Perez & Gregory Malecha MIT May 11, 2010 Ruben Perez & Gregory Malecha (MIT) Speculative Parallelism in Cilk++ May 11, 2010 1 / 33 Parallelizing Embarrassingly Parallel

More information

CSC321 Lecture 16: ResNets and Attention

CSC321 Lecture 16: ResNets and Attention CSC321 Lecture 16: ResNets and Attention Roger Grosse Roger Grosse CSC321 Lecture 16: ResNets and Attention 1 / 24 Overview Two topics for today: Topic 1: Deep Residual Networks (ResNets) This is the state-of-the

More information

Lecture 8: The Dummy Adversary

Lecture 8: The Dummy Adversary 6.897: Selected Topics in Cryptography 27 February 2004 Lecture 8: The Dummy dversary Instructor: Ran Canetti Scribed by: Jonathan Herzog 1 Previous Lecture Motivation for the Universally Composable (UC)

More information

List reversal: back into the frying pan

List reversal: back into the frying pan List reversal: back into the frying pan Richard Bornat March 20, 2006 Abstract More than thirty years ago Rod Burstall showed how to do a proof of a neat little program, shown in a modern notation in figure

More information

Problem Set 2. MAS 622J/1.126J: Pattern Recognition and Analysis. Due: 5:00 p.m. on September 30

Problem Set 2. MAS 622J/1.126J: Pattern Recognition and Analysis. Due: 5:00 p.m. on September 30 Problem Set 2 MAS 622J/1.126J: Pattern Recognition and Analysis Due: 5:00 p.m. on September 30 [Note: All instructions to plot data or write a program should be carried out using Matlab. In order to maintain

More information

Discrete Mathematics. CS204: Spring, Jong C. Park Computer Science Department KAIST

Discrete Mathematics. CS204: Spring, Jong C. Park Computer Science Department KAIST Discrete Mathematics CS204: Spring, 2008 Jong C. Park Computer Science Department KAIST Today s Topics Sequential Circuits and Finite-State Machines Finite-State Automata Languages and Grammars Nondeterministic

More information

Automata Theory CS S-12 Turing Machine Modifications

Automata Theory CS S-12 Turing Machine Modifications Automata Theory CS411-2015S-12 Turing Machine Modifications David Galles Department of Computer Science University of San Francisco 12-0: Extending Turing Machines When we added a stack to NFA to get a

More information

searching algorithms

searching algorithms searching algorithms learning objectives algorithms your software system software hardware learn what the searching problem is about learn two algorithms for solving this problem learn the importance of

More information

CS 6110 Lecture 28 Subtype Polymorphism 3 April 2013 Lecturer: Andrew Myers

CS 6110 Lecture 28 Subtype Polymorphism 3 April 2013 Lecturer: Andrew Myers CS 6110 Lecture 28 Subtype Polymorphism 3 April 2013 Lecturer: Andrew Myers 1 Introduction In this lecture, we make an attempt to extend the typed λ-calculus for it to support more advanced data structures

More information

Data Structures and Algorithms " Search Trees!!

Data Structures and Algorithms  Search Trees!! Data Structures and Algorithms " Search Trees!! Outline" Binary Search Trees! AVL Trees! (2,4) Trees! 2 Binary Search Trees! "! < 6 2 > 1 4 = 8 9 Ordered Dictionaries" Keys are assumed to come from a total

More information

Lecture 17: Trees and Merge Sort 10:00 AM, Oct 15, 2018

Lecture 17: Trees and Merge Sort 10:00 AM, Oct 15, 2018 CS17 Integrated Introduction to Computer Science Klein Contents Lecture 17: Trees and Merge Sort 10:00 AM, Oct 15, 2018 1 Tree definitions 1 2 Analysis of mergesort using a binary tree 1 3 Analysis of

More information

CS1800: Hex & Logic. Professor Kevin Gold

CS1800: Hex & Logic. Professor Kevin Gold CS1800: Hex & Logic Professor Kevin Gold Reviewing Last Time: Binary Last time, we saw that arbitrary numbers can be represented in binary. Each place in a binary number stands for a different power of

More information

A Comparison Between MongoDB and MySQL Document Store Considering Performance

A Comparison Between MongoDB and MySQL Document Store Considering Performance A Comparison Between MongoDB and MySQL Document Store Considering Performance Erik Andersson and Zacharias Berggren Erik Andersson and Zacharias Berggren VT 2017 Examensarbete, 15 hp Supervisor: Kai-Florian

More information

Lecture 36: Other Non-computable Problems

Lecture 36: Other Non-computable Problems Lecture 36: Other Non-computable Problems Aims: To show how to prove that other problems are non-computable, which involves reductions from, e.g., the Halting Problem; and To point out how few problems

More information

Blocking Synchronization: Streams Vijay Saraswat (Dec 10, 2012)

Blocking Synchronization: Streams Vijay Saraswat (Dec 10, 2012) 1 Streams Blocking Synchronization: Streams Vijay Saraswat (Dec 10, 2012) Streams provide a very simple abstraction for determinate parallel computation. The intuition for streams is already present in

More information

CSE 380 Computer Operating Systems

CSE 380 Computer Operating Systems CSE 380 Computer Operating Systems Instructor: Insup Lee & Dianna Xu University of Pennsylvania, Fall 2003 Lecture Note 3: CPU Scheduling 1 CPU SCHEDULING q How can OS schedule the allocation of CPU cycles

More information

CMP 338: Third Class

CMP 338: Third Class CMP 338: Third Class HW 2 solution Conversion between bases The TINY processor Abstraction and separation of concerns Circuit design big picture Moore s law and chip fabrication cost Performance What does

More information

6.897: Selected Topics in Cryptography Lectures 7 and 8. Lecturer: Ran Canetti

6.897: Selected Topics in Cryptography Lectures 7 and 8. Lecturer: Ran Canetti 6.897: Selected Topics in Cryptography Lectures 7 and 8 Lecturer: Ran Canetti Highlights of past lectures Presented a basic framework for analyzing the security of protocols for multi-party function evaluation.

More information

MITOCW ocw f99-lec16_300k

MITOCW ocw f99-lec16_300k MITOCW ocw-18.06-f99-lec16_300k OK. Here's lecture sixteen and if you remember I ended up the last lecture with this formula for what I called a projection matrix. And maybe I could just recap for a minute

More information

Description Logics: an Introductory Course on a Nice Family of Logics. Day 2: Tableau Algorithms. Uli Sattler

Description Logics: an Introductory Course on a Nice Family of Logics. Day 2: Tableau Algorithms. Uli Sattler Description Logics: an Introductory Course on a Nice Family of Logics Day 2: Tableau Algorithms Uli Sattler 1 Warm up Which of the following subsumptions hold? r some (A and B) is subsumed by r some A

More information

ENERGY IN CHEMISTRY. R. Ashby Duplication by permission only.

ENERGY IN CHEMISTRY. R. Ashby Duplication by permission only. CH 11 TOPIC 28 CHANGING STATES OF MATTER 1 You have mastered this topic when you can: 1) define or describe: ENERGY, POTENTIAL ENERGY, KINETIC ENERGY & KINETIC MOLECULAR THEORY 2) define or describe HEAT

More information

Combinational Logic Trainer Lab Manual

Combinational Logic Trainer Lab Manual Combinational Logic Trainer Lab Manual Control Inputs Microprocessor Data Inputs ff Control Unit '0' Datapath MUX Nextstate Logic State Memory Register Output Logic Control Signals ALU ff Register Status

More information

Control Systems I. Lecture 2: Modeling and Linearization. Suggested Readings: Åström & Murray Ch Jacopo Tani

Control Systems I. Lecture 2: Modeling and Linearization. Suggested Readings: Åström & Murray Ch Jacopo Tani Control Systems I Lecture 2: Modeling and Linearization Suggested Readings: Åström & Murray Ch. 2-3 Jacopo Tani Institute for Dynamic Systems and Control D-MAVT ETH Zürich September 28, 2018 J. Tani, E.

More information

Control Systems I. Lecture 6: Poles and Zeros. Readings: Emilio Frazzoli. Institute for Dynamic Systems and Control D-MAVT ETH Zürich

Control Systems I. Lecture 6: Poles and Zeros. Readings: Emilio Frazzoli. Institute for Dynamic Systems and Control D-MAVT ETH Zürich Control Systems I Lecture 6: Poles and Zeros Readings: Emilio Frazzoli Institute for Dynamic Systems and Control D-MAVT ETH Zürich October 27, 2017 E. Frazzoli (ETH) Lecture 6: Control Systems I 27/10/2017

More information

CS173 Strong Induction and Functions. Tandy Warnow

CS173 Strong Induction and Functions. Tandy Warnow CS173 Strong Induction and Functions Tandy Warnow CS 173 Introduction to Strong Induction (also Functions) Tandy Warnow Preview of the class today What are functions? Weak induction Strong induction A

More information

Sequential Logic (3.1 and is a long difficult section you really should read!)

Sequential Logic (3.1 and is a long difficult section you really should read!) EECS 270, Fall 2014, Lecture 6 Page 1 of 8 Sequential Logic (3.1 and 3.2. 3.2 is a long difficult section you really should read!) One thing we have carefully avoided so far is feedback all of our signals

More information

Causality in Concurrent Systems

Causality in Concurrent Systems Causality in Concurrent Systems F. Russo Vrije Universiteit Brussel Belgium S.Crafa Università di Padova Italy HaPoC 31 October 2013, Paris Causality in Concurrent Systems software, hardware or even physical

More information

July 20, The day software bugs nearly lost us the moon. July 20, 2004

July 20, The day software bugs nearly lost us the moon. July 20, 2004 July 20, 1969 The day software bugs nearly lost us the moon July 20, 2004 1 This day, 35 years ago 35 years today 2 (of course, it never happened ) Flag waving in vacuum English writing on rocks 3 Guidance

More information

Table of Content. Chapter 11 Dedicated Microprocessors Page 1 of 25

Table of Content. Chapter 11 Dedicated Microprocessors Page 1 of 25 Chapter 11 Dedicated Microprocessors Page 1 of 25 Table of Content Table of Content... 1 11 Dedicated Microprocessors... 2 11.1 Manual Construction of a Dedicated Microprocessor... 3 11.2 FSM + D Model

More information

Page rank computation HPC course project a.y

Page rank computation HPC course project a.y Page rank computation HPC course project a.y. 2015-16 Compute efficient and scalable Pagerank MPI, Multithreading, SSE 1 PageRank PageRank is a link analysis algorithm, named after Brin & Page [1], and

More information

ALU A functional unit

ALU A functional unit ALU A functional unit that performs arithmetic operations such as ADD, SUB, MPY logical operations such as AND, OR, XOR, NOT on given data types: 8-,16-,32-, or 64-bit values A n-1 A n-2... A 1 A 0 B n-1

More information

INF2220: algorithms and data structures Series 1

INF2220: algorithms and data structures Series 1 Universitetet i Oslo Institutt for Informatikk I. Yu, D. Karabeg INF2220: algorithms and data structures Series 1 Topic Function growth & estimation of running time, trees (Exercises with hints for solution)

More information

Test Generation for Designs with Multiple Clocks

Test Generation for Designs with Multiple Clocks 39.1 Test Generation for Designs with Multiple Clocks Xijiang Lin and Rob Thompson Mentor Graphics Corp. 8005 SW Boeckman Rd. Wilsonville, OR 97070 Abstract To improve the system performance, designs with

More information

Efficient TDM-based Arbitration for Mixed-Criticality Systems on Multi-Cores

Efficient TDM-based Arbitration for Mixed-Criticality Systems on Multi-Cores Efficient TDM-based Arbitration for Mixed-Criticality Systems on Multi-Cores Florian Brandner with Farouk Hebbache, 2 Mathieu Jan, 2 Laurent Pautet LTCI, Télécom ParisTech, Université Paris-Saclay 2 CEA

More information

Porting RSL to C++ Ryusuke Villemin, Christophe Hery. Pixar Technical Memo 12-08

Porting RSL to C++ Ryusuke Villemin, Christophe Hery. Pixar Technical Memo 12-08 Porting RSL to C++ Ryusuke Villemin, Christophe Hery Pixar Technical Memo 12-08 1 Introduction In a modern renderer, relying on recursive ray-tracing, the number of shader calls increases by one or two

More information

INVARIANT SUBSETS OF THE SEARCH SPACE AND THE UNIVERSALITY OF A GENERALIZED GENETIC ALGORITHM

INVARIANT SUBSETS OF THE SEARCH SPACE AND THE UNIVERSALITY OF A GENERALIZED GENETIC ALGORITHM INVARIANT SUBSETS OF THE SEARCH SPACE AND THE UNIVERSALITY OF A GENERALIZED GENETIC ALGORITHM BORIS MITAVSKIY Abstract In this paper we shall give a mathematical description of a general evolutionary heuristic

More information

Functional Dependencies. Getting a good DB design Lisa Ball November 2012

Functional Dependencies. Getting a good DB design Lisa Ball November 2012 Functional Dependencies Getting a good DB design Lisa Ball November 2012 Outline (2012) SEE NEXT SLIDE FOR ALL TOPICS (some for you to read) Normalization covered by Dr Sanchez Armstrong s Axioms other

More information

Realization of programmable logic array using compact reversible logic gates 1

Realization of programmable logic array using compact reversible logic gates 1 Realization of programmable logic array using compact reversible logic gates 1 E. Chandini, 2 Shankarnath, 3 Madanna, 1 PG Scholar, Dept of VLSI System Design, Geethanjali college of engineering and technology,

More information