Today: VM wrap-up Select (if time) Course wrap-up Final Evaluations
|
|
- Domenic Anthony
- 6 years ago
- Views:
Transcription
1 Today: VM wrap-up Select (if time) Course wrap-up Final Evaluations
2 Program structure int A[1024][1024] ; Each row is stored in one page Ignore code page in this example One frame allocated Program 1 for (j = 0; j< 1024; j++) for (i = 0; i< 1024;i++) A[i][j] = i*j; 1024 x 1024 page faults 2
3 Program 2 for (i = 0; i< 1024; i++) for (j = 0; j< 1024;j++) A[i][j] = i*j; 1024 page faults 3
4 Asynchrony Many programs need to establish multiple I/O channels Need concurrent channels e.g. webserver requests and replies http files and images Challenge: don t know which channels are ready We ve seen many ways to handle this
5 One way Threads Use a separate thread to handle each I/O channel Each thread manages channel with standard blocking calls read and write Potential Issues? threads must be able to block safely threads consume resources Lab #4
6 Other options Polling-based (lab #2) use non-blocking I/O on read/write retry if nothing there Problems with this solution: lots of system calls! complexity performance how often to retry?
7 Other options (cont d) Set up signal handlers to deal with I/O completion events (SIGIO) For some I/O devices, you can set O_NONBLOCK O_ASYNC and get sent a signal when input or output is ready the appeal? works for network sockets Setup SIGIO handler Get an fd corresponding to network connection Use fcntl to set properties on this fd fd = accept (.); Emulated this in lab #3 fcntl (fd, F_SETFL, O_NONBLOCK O_ASYNC);
8 Approach is limited Using I/O signals limited to certain channel types works for a single channel any multiplexing has to be layered on top multiple channels: which channel caused the signal?
9 Another option: Select More efficient polling and multiplexing Use select() to wait for multiple I/O channels simultaneously select generally requires fewer system calls blocks if NOTHING is ready
10 #include <sys/select.h> I/O multiplexing int select (int n, fd_set *readfds, NULL, NULL, struct timeval *timeout); n is the max fd # to check (max_fd + 1) readfds contain fds of interest; can be NULL, if don t care timeval is the timeout how long to wait, NULL if forever returns -1 on failure modifies fd_set to indicate those that are ready
11 Using select (cont d) Write your program as an event-loop Before each call to select, set the fd set to be monitored fds as select will clear bits not ready when it returns Set n appropriately (max(fd)+1) Call select to see what is ready Act on the ready fd (i.e. do the I/O) Repeat
12 Init and set fd bits: Using select (cont d) FD_ZERO (fd_set *set); // init a set FD_SET (int fd, fd_set *set); // set this fd for monitoring FD_CLR (int fd, fd_set *set); // clear a bit FD_ISSET (int fd, fd_set *set); // is fd in the ready set?
13 Using select Example: want to read from multiple sources while (1) { // set/restore monitored fd_set each time through the loop FD_ZERO (&readset); FD_SET (fd1, &readset); FD_SET (fd2, &readset); max_fd = max (fd1, fd2); select (max_fd+1, &readset, NULL, NULL, NULL); if (FD_ISSET (fd1, &readset) read (fd1,.); if (FD_ISSET (fd2, &readset) read (fd2,.); }
14 Using select (cont d) Select blocks until >=1 fd is ready Returns a value > 0 Select returns due to timeout Returns a value = 0 Select returns a value < 0 if an error in select call
15 Lab #2 without non-blocking reads! fd_set rfds; FD_ZERO(&rfds); for (i=0; i<total_tabs; i++) { if(channel[i].child_to_parent_fd[0]!=0) FD_SET(channel[i].child_to_parent_fd[0], &rfds); if(channel[i].child_to_parent_fd[0] > max_fd) max_fd = channel[i].child_to_parent_fd[0]; } select(max_fd + 1, &rfds, NULL, NULL, NULL); for(i=0; i<total_tabs; i++){ if(fd_isset(channel[i].child_to_parent_fd[0], &rfds)){ //Child 'i' has sent a request
16
17 Course wrap-up tell me about 4061 Systems are complex beasts Programming them is hard - concurrency - asynchrony - multiple interacting components - metrics (sometimes competing): performance, reliability, security - stakeholders: user, admin, system
18 Abstraction hides complexity promotes usability Systems programming abstractions Process: running program/resource container I/O: data movement to/from external device File: container for data Directory: container for related files Pipes/Mailbox: communication stream Thread: control Synchronization: CV, semaphore, lock Socket: communication end-point
19 Want more? Take CSCi 5103 Operating Systems
20 The Final: Closed: I ll give APIs 90% incremental since exam #2 semaphores, CVs, ME, BB, RW, barriers network programming: sockets, addressing, etc. virtual memory 10% older Length of an in-class exam ~ 35% short answer ~ 65% longer answer
21 3 Longer questions (programming/analysis): Virtual memory Network programming Synchronization Will post a sample exam
I/O Models. Kartik Gopalan
I/O Models Kartik Gopalan Types of Concurrency True Concurrency (multiple processes or threads) Multi-processor machines Child processes/threads execute in parallel. Multi-process (forking) servers If
More informationCONCURRENCY MODEL. UNIX Programming 2014 Fall by Euiseong Seo
CONCURRENCY MODEL UNIX Programming 2014 Fall by Euiseong Seo Echo Server Revisited int main (int argc, char *argv[]) {... listenfd = socket(af_inet, SOCK_STREAM, 0); bzero((char *)&saddr, sizeof(saddr));
More informationNetwork Programming TDC 561
Network Programming TDC 561 Lecture # 4: Server Design (II) - Concurrent Servers Dr. Ehab S. Al-Shaer School of Computer Science & Telecommunication DePaul University Chicago, IL 1 Unix Signals A signal
More informationISA 563: Fundamentals of Systems Programming
ISA 563: Fundamentals of Systems Programming Advanced IO April 9, 2012 Non-blocking IO Data processing can be much faster than data access Waiting for IO to finish can be time consuming, and may not even
More informationCSE 43: Computer Networks Structure, Threading, and Blocking. Kevin Webb Swarthmore College September 14, 2017
CSE 43: Computer Networks Structure, Threading, and Blocking Kevin Webb Swarthmore College September 14, 2017 1 Agenda Under-the-hood look at system calls Data buffering and blocking Processes, threads,
More informationCSCE 313 Introduction to Computer Systems. Instructor: Dezhen Song
CSCE 313 Introduction to Computer Systems Instructor: Dezhen Song UNIX I/O Files and File Representation Basic operations: Reading / Writing Caching: File Open / Close Multiplexing: Select / Poll File
More informationCISC2200 Threads Spring 2015
CISC2200 Threads Spring 2015 Process We learn the concept of process A program in execution A process owns some resources A process executes a program => execution state, PC, We learn that bash creates
More informationΕργαστήριο 9 I/O Multiplexing
Εργαστήριο 9 I/O Multiplexing Στοεργαστήριοθαμελετηθούν: Server High Level View I/O Multiplexing Solutions for Concurrency nonblocking I/O Use alarm and signal handler to interrupt slow system calls. Use
More information10. I/O System Library
10. I/O System Library Header File #include // Found in C:\Nburn\include General File Descriptor Functions close --- Close open file descriptors read --- Read data from a file descriptor ReadWithTimeout
More informationNetwork Games Part II. Architecture of Network Game
Network Games Part II Doron Nussbaum Network Games Part II COMP 5900 1 Architecture of Network Game Client Server Peer to Peer Player 1 Player 2 Player 1 Player 2 Server Player 5 Player 3 Player 5 Player
More informationConcurrent Programming. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University
Concurrent Programming Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Echo Server Revisited int main (int argc, char *argv[]) {... listenfd = socket(af_inet,
More informationCSci 4061 Introduction to Operating Systems. IPC: Basics, Pipes
CSci 4061 Introduction to Operating Systems IPC: Basics, Pipes Today Directory wrap-up Communication/IPC Test in one week Communication Abstraction: conduit for data exchange between two or more processes
More informationConcurrent Server Design Multiple- vs. Single-Thread
Concurrent Server Design Multiple- vs. Single-Thread Chuan-Ming Liu Computer Science and Information Engineering National Taipei University of Technology Fall 2007, TAIWAN NTUT, TAIWAN 1 Examples Using
More informationAny of the descriptors in the set {1, 4} have an exception condition pending
Page 1 of 6 6.3 select Function This function allows the process to instruct the kernel to wait for any one of multiple events to occur and to wake up the process only when one or more of these events
More informationUNIT III - APPLICATION DEVELOPMENT. TCP Echo Server
UNIT III - APPLICATION DEVELOPMENT TCP Echo Server TCP Echo Client Posix Signal handling Server with multiple clients boundary conditions: Server process Crashes, Server host Crashes, Server Crashes and
More informationAssignment 2 Group 5 Simon Gerber Systems Group Dept. Computer Science ETH Zurich - Switzerland
Assignment 2 Group 5 Simon Gerber Systems Group Dept. Computer Science ETH Zurich - Switzerland t Your task Write a simple file server Client has to be implemented in Java Server has to be implemented
More informationNetwork programming(ii) Lenuta Alboaie
Network programming(ii) Lenuta Alboaie adria@info.uaic.ro 1 Content let s remember: iterative TCP client/server UDP client/server model I/O primitives Advanced programming aspects in Internet socket API
More informationCSC209H Lecture 10. Dan Zingaro. March 18, 2015
CSC209H Lecture 10 Dan Zingaro March 18, 2015 Creating a Client To create a client that can connect to a server, call the following, in order: socket: create a communication endpoint This is the same as
More informationVersion Control with Git and What is there in Project 1 PALLABI GHOSH COMPUTER NETWORKS RECITATION 1
Version Control with Git and What is there in Project 1 PALLABI GHOSH (PALLABIG@ANDREW.CMU.EDU) 15-441 COMPUTER NETWORKS RECITATION 1 What is version control? Revisit previous code versions Backup projects
More informationECE 650 Systems Programming & Engineering. Spring 2018
ECE 650 Systems Programming & Engineering Spring 2018 Inter-process Communication (IPC) Tyler Bletsch Duke University Slides are adapted from Brian Rogers (Duke) Recall Process vs. Thread A process is
More informationCSci 4061 Introduction to Operating Systems. (Advanced Control Signals)
CSci 4061 Introduction to Operating Systems (Advanced Control Signals) What is a Signal? Signals are a form of asynchronous IPC Earlier: Non-blocking I/O and check if it has happened => polling Problem
More informationcall connect call read call connect ret connect call fgets Client 2 blocks waiting to complete its connection request until after lunch!
15-213 The course that gives CMU its Zip! Concurrent Servers December 4, 2001 Topics Limitations of iterative servers Process-based concurrent servers Threads-based concurrent servers Event-based concurrent
More informationIntroduction to Asynchronous Programming Fall 2014
CS168 Computer Networks Fonseca Introduction to Asynchronous Programming Fall 2014 Contents 1 Introduction 1 2 The Models 1 3 The Motivation 3 4 Event-Driven Programming 4 5 select() to the rescue 5 1
More informationCOMP/ELEC 429/556 Introduction to Computer Networks
COMP/ELEC 429/556 Introduction to Computer Networks Creating a Network Application Some slides used with permissions from Edward W. Knightly, T. S. Eugene Ng, Ion Stoica, Hui Zhang 1 How to Programmatically
More informationEE 122: Sockets. Motivation. Sockets. Types of Sockets. Kevin Lai September 11, 2002
Motivation EE 122: Sockets Kevin Lai September 11, 2002 Applications need Application Programming Interface (API) to use the network API: set of function types and data structures and constants Desirable
More information33. Event-based Concurrency
33. Event-based Concurrency Oerating System: Three Easy Pieces AOS@UC 1 Event-based Concurrency A different style of concurrent rogramming without threads w Used in GUI-based alications, some tyes of internet
More informationPROCESSES AND THREADS THREADING MODELS. CS124 Operating Systems Winter , Lecture 8
PROCESSES AND THREADS THREADING MODELS CS124 Operating Systems Winter 2016-2017, Lecture 8 2 Processes and Threads As previously described, processes have one sequential thread of execution Increasingly,
More informationNETWORK AND SYSTEM PROGRAMMING. I/O Multiplexing: select and poll function
NETWORK AND SYSTEM PROGRAMMING LAB 15 I/O Multiplexing: select and poll function 15.1 objectives What is a Concurrent server Use of Select System call Use of Poll System call 15.2 What is concurrent server?
More informationCSE 333 Lecture fork, pthread_create, select
CSE 333 Lecture 22 -- fork, pthread_create, select Steve Gribble Department of Computer Science & Engineering University of Washington Administrivia HW4 out on Monday - you re gonna love it Final exam
More informationAsynchronous Events on Linux
Asynchronous Events on Linux Frederic.Rossi@Ericsson.CA Open System Lab Systems Research June 25, 2002 Ericsson Research Canada Introduction Linux performs well as a general purpose OS but doesn t satisfy
More informationCS118 Discussion Week 2. Taqi
CS118 Discussion Week 2 Taqi Outline Any Questions for Course Project 1? Socket Programming: Non-blocking mode Lecture Review: Application Layer Much of the other related stuff we will only discuss during
More informationTopics for this Week
Topics for this Week Layered Network Architecture ISO/OSI Reference Model Internet Protocol Suite Overview Application Programming Interface BSD Socket API Readings Sections 1.1-1.5, 6.1.3 (socket programming),
More informationCSE 333 Lecture non-blocking I/O and select
CSE 333 Lecture 19 -- non-blocking I/O and select Steve Gribble Department of Computer Science & Engineering University of Washington Non-blocking I/O Warning: an unfamiliar and slightly non-intuitive
More informationCSC209H Lecture 11. Dan Zingaro. March 25, 2015
CSC209H Lecture 11 Dan Zingaro March 25, 2015 Level- and Edge-Triggering (Kerrisk 63.1.1) When is an FD ready? Two answers: Level-triggered: when an operation will not block (e.g. read will not block),
More informationConcurrent Servers Dec 2, 2009"
Concurrent Servers Dec 2, 2009" Administrivia" 2! Iterative Servers" client 1! server! client 2! call connect ret connect call read ret read close call accept" ret accept" write close call accept" ret
More informationGlobal Employee Location Server
S4516 HELP Session 1 Global Employee Location Server Jeff Zhou jeffz@cs.wpi.edu 3/19/2011 Modified based on S4514 B05 slides Objective: Description To implement a simple concurrent server that has four
More informationThree Basic Mechanisms for Creating Concurrent Flows. Systemprogrammering 2009 Föreläsning 10 Concurrent Servers. Process-Based Concurrent Server
Systemprogrammering 2009 Föreläsning 10 Concurrent Servers Topics! Limitations of iterative servers! Process-based concurrent servers! Event-based concurrent servers! Threads-based concurrent servers Three
More informationWe start by looking at what s known as event-based programming: we write code that responds to events coming from a number of sources.
We start by looking at what s known as event-based programming: we write code that responds to events coming from a number of sources. As a simple example, before we use the approach in a networking example,
More informationIntroduction to Socket Programming
Introduction to Socket Programming Sandip Chakraborty Department of Computer Science and Engineering, INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR March 21, 2017 Sandip Chakraborty (IIT Kharagpur) CS 39006
More informationOperating Systems CMPSCI 377 Spring Mark Corner University of Massachusetts Amherst
Operating Systems CMPSCI 377 Spring 2017 Mark Corner University of Massachusetts Amherst Are threads it? Threads are not the only way to achieve concurrency Recall that our primary goal is to overlap I/O
More informationIterative Servers The course that gives CMU its Zip! Iterative servers process one request at a time. Concurrent Servers
15-213 The course that gives CMU its Zip! Concurrent Servers Dec 3, 2002 Topics! Limitations of iterative servers! Process-based concurrent servers! Event-based concurrent servers! Threads-based concurrent
More informationLearning from Bad Examples. CSCI 5828: Foundations of Software Engineering Lecture 25 11/18/2014
Learning from Bad Examples CSCI 5828: Foundations of Software Engineering Lecture 25 11/18/2014 1 Goals Demonstrate techniques to design for shared mutability Build on an example where multiple threads
More informationCONCURRENT PROGRAMMING. Lecture 5
CONCURRENT PROGRAMMING Lecture 5 Last lecture TCP I/O RIO: buffered I/O. Unix IO Question: difference between send() and write()? MSG_DONTWAIT, MSG_NOSIGNAL 2 Concurrent Programming is Hard! The human
More informationRedes de Computadores (RCOMP)
Redes de Computadores (RCOMP) Theoretical-Practical (TP) Lesson 07 2017/2018 Berkeley sockets API, C and Java. Basic functions/methods for TCP applications. TCP client and server. Asynchronous reception.
More informationCSC369 Lecture 2. Larry Zhang
CSC369 Lecture 2 Larry Zhang 1 Announcements Lecture slides Midterm timing issue Assignment 1 will be out soon! Start early, and ask questions. We will have bonus for groups that finish early. 2 Assignment
More informationCS 43: Computer Networks. 07: Concurrency and Non-blocking I/O Sep 17, 2018
CS 43: Computer Networks 07: Concurrency and Non-blocking I/O Sep 17, 2018 Reading Quiz Lecture 5 - Slide 2 Today Under-the-hood look at system calls Data buffering and blocking Inter-process communication
More informationEngineering Robust Server Software
Engineering Robust Server Software Scalability Intro To Scalability What does scalability mean? 2 Intro To Scalability 100 Design 1 Design 2 Latency (usec) 75 50 25 0 1 2 4 8 16 What does scalability mean?
More informationCS 153 Design of Operating Systems Winter 2016
CS 153 Design of Operating Systems Winter 2016 Lecture 7: Synchronization Administrivia Homework 1 Due today by the end of day Hopefully you have started on project 1 by now? Kernel-level threads (preemptable
More informationNetwork Programming in C: The Berkeley Sockets API. Networked Systems 3 Laboratory Sessions
Network Programming in C: The Berkeley Sockets API Networked Systems 3 Laboratory Sessions The Berkeley Sockets API Widely used low-level C networking API First introduced in 4.3BSD Unix Now available
More informationCPSC 410/611: File Management. What is a File?
CPSC 410/611: What is a file? Elements of file management File organization Directories File allocation Reading: Silberschatz, Chapter 10, 11 What is a File? A file is a collection of data elements, grouped
More informationLecture 5 Overview! Last Lecture! This Lecture! Next Lecture! I/O multiplexing! Source: Chapter 6 of Stevens book!
Lecture 5 Overview! Last Lecture! I/O multiplexing! Source: Chapter 6 of Stevens book! This Lecture! Socket options! Source: Chapter 7 of Stevens book! Elementary UDP sockets! Source: Chapter 8 of Stevens
More informationCSci 4061 Introduction to Operating Systems. IPC: Basics, Pipes
CSci 4061 Introduction to Operating Systems IPC: Basics, Pipes Communication IPC in Unix Pipes: most basic form of IPC in Unix process-process ps u jon grep tcsh // what happens? Pipe has a read-end (receive)
More informationCSci 4061 Introduction to Operating Systems. IPC: Basics, Pipes
CSci 4061 Introduction to Operating Systems IPC: Basics, Pipes Communication IPC in Unix Pipes: most basic form of IPC in Unix process-process ps u jon grep tcsh // what happens? Pipe has a read-end (receive)
More informationDecember 8, epoll: asynchronous I/O on Linux. Pierre-Marie de Rodat. Synchronous/asynch. epoll vs select and poll
e:.. e: e vs select and December 8, 2011 Plan e:.1 ronous.2 e vs select and e vs select and.3 Synchronous I/O A system call for I/O blocks until something can be returned. Quite easy to use. But when you
More informationCSC209 Review. Yeah! We made it!
CSC209 Review Yeah! We made it! 1 CSC209: Software tools Unix files and directories permissions utilities/commands Shell programming quoting wild cards files 2 ... and C programming... C basic syntax functions
More informationProject 1: A Web Server Called Liso
Project 1: A Web Server Called Liso 15-441/641 Computer Networks Kenneth Yang Viswesh Narayanan "What happens when you type google.com into your browser's address box and press enter?"... Establish a TCP
More informationCS4961 Parallel Programming. Lecture 12: Advanced Synchronization (Pthreads) 10/4/11. Administrative. Mary Hall October 4, 2011
CS4961 Parallel Programming Lecture 12: Advanced Synchronization (Pthreads) Mary Hall October 4, 2011 Administrative Thursday s class Meet in WEB L130 to go over programming assignment Midterm on Thursday
More informationCSC369 Lecture 2. Larry Zhang, September 21, 2015
CSC369 Lecture 2 Larry Zhang, September 21, 2015 1 Volunteer note-taker needed by accessibility service see announcement on Piazza for details 2 Change to office hour to resolve conflict with CSC373 lecture
More informationCSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files
CSC209 Review CSC209: Software tools Unix files and directories permissions utilities/commands Shell programming quoting wild cards files ... and systems programming C basic syntax functions arrays structs
More informationCSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files. Compiler vs.
CSC209 Review CSC209: Software tools Unix files and directories permissions utilities/commands Shell programming quoting wild cards files... and systems programming C basic syntax functions arrays structs
More informationRedesde Computadores(RCOMP)
Redesde Computadores(RCOMP) Theoretical-Practical (TP) Lesson 07 2016/2017 Berkeley sockets API, C and Java. Basic functions/methods for TCP applications. TCP client and server. Asynchronous reception.
More informationException-Less System Calls for Event-Driven Servers
Exception-Less System Calls for Event-Driven Servers Livio Soares and Michael Stumm University of Toronto Talk overview At OSDI'10: exception-less system calls Technique targeted at highly threaded servers
More informationCROWDMARK. Examination Midterm. Spring 2017 CS 350. Closed Book. Page 1 of 30. University of Waterloo CS350 Midterm Examination.
Times: Thursday 2017-06-22 at 19:00 to 20:50 (7 to 8:50PM) Duration: 1 hour 50 minutes (110 minutes) Exam ID: 3520593 Please print in pen: Waterloo Student ID Number: WatIAM/Quest Login Userid: Sections:
More informationChapter 8: I/O functions & socket options
Chapter 8: I/O functions & socket options 8.1 Introduction I/O Models In general, there are normally two phases for an input operation: 1) Waiting for the data to arrive on the network. When the packet
More informationMidterm Exam Answers
Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.824 Fall 2002 Midterm Exam Answers The average score was 55 (out of 80). Here s the distribution: 10 8
More informationProblem 1: Concepts (Please be concise)
Problem 1: Concepts (Please be concise) 1) Consider the use of threads vs. the select() system call for asynchronous I/O. Name one advantage of each approach. 2) Consider a dynamically allocated linked-list
More informationInput / Output. Kevin Webb Swarthmore College April 12, 2018
Input / Output Kevin Webb Swarthmore College April 12, 2018 xkcd #927 Fortunately, the charging one has been solved now that we've all standardized on mini-usb. Or is it micro-usb? Today s Goals Characterize
More information15-213: Final Exam Review
5-23: Final Exam Review Nikhil, Kashish, Krishanu, Stan Threads and Synchronization Carnegie Mellon Threads and Synchronization Carnegie Mellon Problem Statement: 5-23 Ts now want to begin a new procedure
More informationCSE 333 Final Exam June 6, 2017 Sample Solution
Question 1. (24 points) Some C and POSIX I/O programming. Given an int file descriptor returned by open(), write a C function ReadFile that reads the entire file designated by that file descriptor and
More informationChe-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University
Che-Wei Chang chewei@mail.cgu.edu.tw Department of Computer Science and Information Engineering, Chang Gung University l Chapter 10: File System l Chapter 11: Implementing File-Systems l Chapter 12: Mass-Storage
More informationCS-537: Final Exam (Spring 2011) The Black Box
CS-537: Final Exam (Spring 2011) The Black Box Please Read All Questions Carefully! There are thirteen (13) total numbered pages, with eight (8) questions. Name: 1 Grading Page Points Q1 Q2 Q3 Q4 Q5 Q6
More informationExample Questions for Midterm EE122, Fall 2008 EECS Berkeley
Example Questions for Midterm EE122, Fall 2008 EECS Berkeley Note: The midterm exam will have six problems or more. The five problems below represent around 60-70% of the workload you should expect at
More informationRCU. ò Walk through two system calls in some detail. ò Open and read. ò Too much code to cover all FS system calls. ò 3 Cases for a dentry:
Logical Diagram VFS, Continued Don Porter CSE 506 Binary Formats RCU Memory Management File System Memory Allocators System Calls Device Drivers Networking Threads User Today s Lecture Kernel Sync CPU
More informationVFS, Continued. Don Porter CSE 506
VFS, Continued Don Porter CSE 506 Logical Diagram Binary Formats Memory Allocators System Calls Threads User Today s Lecture Kernel RCU File System Networking Sync Memory Management Device Drivers CPU
More informationLecture 15: I/O Devices & Drivers
CS 422/522 Design & Implementation of Operating Systems Lecture 15: I/O Devices & Drivers Zhong Shao Dept. of Computer Science Yale University Acknowledgement: some slides are taken from previous versions
More informationOpenACC Course. Office Hour #2 Q&A
OpenACC Course Office Hour #2 Q&A Q1: How many threads does each GPU core have? A: GPU cores execute arithmetic instructions. Each core can execute one single precision floating point instruction per cycle
More informationMore Types of Synchronization 11/29/16
More Types of Synchronization 11/29/16 Today s Agenda Classic thread patterns Other parallel programming patterns More synchronization primitives: RW locks Condition variables Semaphores Message passing
More informationCS 140 Project 4 File Systems Review Session
CS 140 Project 4 File Systems Review Session Prachetaa Due Friday March, 14 Administrivia Course withdrawal deadline today (Feb 28 th ) 5 pm Project 3 due today (Feb 28 th ) Review section for Finals on
More informationConcurrent Programming April 21, 2005
15-213 The course that gives CMU its Zip! Concurrent Programming April 21, 2005 Topics Limitations of iterative servers Process-based concurrent servers Event-based concurrent servers Threads-based concurrent
More informationPROCESS CONCEPTS. Process Concept Relationship to a Program What is a Process? Process Lifecycle Process Management Inter-Process Communication 2.
[03] PROCESSES 1. 1 OUTLINE Process Concept Relationship to a Program What is a Process? Process Lifecycle Creation Termination Blocking Process Management Process Control Blocks Context Switching Threads
More informationI/O Multiplexing. Dec 2009
Windows Socket I/O Multiplexing http://icourse.cuc.edu.cn/networkprogramming/ linwei@cuc.edu.cn Dec 2009 Note You should not assume that an example in this presentation is complete. Items may have been
More informationCS11 Java. Fall Lecture 7
CS11 Java Fall 2006-2007 Lecture 7 Today s Topics All about Java Threads Some Lab 7 tips Java Threading Recap A program can use multiple threads to do several things at once A thread can have local (non-shared)
More informationLast time: introduction. Networks and Operating Systems ( ) Chapter 2: Processes. This time. General OS structure. The kernel is a program!
ADRIAN PERRIG & TORSTEN HOEFLER Networks and Operating Systems (252-0062-00) Chapter 2: Processes Last time: introduction Introduction: Why? February 12, 2016 Roles of the OS Referee Illusionist Glue Structure
More informationFile Systems: Consistency Issues
File Systems: Consistency Issues File systems maintain many data structures Free list/bit vector Directories File headers and inode structures res Data blocks File Systems: Consistency Issues All data
More informationCS370 Operating Systems
CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2016 Lecture 2 Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 2 System I/O System I/O (Chap 13) Central
More information"#' %#& Lecture 7: Organizing Game Clients and Servers. Socket: Network communication endpoints. IP address: IP-level name of a machine
Lecture 7: Organizing Game s and Servers! Socket: communication endpoints Analogous to a file descriptor Apps read/write to/from sockets system handles delivery IP address: IP-level name of a machine One
More informationDr. Rafiq Zakaria Campus. Maulana Azad College of Arts, Science & Commerce, Aurangabad. Department of Computer Science. Academic Year
Dr. Rafiq Zakaria Campus Maulana Azad College of Arts, Science & Commerce, Aurangabad Department of Computer Science Academic Year 2015-16 MCQs on Operating System Sem.-II 1.What is operating system? a)
More informationQualifying exam: operating systems, 1/6/2014
Qualifying exam: operating systems, 1/6/2014 Your name please: Part 1. Fun with forks (a) What is the output generated by this program? In fact the output is not uniquely defined, i.e., it is not always
More informationdnotify's interface to user space is signals. Yes, seriously, signals!
1 of 9 6/18/2006 8:49 PM Kernel Korner Intro to inotify Robert Love Abstract Applications that watch thousands of files for changes, or that need to know when a storage device gets disconnected, need a
More informationVirtual File System. Don Porter CSE 306
Virtual File System Don Porter CSE 306 History Early OSes provided a single file system In general, system was pretty tailored to target hardware In the early 80s, people became interested in supporting
More informationKolmo. Making automation & configuration easier. bert hubert. -
Kolmo Making automation & configuration easier bert hubert https://kolmo.org/ - http://tinyurl.org/kolmopreso @PowerDNS_Bert 128Kbit/s, 500ms latency. Also, Biddinghuizen You can t download the configuration?!?!
More informationCS 431 Introduction to Computer Systems Solutions Mid semester exam 2005
CS 431 Introduction to Computer Systems Solutions Mid semester exam 2005 1. Consider the code below. (8 marks) public class Main { private ThreadA a; private ThreadB b; public Main() { a = new ThreadA();
More informationCS-537: Midterm Exam (Fall 2013) Professor McFlub
CS-537: Midterm Exam (Fall 2013) Professor McFlub Please Read All Questions Carefully! There are fourteen (14) total numbered pages. Please put your NAME (mandatory) on THIS page, and this page only. Name:
More informationDISTRIBUTED SYSTEMS [COMP9243] Lecture 3b: Distributed Shared Memory DISTRIBUTED SHARED MEMORY (DSM) DSM consists of two components:
SHARED ADDRESS SPACE DSM consists of two components: DISTRIBUTED SYSTEMS [COMP9243] ➀ Shared address space ➁ Replication and consistency of memory objects Lecture 3b: Distributed Shared Memory Shared address
More informationCS 3214 Final Exam. To be considerate to your fellow students, if you leave early, do so with the least amount of noise.
CS 3214 This is a closed-book, closed-internet, closed-cell phone and closed-computer exam. However, you may refer to your prepared notes on 1 double-sided page. Your exam should have 11 pages with 4 topics
More informationCS370 Operating Systems
CS370 Operating Systems Colorado State University Yashwant K Malaiya Spring 2018 Lecture 2 Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 2 What is an Operating System? What is
More informationComputer Science 330 Operating Systems Siena College Spring Lab 5: Unix Systems Programming Due: 4:00 PM, Wednesday, February 29, 2012
Computer Science 330 Operating Systems Siena College Spring 2012 Lab 5: Unix Systems Programming Due: 4:00 PM, Wednesday, February 29, 2012 Quote: UNIX system calls, reading about those can be about as
More informationSmartHeap for Multi-Core
SmartHeap for Multi-Core Getting Started and Platform Guide for Linux Version 11.2 SmartHeap and HeapAgent are trademarks of Compuware Corporation. All other trademarks are the property of their respective
More informationNetworks and distributed computing
Networks and distributed computing Hardware reality lots of different manufacturers of NICs network card has a fixed MAC address, e.g. 00:01:03:1C:8A:2E send packet to MAC address (max size 1500 bytes)
More informationCS510 Operating System Foundations. Jonathan Walpole
CS510 Operating System Foundations Jonathan Walpole Course Overview Who am I? Jonathan Walpole Professor at PSU since 2004, OGI 1989 2004 Research Interests: Operating System Design, Parallel and Distributed
More information