Java Byte IPC: Part 6-Summary

Slides:



Advertisements
Similar presentations
Categories of I/O Devices
Advertisements

© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Socket Programming 0.
1 Chapter 5 Threads 2 Contents  Overview  Benefits  User and Kernel Threads  Multithreading Models  Solaris 2 Threads  Java Threads.
28.2 Functionality Application Software Provides Applications supply the high-level services that user access, and determine how users perceive the capabilities.
1 Chapter 4 Threads Threads: Resource ownership and execution.
Client Server Model and Software Design TCP/IP allows a programmer to establish communication between two application and to pass data back and forth.
Fundamentals of Python: From First Programs Through Data Structures
I/O Systems ◦ Operating Systems ◦ CS550. Note:  Based on Operating Systems Concepts by Silberschatz, Galvin, and Gagne  Strongly recommended to read.
Hands On Networking Socket Programming Ram P Rustagi, ISE Dept Abhishek Gupta, ISE Dept Laxmi Kuber, MCA Dept June 28-30, 2012.
NET0183 Networks and Communications Lecture 31 The Socket API 8/25/20091 NET0183 Networks and Communications by Dr Andy Brooks Lecture powerpoints from.
1 Lecture 4: Threads Operating System Fall Contents Overview: Processes & Threads Benefits of Threads Thread State and Operations User Thread.
Dr. John P. Abraham Professor University of Texas Pan American Internet Applications and Network Programming.
OS2014 PROJECT 2 Supplemental Information. Outline Sequence Diagram of Project 2 Kernel Modules Kernel Sockets Work Queues Synchronization.
Processes CSCI 4534 Chapter 4. Introduction Early computer systems allowed one program to be executed at a time –The program had complete control of the.
Events in General. Agenda Post/wait technique I/O multiplexing Asynchronous I/O Signal-driven I/O Database events Publish/subscribe model Local vs. distributed.
Mark Stanovich Operating Systems COP Primitives to Build Distributed Applications send and receive Used to synchronize cooperating processes running.
SPL/2010 Reactor Design Pattern 1. SPL/2010 Overview ● blocking sockets - impact on server scalability. ● non-blocking IO in Java - java.niopackage ●
The Echo Server Problem. Contents  Basic Networking Concepts  The Echo Server Problem.
Lecture 3 Process.
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
Processes and threads.
CSCE 313 Network Socket MP8 DUE: FRI MAY 5, 2017
Operating Systems Review ENCE 360.
Process Management Process Concept Why only the global variables?
Chapter 3: Process Concept
PROCESS MANAGEMENT IN MACH
CS 6560: Operating Systems Design
Do-more Technical Training
Advanced Topics in Concurrency and Reactive Programming: Asynchronous Programming Majeed Kassis.
Operating Systems (CS 340 D)
Chapter 3 Internet Applications and Network Programming
Chapter 2 Processes and Threads Today 2.1 Processes 2.2 Threads
Process Management Presented By Aditya Gupta Assistant Professor
Processes Overview: Process Concept Process Scheduling
Chapter 3: Process Concept
Lecture 21 Concurrency Introduction
Net 323 D: Networks Protocols
Intro to Processes CSSE 332 Operating Systems
Client/Server Example
Client-Server Interaction
Chapter 4: Processes Process Concept Process Scheduling
Lecture 2: Processes Part 1
Threads and Data Sharing
Sarah Diesburg Operating Systems COP 4610
Module 2: Computer-System Structures
Operating Systems Chapter 5: Input/Output Management
Net 323 D: Networks Protocols
Starting TCP Connection – A High Level View
Process Description and Control
Threads Chapter 4.
Operating System Concepts
Threaded Programming in Python
Prof. Leonardo Mostarda University of Camerino
Process Description and Control
Module 2: Computer-System Structures
Server-side Programming CSE 333 Autumn 2018
Server-side Programming CSE 333 Summer 2018
Chapter 3: Processes.
Process Synchronization
Chapter 2 Processes and Threads 2.1 Processes 2.2 Threads
An Introduction to Internetworking
Outline Chapter 2 (cont) Chapter 3: Processes Virtual machines
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Chapter 3: Process Concept
Module 2: Computer-System Structures
Module 2: Computer-System Structures
Processes August 10, 2019 OS:Processes.
Thread per client and Java NIO
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

Java Byte IPC: Part 6-Summary Instructor: Prasun Dewan (FB 150, dewan@unc.edu)

Summary: I/O vs IPC I/O is a producer-consumer problem involving I/O devices and local threads I/O-based IPC a producer-consumer problem involving threads in different processes A process should be able to create independent buffers for different with the processes with which it communicates A process should be able to control whether it communicates with a process started by a different user or on a different OS Should keep the awareness a process has about other processes low A client knows about a server but not vice versa Each service provided by a server represented by a port number known to its clients, which types the connection the clients make

Summary: Accepts and Connects To establish connection of type T, with a server on host H offering a, a client creates a regular port object and then invoke the connect call with H and port number for T, which sends a message to a server listener-port To accept a connections of type T from clients, the server creates a listener-port object associated with the port number for T. To accept a the connect message from a specific client regular port, the server invokes an accept call on the listener-port, which returns a new regular port connected to the client regular port

Summary: Reads and Writes Send data may be scattered or gathered so the reverse has to occur at the other end

Summary: Blocking vs Non Blocking Accept, connect, read, write operations can block or not. Blocking calls result in thread proliferation. Non blocking calls can return status values indicating if they executed. To prevent polling it should be possible to wait for multiple channel operations to be executable and to know which ones are executable when unblocked and to change this set dynamically

Summary: NIO Manager Provides a single service-independent thread for waiting and setting waiting parameters Services queues of command objects specifying application-specific functionality. Initiate methods of command objects called when they are dequeued and execute methods when associated operations executable Predefined command objects make buffering, scatter/gather and threading decisions about inform listeners Predefined command objects designed to reduce copying and thread switches

Command Objects (From Part that Did not Get Recorded) How to create a single blocking, selecting, thread and make sure only it changes interest operations and checks ready operations to reduce concurrency conflicts and increase code resuability, while allowing application-specific interest in operations and application-specific post processing of operations ? Generic selecting thread processes application-provide s operation-specific command objects enqueued by other application-specific threads executes initiate() methods of dequeued command objects and execute() methods of command objects associated with ready operations

Listeners (From Part that Did not Get Recorded) A command object associated with an operation must do certain tasks – execute the operation when it is ready, register interest in that operation – how to prevent application programmers from performing these tasks while allowing application-specific post operation processing? Provide predefined command objects (selected by factories) that allow application-specific customization through constructor parameters and post-operation listeners