Concurrency Wrap-Up & Final Review

Slides:



Advertisements
Similar presentations
1 Processes Professor Jennifer Rexford
Advertisements

1 Processes and Pipes COS 217 Professor Jennifer Rexford.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Application Layer PART VI.
Basic Networking & Interprocess Communication Vivek Pai Nov 27, 2001.
OOP Languages: Java vs C++
CSE333 SECTION 7. Midterm Debrief Hex View 1. Find a hex editor. 2. Learn ‘goto offset’ command. 3. See HW3 pictures. The header: Magic word Checksum.
CS252: Systems Programming Ninghui Li Final Exam Review.
Review for Midterm Chapter 1-9 CSc 212 Data Structures.
Elementary TCP Sockets
Today’s topic Other server design alternatives –Preforked servers –Threaded servers –Prethreaded servers.
Server Sockets: A server socket listens on a given port Many different clients may be connecting to that port Ideally, you would like a separate file descriptor.
CSE 425: Object-Oriented Programming I Object-Oriented Programming A design method as well as a programming paradigm –For example, CRC cards, noun-verb.
Elementary TCP Sockets
CS 241 Section (04/19/12). MP8  Web Server  Due: Tuesday, May 1 st, 11:59pm  What will you be doing?  Creating a web-server in C that serves HTML.
The Socket Interface Chapter 21. Application Program Interface (API) Interface used between application programs and TCP/IP protocols Interface used between.
The Socket Interface Chapter 22. Introduction This chapter reviews one example of an Application Program Interface (API) which is the interface between.
Remote Shell CS230 Project #4 Assigned : Due date :
Scis.regis.edu ● CS 468: Advanced UNIX Class 4 Dr. Jesús Borrego Regis University 1.
CS 153 Design of Operating Systems Spring 2015 Lecture 5: Processes and Threads.
CS212: Object Oriented Analysis and Design Lecture 17: Virtual Functions.
The Client-Server Model And the Socket API. Client-Server (1) The datagram service does not require cooperation between the peer applications but such.
Threads. Readings r Silberschatz et al : Chapter 4.
Abstract Classes & Object Slicing. Pure Virtual Functions Virtual Function : Child class may override, if working with pointer/reference, check to see.
Overview of C++ Polymorphism
Fall 2015CISC/CMPE320 - Prof. McLeod1 CISC/CMPE320 Assignment 3 is due Sunday, the 8 th at 7pm. Problems with assn 3? Discuss at your team meeting tonight.
R Some of these slides are from Prof Frank Lin SJSU. r Minor modifications are made. 1.
Abstract Classes & Object Slicing. Object Slicing.
1 K. Salah Application Layer Module K. Salah Network layer duties.
ECE 297 Concurrent Servers Process, fork & threads ECE 297.
Operating Systems Review ENCE 360.
Boots Cassel Villanova University
EE2E1. JAVA Programming Revision Lecture.
CSE687 - Object Oriented Design class notes Survey of the C++ Programming Language Jim Fawcett Spring 2004.
CS399 New Beginnings Jonathan Walpole.
Chapter 4: Multithreaded Programming
CH5 TCP Client - Server Example:
Chapter4 Elementary TCP Socket
Chapter 4: Threads.
Inheritance Often, software encapsulates multiple concepts for which some attributes/behaviors overlap E.g. A computer (role-playing) game has: Monsters:
Interacting With Protocol Software
Processes in Unix, Linux, and Windows
Processes in Unix, Linux, and Windows
Advanced Network Programming spring 2007
27.
CSE 451: Operating Systems Winter 2011 Processes
CSE 451: Operating Systems Winter 2010 Module 4 Processes
Planning the Addressing Structure
Operating Systems Lecture 1.
Jonathan Walpole Computer Science Portland State University
CSE 333 – Section 10 Final Review.
Server-side Programming CSE 333 Autumn 2018
Server-side Programming CSE 333 Summer 2018
Course Wrap-Up CSE 333 Summer 2018
Course Wrap-Up CSE 333 Autumn 2018
Overview of C++ Polymorphism
Concurrency: Processes CSE 333 Summer 2018
Chapter 3 Socket API © Bobby Hoggard, Department of Computer Science, East Carolina University These slides may not be used or duplicated without permission.
CSE 451: Operating Systems Winter 2003 Lecture 4 Processes
Concurrency and Processes CSE 333 Spring 2018
Processes in Unix, Linux, and Windows
CS510 Operating System Foundations
CSE 451: Operating Systems Autumn 2004 Module 4 Processes
CSE 333 FINAL review.
Concurrency: Processes CSE 333 Autumn 2018
Server-side Programming CSE 333 Winter 2019
Course Wrap-Up CSE 333 Winter 2019
CSE 153 Design of Operating Systems Winter 2019
Concurrency: Processes CSE 333 Winter 2019
Final Exam Review Inheritance Template Functions and Classes
Presentation transcript:

Concurrency Wrap-Up & Final Review CSE 333 – Section 10 Concurrency Wrap-Up & Final Review

Concurrency Wrapup: fork() example Primary use patterns of fork(): Server handling connections (lecture example) Shell executing programs (this example) Demo: hpsh.c Some cool bash tricks to try out: ps ps; sleep 5 (ps; sleep 5) I’ve just forked in bash as you can tell, I’ve actually used this functionality before. It’s pretty useful! (sleep 0.1; (ps; sleep 1)) Now I’ve forked two. Haha, cool right? sh ps -fx: I’m in a shell that’s inside a bash shell. If I exit, I’m back to where I was. Now then, we talked about fork and exec, well I’ve just shown two examples of how we can fork in bash. Right now I’m inside the sh shell which is inside the bash shell. Let’s type ps. Note my PID. Now I’ll type exec ps. The sh address space was completely taken over by ps. Ps. Now what happens if I type (exec ps)? Inside the forked bash shell ps is executed and takes over it, printing out what you see. And, as you can tell it didn’t replace the shell I’m in right now because it’s still the same PID.

The Rest of C++ Templates – template definitions vs instantiation STL, containers and iterators. vector, list, map Smart pointers, using with STL. unique_ptr (cannot be copied, but can move ownership to another) shared_ptr (reference counting) weak_ptr (using to break cycles and why this is needed) Subclasses, inheritance, virtual functions, dynamic vs static dispatch (function calls), vtables, constructors and destructors in subclasses Pure virtual functions and abstract classes (what they are) Using class hierarchies with STL and smart pointers, assignment slicing, value vs pointer semantics C++ casts Any questions?

Network Programming Basic network layers: physical, data link, IP, TCP, application Packets, and packet encapsulation across layers IP addresses, address families (IPv4, IPv6), DNS, ports Stream sockets, file descriptors, read, write Client steps: address resolution, create socket, connect socket to server, read/write (including retries), close Server steps: determine address and port, create socket, bind socket to address/port, listen (and how the OS queues pending connections), accept connection, read/write, close Very basic HTTP and HTML Any questions?

Concurrency Multiple processes and fork() (mostly CSE351 review), shared file descriptors and close() in forked processes Threads - concurrent execution inside a single process; know a few of the pthread basics (i.e., what it means to create a thread and start execution in a function) Use of concurrency to improve throughput and resource utilization Any questions?

The Pre-Midterm Topics Don’t forget the first half of the class, the final is cumulative! Brief summary: C programming, pointers and memory management POSIX libraries read, write, open, close, etc. The beginning of C++ classes/modularity, references, operator overloading, and other differences from C Any questions?