VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur QUESTION BANK

Similar documents
CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF MCA QUESTION BANK UNIT 1

NETWORK PROGRAMMING AND MANAGEMENT 1 KINGS DEPARTMENT OF INFORMATION TECHNOLOGY QUESTION BANK

LESSON PLAN. Sub. Code & Name : IT2351 & Network Programming and Management Unit : I Branch: IT Year : III Semester: VI.

Contents. Part 1. Introduction and TCP/IP 1. Foreword Preface. xix. I ntroduction 31

UNIT IV- SOCKETS Part A

St. MARTIN S ENGINEERING COLLEGE Dhulapally,Secunderabad DEPARTMENT OF INFORMATION TECHNOLOGY Academic year

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

UNIT I Linux Utilities

Outline. Option Types. Socket Options SWE 545. Socket Options. Out-of-Band Data. Advanced Socket. Many socket options are Boolean flags

UNIT I Linux Utilities and Working with Bash

UNIX Network Programming

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

MARIA COLLEGE OF ENGINEERING AND TECHNOLOGY, ATTOOR DEPARTMENT OF INFORMATION TECHNOLOGY NETWORK PROGRAMMING MANAGEMENT 2 MARKS QUESTIONS & ANSWERS

VALLIAMMAI ENGINEERING COLLEGE

LINUX INTERNALS & NETWORKING Weekend Workshop

IPv4 and ipv6 INTEROPERABILITY

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

Lecture 5 Overview! Last Lecture! This Lecture! Next Lecture! I/O multiplexing! Source: Chapter 6 of Stevens book!

VALLIAMMAI ENGINEERING COLLEGE

VALLIAMMAI ENGINEERING COLLEGE

Memory-Mapped Files. generic interface: vaddr mmap(file descriptor,fileoffset,length) munmap(vaddr,length)

Interprocess Communication Mechanisms

shared storage These mechanisms have already been covered. examples: shared virtual memory message based signals

Chapter 8: I/O functions & socket options

Network Programming. Introduction to Sockets. Dr. Thaier Hayajneh. Process Layer. Network Layer. Berkeley API

Network programming(ii) Lenuta Alboaie

SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR Siddharth Nagar, Narayanavanam Road QUESTION BANK (DESCRIPTIVE) UNIT I OPERATING SYSTEMS

SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR Siddharth Nagar, Narayanavanam Road QUESTION BANK (DESCRIPTIVE)

VALLIAMMAI ENGINEERING COLLEGE

NETWORK PROGRAMMING. Ipv4 and Ipv6 interoperability

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files. Compiler vs.

VALLIAMMAI ENGINEERING COLLEGE

Subject: Operating System (BTCOC403) Class: S.Y.B.Tech. (Computer Engineering)

Noorul Islam College Of Engineering, Kumaracoil MCA Degree Model Examination (October 2007) 5 th Semester MC1642 UNIX Internals 2 mark Questions

CSC209 Review. Yeah! We made it!



VALLIAMMAI ENGINEERING COLLEGE

CL020 - Advanced Linux and UNIX Programming

Problem Set: Processes

Networking Revision. TCP/IP Protocol Stack & OSI reference model. Basic Protocols. TCP/IP Model ANTHONY KAO NETWORKING FINAL EXAM SPRING 2014 REVISION

Introduction! Overview! Signal-driven I/O for Sockets! Two different UDP servers!

Operating Systems. Review ENCE 360

Advanced Programming in the UNIX Environment W. Richard Stevens

Topics for this Week

Server algorithms and their design

DHANALAKSHMI SRINIVASAN COLLEGE OF ENGINEERING AND TECHNOLOGY ACADEMIC YEAR (ODD SEM)

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR


Sockets Sockets Communication domains

Lecture Plan-1. Contents Methodology Time Queries Remarks. Question/ Answers. Discussion. Chalk Board. &Discussion. Discussion 10

Network Implementation

Light & NOS. Dan Li Tsinghua University

Dr. Rafiq Zakaria Campus. Maulana Azad College of Arts, Science & Commerce, Aurangabad. Department of Computer Science. Academic Year

3.1 Introduction. Computers perform operations concurrently

Building blocks for Unix power tools

Sockets and Parallel Computing. CS439: Principles of Computer Systems April 11, 2018

BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE, Pilani Pilani Campus Instruction Division

Linux Driver and Embedded Developer

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

W4118 Operating Systems. Junfeng Yang

VALLIAMMAI ENGINEERING COLLEGE

Institute of Science and Technology 2067

ETSF10 Internet Protocols Network Layer Protocols

Process Concepts. CSC400 - Operating Systems. 3. Process Concepts. J. Sumey

ECE 650 Systems Programming & Engineering. Spring 2018

UNIT I Review Computer Networks and the Internet

CS 450 Operating System Week 4 Lecture Notes

Chapter 7. Local Area Network Communications Protocols

TRANSMISSION CONTROL PROTOCOL. ETI 2506 TELECOMMUNICATION SYSTEMS Monday, 7 November 2016

TCP /IP Fundamentals Mr. Cantu

Faculty of Science and IT Course title. Pre-requisite/corequisite

MC1751 UNIX and Network programming. Short questions and answers

UDP and TCP. Introduction. So far we have studied some data link layer protocols such as PPP which are responsible for getting data

Chapter 9: UDP sockets & address conversion function

Problem Set: Processes

Systems software design NETWORK COMMUNICATIONS & RPC SYSTEMS

UNIT -I PART-A Q.No Question Competence BTL

UNIT 1 TCP/IP PROGRAMMING CONCEPTS


(Refer Slide Time: 1:09)

Guide to Networking Essentials, 6 th Edition. Chapter 5: Network Protocols

CS UDP: User Datagram Protocol, Other Transports, Sockets. congestion worse);

The basic server algorithm. Server algorithms and their design. Problems with the simple server? Servers. overview ofaserver

CptS 360 (System Programming) Unit 17: Network IPC (Sockets)

Interprocess Communication Mechanisms

Chapter 4: Threads. Operating System Concepts. Silberschatz, Galvin and Gagne

csdesign Documentation

VALLIAMMAI ENGINEERING COLLEGE

Introduction to Network. Topics

IP address. Subnetting. Ping command in detail. Threads in Python. Sub process in Python

Overview. Over the next four weeks, we will look at these topics: Building Blocks. Advanced Authentication Issues.

Reading Assignment 4. n Chapter 4 Threads, due 2/7. 1/31/13 CSE325 - Processes 1

Interconnecting Networks with TCP/IP

TCP/IP and the OSI Model

Unit 28 Website Production ASSIGNMENT 1

Outline. CS4254 Computer Network Architecture and Programming. Introduction 2/4. Introduction 1/4. Dr. Ayman A. Abdel-Hamid.

Network+ Guide to Networks 6 th Edition. Chapter 4 Introduction to TCP/IP Protocols

Socket Programming. Sungkyunkwan University. Hyunseung Choo Copyright Networking Laboratory

Transcription:

SRM Nagar, Kattankulathur 603 203 IV SEMESTER MC7404 NETWORK PROGRAMMING Regulation 2013 Academic Year 2017 18 Prepared by Mr. M.Asan Nainar, Assistant Professor/MCA

UNIT I - INTRODUCTION Overview of UNIX OS - Environment of a UNIX process - Process control Process relationships - Signals Interprocess Communication- overview of TCP/IP protocols. PART A Q.No Questions BT Level Competence 1. State the purpose of TCP. 2. What do you mean by PCB? 3. What is a Shell? 4. How to implement message queue? Is UNIX a CUI or GUI? What is the difference 5. between both? 6. State the function of TCP / IP Transport Layer. 7. Construct the memory layout of a typical program. 3 Applying 8. Enumerate four characteristics of a TCP protocol. 9. Compare signals and Interrupts in Unix. 2 Understanding 10. Define the term process. 11. Differentiate between Unix and Windows. 2 Understanding 12. How to create and access a Semaphore? 2 Understanding 13. List out the features of Unix. 14. Design the layered model of TCP / IP protocol. 15. Differentiate between system calls and library functions. 2 Understanding 16. To communicate how many layers are needed in the case of TCP protocol? 17. Name any four Unix commands. 3 Applying 18. Identify the use of fork(). 19. Classify the types of Signals. 3 Applying 20. Summarize Race Conditions. PART - B 1. Construct a neat diagram explain the file system of UNIX. 3 Applying (13) 2. Assess the various UNIX Interprocess communication Mechanisms. (13)

3. 4. (i) Explain in detail about asynchronous software interrupts that notifies the events between processes in Unix environment. (7) (ii) Compare a server handling single client with a server one handling multiple clients. (6) 2 Understanding (i) Explain in detail about tcgetpgrp, tcsetpgrp and tcgetsid functions. (7) (ii)discuss in detail about alarm and pause functions. (6) 5. (i) Describe about the file sharing in Unix operating system? (7) (ii) Discuss about the shared memory. (6) 6. 7. 8. 9. 10. 11. 12. 13. (i) Explain about kill() and raise() functions. (6) (ii) What are the different file types available in Unix? Explain with an example. (7) (i) Explain the Unix system architecture. (6) (ii) Explain the three primary functions of process control along with their variants. (7) With the associated function calls show how Message queue and semaphore is handled in Unix. (13) Write detailed note on TCP/ IP reference Model and its protocol suite. (13) Explain in detail about process and process control in Unix. (13) Briefly discuss about the following: i. Memory Layout of a C program. (5) ii.shared Libraries (4) iii.exit functions with diagram showing the start and termination of a C Program. (4) Describe the following features of Unix: a. Process group (5) b. Sessions (5) c. Signal sets (3) Design the TCP client-server communication with neat TCP state transition diagram. (13) 2 Understanding 3 Applying 1 Remembering 2 Understanding

14. (i) Describe environment variables and related functions in UNIX. (7) (ii) Describe network logins in UNIX with diagram. (6) PART C 1 Compare OSI model and TCP/IP reference Model. (15) 2 Describe in detailed note on TCP Header format and its services. (15) 3 Determine the code for the Pipe system call. Also list the types of pipes, advantages and disadvantages of pipes. (15) 4 Create a C program to print description of the exit status and demonstrate various exit status. (15) UNIT II - ELEMENTARY TCP SOCKETS Introduction to Socket Programming Introduction to Sockets Socket address Structures Byte ordering functions address conversion functions Elementary TCP Sockets socket, connect,bind, listen, accept, read, write, close functions Iterative Server Concurrent Server. PART - A Q.No Questions BT Level Competence 1. Write the function that convert an IPv4 address from a dotted decimal string to its 32 bits network byte ordered binary value. 2. Assess the usage of a Port. 3. Why do we need socket programming? 3 Applying 4. Examine the different types socket used in TCP/IP. 3 Applying 5. Outline how do sockets work. 2 Understanding 6. What is byte ordering function? 7. What is meant by dynamic or private ports? 8. What do you mean by value result arguments? 9. List out various address conversion functions. 10. Give the outline for IPv4 internet socket address structure. 2 Understanding 11. What you think about connect function. 12. Show the syntax of bind function. 3 Applying 13. Outline the syntax of listen function. 2 Understanding 14. List the uses of accept function. 15. Determine the syntax of close function. Distinguish between incomplete and complete connection 16. queue. 2 Understanding 17. Compose the features of Concurrent Server. 18. Write the functions of Iterative Server.

19. Distinguish between the read and write functions. Distinguish between concurrent server and iterative 20. server. PART B Q.N o Questions BT Level Competence 1 Describe the various socket address structures. (13) 2. List and explain the various calls / functions in TCP socket. (13) (i) Explain internet socket address structures IPv4. (7) 3. (ii) Compare TCP and UDP Pseudo headers. (6) (i) Explain in detail about Generic Socket Address structure and 4 IPv6 Socket Address structure. (7) (ii)with an example explain in detail about getsockname and 2 Understanding getpeername. (6) 5. (i) Create a program to determine the byte order of the host. (6) (ii)compose the advantages of using the new generic socket address that is defined in the IPv6 sockets API. (7) 6. Explain and state the address conversion functions. (13) 7. Compare the socket structures of IPV4, IPv6, Unix and datalink. Understanding (13) 2 Examine about the iterative and concurrent server with an 8. example. (13) 3 Applying Write short notes on the following with syntax: (7+6) 9. i. Readn() ii.written() 10. 11. 12. 13. 14. Write short notes on the following with syntax (i) Connect() (6) (ii) Close() (7) How would you have handled the following functions in Unix? Explain. (i)listen() (7) (ii)accept() (6) (i) Distinguish between iterative and concurrent server. (7) (ii) With suitable diagrams explain the socket functions for an Elementary TCP client/server. (6) Examine the need for a concurrent server? Discuss the implementation and testing of a TCP concurrent server with two clients. (13) Discuss the following functions with their syntax: i.socket() (7) ii.bind() (6) 3 Applying 2 Understanding

PART C 1. Explain the timeline diagram for the scenario between a TCP client and server and explain the functions used in thetcp client. (15) 2. Create a C program for to readn and written function, to handle n bytes from a descriptor. (15) 3. Design a coding in C to implement the concurrent server. (15) 4. Explain a C code to demonstrate an iterative server. (15) 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 reboots, Server Shutdown I/O multiplexing I/O Models select function shutdown function TCP echo Server (with multiplexing) poll function TCP echo Client (with Multiplexing) PART - A Q.No Questions BT Level Competence 1 What happens if the server host is shutdown by an 2 Understanding operator while server process is running on that host? 2 Write the syntax and explain the parameters of select Remembering 1 function. 3. Show the TCP state transitions while establishing a TCP. 3 Applying 4. Identify the need for POSIX Signal. 5. What determines the sender window size in TCP? 6 Give the outline when do the servers process crashes. 2 Understanding 7 What is I/O multiplexing? 8 Identify the syntax of poll() function. 9 Distinguish between close() and shutdown() functions. 2 Understanding 10 Show the diagram for blocking I/O model. 3 Applying 11 Write the purpose of select() function. 2 Understanding 12 List the uses of poll function. 13 Show the syntax of shutdown() function. 3 Applying 14 Classify the steps involved in a TCP echo server. 15 Construct the syntax of pselect() function. 16 List out the function s/macro s that operate on fd_set descriptor set. 17 Devise an Asynchronous I/O model.

18 Write brief outline of zombie state of a process. 19 Determine the features of server process and server host. Create the block diagram for simple TCP echo client 20 and server communication. PART - B 1 Examine the following with necessary diagram: i.select() function (7) ii Pselect function (6) Explain the following with necessary diagram: 2 i. Blocking I/O (6) 2 Understanding ii. Non-Blocking I/O (7) 3 4 5 6 7 8 9 10 11 12 13 14 Write a C function for TCP client that handles EOF correctly. (13) Write a C program to implement a TCP echo client and 1 explain the steps involved. (13) Remembering Explain the following concept with suitable example: i. Shutdown function (7) Analyzing 4 ii. netsat program (6) Create a C program for TCP server using poll() function. (13) Write short notes on i. POSIX signal handling (7) ii. Input Output Models (6) Determine the syntax of a. Signal Handling functions with example (7) b. Synchronous I/O Models (6) Illustrate how a SIGCHLD signal handler handles a. wait() system call (6) 3 Applying b. waitpid() system call (7) Compare and contrast between wait() &waitpid() with suitable diagrams. (13) 4 Show the steps involved in a. crashing of server host (7) 3 b. Crashing and rebooting the server (6) Analyzing Applying Distinguish between select() and poll() system calls with Understanding examples. (13) 2 Explain the features of i. I/O Multiplexing (7) 2 Understanding ii. Signal driven I/O (6) Write a C program for TCP server using poll() function. (13)

PART C 1 Create a TCP Echo client and TCP Echo server program in Linux to send and print the received message. (15) 2 Explain and compare the various I/O models with diagram. (15) 3 Recommend a day time cline/server application using TCP sockets (15) Design a data structure that holds the necessary 4 declarations for implementing TCP FSM for Graceful Shutdown. (15) UNIT IV - SOCKET OPTIONS, ELEMENTARY UDP SOCKETS Socket options getsocket and setsocket functions generic socket options IP socketoptions ICMP socket options- TCP socket options Elementary UDP sockets UDP echo Server UDP echo Client Multiplexing TCP and UDP sockets Domain name system gethostbyname function- Ipv6 support in DNS gethostbyadr function getservbyname and getservbyport functions PART A BT Q.No Questions Level Competence 1 Write the various socket options in TCP. 2 Write the syntax of getsockopt and setsockopt functions. 3 State any two ways to notify the error to the process using socket options. 4 Determine the features of AAAA record. 5 Outline about the resource records. 2 Understanding 6 List the use of SO_BROADCAST option. 7 Illustrate the syntax ofrecvfrom() and sendto(). 3 Applying 8 Examine the syntax of getservbyport() function. 9 Show the Nagles algorithm. 3 Applying 10 Classify the types of resource records. 11 Write the uses of SO_KEEPALIVE option. 12 Briefly write about the UDP differ from TCP. Show a block diagram for typical arrangement of clients, 13 resolvers and name 3 Applying 14 Interpret the syntax of gethostbyaddr() function. 2 Understanding 15 Identify getaddrinfo() function with its syntax. 16 Examine how getservbyname() function is used in C? 17 Distinguish between PTR record and MX record. 2 Understanding 18 List out the socket options of ICMP. 19 Identify the syntax of gethostbyname() function. 20 What is meant by Domain Name System? 2 Understanding

PART B 1 Discuss about the socket options available for (i)the stream sockets (7) 2 Understanding (ii) The Datagram sockets (6) 2 Explain generic socket options in detail. (13) Analyze the following functions: 3 i. getsockopt() (6) ii. setsockopt() (7) 4 Create a C program to implement getaddrinfo() function. Evaluating 5 (13) 5 Write short notes on i) Resolvers and Name servers (6) ii) Resource Records (7) 6 7 8 9 10 11 12 i) Describe the applications ofgethostbyaddr() (5) ii) Write any four resource records and its description. (8) Describe the following: i ICMP socket option (7) ii. TCP socket option (6) Explain a mechanism to implement the following functions (i) getservbyname() (7) (ii) getservbyport() (6) (i)explain in detail about IPv4 socket options. (6) (ii)with an example explain in detail about gethostbyname function. Construct C program to implement a server using (7) multiplexing that handles a. TCP Client requests (7) b. UDP Client request (6) Illustrate the implementation of UDP client and server that reverse the given input string. (13) Explain the following socket options. (4+3+3+3) (i) SO_REUSEADDR (ii) SO_ERROR (iii) IP_TOS (iv) IPV6_CHECKSUM 2 Understanding 1 Remembering 3 Applying 3 Applying

SUBJECT (i) Explain the purpose and usage of UDP sockets and 13 their different functions. (7) (ii) Brief the way in which a TCP client server different from UDP client server. (6) 14 (i) Explain the use of IPv6 in DNS. (7) 2 Understanding (ii) How do you test and implement UDP echo server? (6) PART C 1 Enumerate and compose the socket options in IP. (15) 2 With suitable illustrations, explain DNS in detail. (15) 3 Design and develop an echo client/server system using Evaluating 5 UDP sockets. (15) 4 Explain an elaborate note on the SO_LINGER socket option. (15) UNIT V- ADVANCED SOCKETS Ipv4 and Ipv6 interoperability threaded servers thread creation and termination TCP echo server using threads- Mutexes - condition variables raw sockets raw socket creation raw socket output raw socket input- ping program trace route program. PART A Q.No Questions BT Level Competence 1. Compare the format of ICMPv4 echo request and echo Understanding 2 reply message. 2. What are the different system tracing tools are available? 3. Assess the need for network byte ordering. 4. Compare the header format of IPV4 and IPv6. 2 Understanding 5. Define multithreading 6. State the function of trace route program. 7. Find the meaning of a thread. 8. State any two ICMP messages. 9. Device a function for making a thread joinable. 10. Show a function that get ID of a thread. 3 Applying 11. Determine the syntax of detaching a thread. 12. Write any two thread attributes.

13. Examine functions related to mutex with their syntax. 14. Show any two functions related to condition variable. 3 Applying 15. Outline the use of raw socket. 2 Understanding 16. Identify the packets that a process can read with raw socket. 17. Design a socket function to create raw socket. 18. Show the uses of ping program. 2 Understanding 19. What is the purpose of synchronization? 3 Applying 20. How IPv6 Server on dual stack hosts serving both Analyzing 4 IPv4 and IPv6 clients? PART - B i. Creating a basic thread functions in detail. (7) 1 ii How can a thread ensure that it is the only thread 5 Creating executing some critical piece of code? (6) 2 i. Explain the operation of ping program. (7) 4 ii. Compare process and thread. (6) Analyzing Discuss the following 3. (i) Creating POSIX threads (8) 2 Understanding (ii) Process shared by the threads. (5) 4 Describe the need of RAW socket to implement the ping and trace route program. (13) 5 Summarize the Pv4 & IPv6 systems interoperability with neat sketches. (13) 6 Discuss the dual stack host with IPv6 Server that handle both: a. IPv4 Clients (7) b. IPv6 Clients (6) 7 Illustrate the processing of received IPv4 or IPv6 datagram s (by IPv6 Server) depending on type of receiving socket with neat diagram. (13) 8 Describe the processing of IPv6 Client that handles a. IPv 4 Server (7) 1 b. IP v6 Server (6) 9 Explain the following i) Drawback of using child processes to handle the client request. (7) ii) Advantage of using thread instead of child processes. (6) 10 How would you have handled various functions related to threads? Discuss. (13) 2 3 Understanding Applying Remembering 2 Understanding

11 12 13 14 1 2 Write a C program to implement (i). A TCP client that receives echoed string from the server (7) (ii). Compare IPV4 and IPV6. (6) Show the features of (i) Mutexes with related functions. (7) 3 Applying (ii) Condition variables and related functions (6) (i) Explain about Producer Consumer Problem. (7) (ii) Explain the life cycle of a thread with neat diagram. (6) What are threads? What are the advantages of using threads? With suitable examples show how threads can be createdand terminated. (13) PART C Write a C++ program forping that works with both IPv4 and IPv6. Explain. (15) Design a C program to implement trace route command. (15) 3 How to verify TCP echo server using threads?explain. (15) 4 Summarize the steps and rules in the creation, input and 6 output of raw sockets. (15) Creating