1 Networking through Linux Partha Sarathi Dasgupta MIS Group Indian Institute of Management Calcutta.

Slides:



Advertisements
Similar presentations
Chapter 12: File System Implementation
Advertisements

Categories of I/O Devices
Chapter 4 : File Systems What is a file system?
Chapter 8, Part I Graph Algorithms.
Chapter 10: File-System Interface
File Management Chapter 12. File Management A file is a named entity used to save results from a program or provide data to a program. Access control.
Chapter 10: File-System Interface
File System Interface CSCI 444/544 Operating Systems Fall 2008.
Dr. Kalpakis CMSC 421, Operating Systems. Fall File-System Interface.
C++ Programming: Program Design Including Data Structures, Third Edition Chapter 21: Graphs.
Day 27 File System. UNIX File Management Types of files Ordinary – stream of bytes Directory – list of names plus pointers to attributes of the entry.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 17 Introduction to the Application.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition File-System Interface.
6/24/2015B.RamamurthyPage 1 File System B. Ramamurthy.
1 File Management in Representative Operating Systems.
1 File Management Chapter File Management File management system consists of system utility programs that run as privileged applications Input to.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Application Layer PART VI.
File Management Chapter 12.
7/15/2015B.RamamurthyPage 1 File System B. Ramamurthy.
I NTRODUCTION OF S OCKET P ROGRAMMING L.Aseel AlTurki King Saud University.
Chapter 26 Client Server Interaction Communication across a computer network requires a pair of application programs to cooperate. One application on one.
Process-to-Process Delivery:
Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Silberschatz, Galvin and Gagne ©2007 Chapter 10: File-System Interface.
Chapter 5 Part 2 Secondary Storage Mgt. File Mgt. in Popular OSs
File Management Chapter 12. File Management File management system is considered part of the operating system Input to applications is by means of a file.
Chapter 17 Networking Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William Stallings.
Chapter 9 – Graphs A graph G=(V,E) – vertices and edges
Chapter 17 Domain Name System
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
Operating System Concepts and Techniques Lecture 17
Chapter 10: File-System Interface Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 Chapter 10: File-System.
File Systems CSCI What is a file? A file is information that is stored on disks or other external media.
Dr. John P. Abraham Professor University of Texas Pan American Internet Applications and Network Programming.
Chapter 2 Applications and Layered Architectures Sockets.
The Socket Interface Chapter 21. Application Program Interface (API) Interface used between application programs and TCP/IP protocols Interface used between.
1 Kyung Hee University Chapter 18 Domain Name System.
File Management Chapter 12. File Management File management system is considered part of the operating system Input to applications is by means of a file.
CE Operating Systems Lecture 13 Linux/Unix interprocess communication.
Computer Science Lecture 19, page 1 CS677: Distributed OS Last Class: Fault tolerance Reliable communication –One-one communication –One-many communication.
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.
Chapter 16 File Management The Architecture of Computer Hardware and Systems Software: An Information Technology Approach 3rd Edition, Irv Englander John.
The Client-Server Model And the Socket API. Client-Server (1) The datagram service does not require cooperation between the peer applications but such.
Lecture 10 Page 1 CS 111 Summer 2013 File Systems Control Structures A file is a named collection of information Primary roles of file system: – To store.
14.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 10 & 11: File-System Interface and Implementation.
Graphs Upon completion you will be able to:
Access Methods File store information When it is used it is accessed & read into memory Some systems provide only one access method IBM support many access.
Chapter 20: Graphs. Objectives In this chapter, you will: – Learn about graphs – Become familiar with the basic terminology of graph theory – Discover.
File Management Chapter File Management File management system consists of system utility programs that run as privileged applications Input to.
1 Network Communications A Brief Introduction. 2 Network Communications.
Computer Science Lecture 19, page 1 CS677: Distributed OS Last Class: Fault tolerance Reliable communication –One-one communication –One-many communication.
SVBIT SUBJECT:- Operating System TOPICS:- File Management
CSE Operating System Principles File Systems.
COMP 3500 Introduction to Operating Systems Directory Structures Block Management Dr. Xiao Qin Auburn University
File System Implementation
Chapter 3: Process Concept
Data Structure Interview Question and Answers
Chapter 11: File-System Interface
Day 27 File System.
File System Structure How do I organize a disk into a file system?
CSI 400/500 Operating Systems Spring 2009
Subject Name: Operating Systems Subject Code:10CS53
File Sharing Sharing of files on multi-user systems is desirable
File System B. Ramamurthy B.Ramamurthy 11/27/2018.
Graphs Chapter 11 Objectives Upon completion you will be able to:
Directory Structure A collection of nodes containing information about all files Directory Files F 1 F 2 F 3 F 4 F n Both the directory structure and the.
Chapter 10: File-System Interface
File-System Interface
Chapter 16 File Management
Important Problem Types and Fundamental Data Structures
Lecture 4: File-System Interface
Presentation transcript:

1 Networking through Linux Partha Sarathi Dasgupta MIS Group Indian Institute of Management Calcutta

2 Outline of the talk Some network related data structures Networking in Linux

3 What is a graph? What is a tree?

4 A graph G is a pair of two sets (V, E) V = a finite set of vertices in G. E = a binary relation on V, or an unordered pair of vertices. Graphs What is the degree of vertex 4? Are all vertices reachable from a given vertex? What is a multi-graph? What is a hyper-graph?

5 Let G = (V, E) be an undirected graph. Any one of the following statements define a tree. G is a tree. Any two vertices in G are connected by a simple path. G is connected, but if any edge is removed from E, the resulting graph is disconnected. G is connected, and |E| = |V| - 1. G is acyclic, and |E| = |V| - 1. G is acyclic but if any edge is added to E, the resulting graph contains a cycle. Trees

6 Binary tree T is a structured tree defined on a finite set of nodes that either: contains no nodes, or is comprised of three disjoint sets of nodes: a root node, a binary tree called its left sub-tree, and a binary tree called its right subtree. Examples? Binary trees

7 What is Binary search?

8 Solves the single-source shortest-path problem on a weighted, directed graph G = (V, E) where all edge weights are non-negative. Shortest Path: Dijsktra’s algorithm 0 α α α α 10 5 s uv w z Find shortest-path from s to v

9 Shortest Path 0 α α α α 10 5 s uv w z Data structure: d[v] for v in V, a variable D. 2.Initialize d[v] to infinity. 3.Find immediate successors of s, and set d[] for all successors. 4.Select the successor of minimum d[] value. 5.Continue the same for the next set of successors, until you reach v. 6

10 Minimum Spanning Tree

11 UNIX volume structure Boot block: contains code required to boot the operating system Superblock: Contains attributes and information about the file system, such as partition size and inode table size Inode table: The collection of inodes for each file Data blocks: Storage space available for data files and subdirectories

12 File allocation File allocation done on a block basis Allocation is dynamic An indexed method is used to keep track of each file, with part of index stored in the inode Inode includes 39 bytes of address information organized as thirteen 3-byte addresses or pointers First 10 addresses points to the first 10 data blocks of the file what if the file is longer than 10 blocks?

13 File allocation Eleventh address in the inode points to a block on disk that contains the next portion of the index (1 st level of indirection) If the file is longer, twelfth address points to a double indirect block. This block contains a list of addresses of additional single indirect blocks. Each of the single indirect blocks, in turn, contains points, contains pointers to file blocks. if the file is still longer?

14 File capacity Direct 10 blocks Single indirect256 blocks Double indirect256 x 256 blocks Triple indirect256 x 256 x 256 blocks Maximum file size = 16 G (block size = 1 k)

15 Advantages of this file system? 1.The inode is of fixed size and relatively small and hence may be kept in main memory for longer time. 2.Smaller files may be accessed may be accessed with little or no indirection, reducing processing and disk access time. 3.Theoretical maximum size of a file is large enough.

16 Linux Virtual File System Linux includes a versatile and powerful handling facility, designed to support a wide variety of file management systems and file structures VFS presents a single, uniform file system interface to user processes. VFS defines a common fileodel that is capable of representing any file system’s general feature and behaviour User process Linux VFS System calls using VFS user interface Mapping function to file system X VFS System callsSystem calls using file system X interface File system X Disk I/O calls Files on secondary storage maintained by file system X

17 Client-Server computing

18 Sockets a socket is an endpoint in a communication concept of sockets and socket programming developed in 1980s in Unix a socket enables communication between a client and server process may be either connection-oriented or connectionless a client socket in one computer uses an address to call a server socket on another computer. computers with server sockets keep a UDP or TCP port open, ready for unscheduled calls. client determines the socket identification of the desired server by finding it in a DNS database. Once a connection is made, the server switches the dialogue to different port. Why? TELNET and rlogin make use of sockets.

19 Sockets Sockets can be constructed from within a program. Port value identifies the respective applications of the two TCP entities. Port value + IP address forms a socket (unique in the Internet). An application might have multiple socket addresses, one for each port into the application. socket() call returns an integer result that identifies this socket.

20 Socket connection server side of a connection setup requires two steps a server application issues a listen(), indicating the given socket is ready to accept incoming connections. Each incoming connection is placed in this queue until a matching accept() is issued by the server side. accept() call removes one entry from the queue. if there is a waiting call, then accept() returns a new fd for the connection. This creates a new socket which has the port number and IP address of the remote party, the IP address of this system, and a new port number. A new socket with a new port number is assigned to allow the local application to create new requests. An application may thus have a multiple connections active at any time. client application issues a connect() that specifies both local socket and a remote socket.