BIRLA
INSTITUTE OF TECHNOLOGY & SCIENCE, PILANI
WORK
INTEGRATED LEARNING PROGRAMMES
Digital
Learning
Part A: Content Design
Course Title
|
Network Programming
|
Course No(s)
|
IS ZC462 / CSI ZC462
|
Credit Units
|
3
|
Credit Model
|
|
Course Author
|
Indrajit Banerjee
|
Version No
|
0.1
|
Course Objectives
No
|
Course Objective
|
CO1
|
Systematically introduce the programming
aspects so that student can make best use of underlying operating system
capabilities to achieve end-to-end network communication.
|
CO2
|
Introduce Network API in Unix Systems
and prepare students to design and develop network-aware applications.
|
CO3
|
Study design and implementation
aspects of various approaches to client and server design and prepare
students to design and develop robust and scalable client-server systems..
|
Teaching methodology
The teaching methodology to be used are:
a) Lectures
b) Lab Exercises
Text
Book(s)
T1
|
Stevens, R.W., “Unix Network Programming, Vol-I Networking APIS :
Sockets and XTI”, Prentice- Hall of India, 3rd Edition, 2004
|
T2
|
|
Reference
Book(s) & other resources
R1
|
The Linux Programming Interface: Linux and UNIX System
Programming Handbook by Michael
Kerrisk, No Starch Press © 2010
(http://library.books24x7.com/toc.aspx?bookid=41558)
|
R2
|
|
R3
|
|
R4
|
|
R5
|
|
Modular Content Structure
·
Overview of Linux/Unix System API
1.1 Functions of Linux Kernel
1.2 Introduction to System Call Interface
1.3 File I/O & I/O Buffering
1.4 Process Management - process creation, termination, execution,
child monitoring
1.5 Signals - generation, setting disposition, signal blocking, real-time
signals
1.6 File Permissions, Process Credentials
1.7 Process Groups, Sessions and Job Control
1.8 Daemons
1.9 Introduction to Pthreads - creation, termination, and
synchronization issues
·
Inter Process Communication within OS
2.1 Pipe
2.2 FIFO
2.3 System V IPC - System v Message Queues, Semaphores, Shared
Memory
2.4 POSIX IPC - POSIX Message Queues, semaphores, shared memory
2.5 Memory Mapping
·
Network Process Communication
3.1 Overview of Transport Layer (TCP, UDP)
3.2 Socket Programming - Sockets API
3.3 Socket Programming - Implement TCP Client & Server
3.4 Socket Programming - Implement UDP Client & Server
3.5 Socket Programming - Building reliable UDP applications
3.6 Socket Programming - Domain Name Conversion
·
Network Process Communication - Advanced
·
Advanced I/O Functions - send(),
recv(), readv(), wrutev(), sendmsg(), recvmsg(), ancillary data
·
Unix Domain Sockets -
alternative to TCP/IP for within host process communication.
·
Raw Sockets - bypassing
transport layer and access datagrams of select protocols directly at IP layer;
design and implement ping and traceroute applications
·
Datalink access - access all
incoming and outgoing frames at datalink layer. Models used in different UNIX
operating Systems; libpcap API; UDP checksum detection application.
·
Broadcast communication within
subnet
·
Multicast communication
within LAN and WAN
·
Client-server
inter-operability issues in the context of IPv4-IPv6
·
I/O Models
5.1 Overview of Unix I/O Models - two phases of network I/O
operations and variations
5.2 I/O Multiplexing - select(), poll(), epoll()
5.3 Non-blocking I/O - non-blocking I/O operations, non-blocking
connect()
5.4 Signal-driven I/O - SIGIO, Linux real time signals
5.5 Asynchronous I/O
·
Client-Server Design
6.1 Client design - a comparison of stop & wait, batch-mode,
process-based, thread-based, select() based, non-blocking I/O based client
designs
6.2 Server design - iterative, concurrent, connectionless,
connect-oriented models
6.3 Server design - connectionless concurrent models; UDP server
concurrency
6.4 Server design - process-based models - pre-forking; pre-threading;
performance comparison
6.5 Even-driven models - Introduction; Level-triggered notifications;
Edge-triggered notifications.
6.6 Combining I/O multiplexing with Non-blocking I/O model
6.7 Inetd super server, Syslog daemon
·
Writing Secure Programs
7.1 Signals and race conditions - methods to avoid signal race
conditions.
7.2 Buffer-overflows - attacks, and precautions.
7.3 Other common practices
Learning Outcomes:
No
|
Learning Outcomes
|
LO1
|
Student should be clear about the approach to design
and implement network-aware applications. For given requirement, student
should be able to make design choices among various approaches to network
communication.
|
LO2
|
Student should gain knowledge about API offered by
Unix-like systems to implement network applications.
|
LO3
|
Student should gain knowledge about various approaches
to client and server design and should be able to make right choice for a
given context.
|
Experiential learning components
1. Lab work:
a. Lab Infrastructure Needed: Ubuntu
operating sysytem; Free tools such as gcc compiler, gdb debugger, make tool.
b. Number of Lab sessions: 8
2. Work integration:
Additional documentation
1. Types of assessments:
EC1: Assignment / Quiz
EC2: Mide-sem examination (closed book)
EC3: Comprehensive examination (open book)
Part B: Course Handout
Academic Term
|
First Semester 2017-18
|
Course Title
|
Network Programming
|
Course No
|
IS ZC462 / CSI ZC462
|
Lead Instructor
|
Indrajeet Banerjee
|
Contact Hour
|
List
of Topic Title
(from
content structure in Part A)
|
Topic #
(from content structure in Part A)
|
Text/Ref
Book/external resource
|
1
|
Overview of Linux/Unix System API
·
Functions of Linux Kernel
·
Introduction to System Call
Interface
|
1.1, 1.2
|
R1: Ch1 & Ch2
|
2
|
Overview of Linux/Unix System API
·
File I/O & I/O
Buffering
·
Process Management - process
environment, process creation
|
1.3, 1.4
|
R1: Ch 4, Ch5, Ch6, Ch24
|
3
|
Overview of Linux/Unix System API
·
Process Management - process
termination, execution, child monitoring
·
Signals - generation,
setting disposition, signal blocking
|
1.4, 1.5
|
R1: Ch 25, Ch26, Ch27
R1: Ch20
|
4
|
Overview of Linux/Unix System API
·
Signals - real time signals
·
File Permissions, Process
Credentials
·
Process Groups, Sessions
and Job Control
·
Daemons
|
1.6-1.8
|
R1: Ch22.8
R1: Ch9
R1: Ch34, Ch37
|
5
|
Overview of Linux/Unix System API
·
Introduction to Pthreads -
creation, termination, and synchronization issues
|
1.9
|
T1: Ch29/ R1: Ch29, Ch30
|
6
|
Inter Process Communication within OS
·
Need for IPC
·
Pipe & FIFO
|
2.1-2.2
|
R1: Ch44
|
7
|
Inter Process Communication within OS
·
Overview of System V IPC
·
System V Message Queues
|
2.3
|
R1: Ch45-Ch47
|
8
|
Inter Process Communication within OS
·
System V Semaphores
·
System V Shared Memory
·
Memory mapping
|
2.3, 2.5
|
R1: Ch47- Ch49
|
9
|
Inter Process Communication within OS
·
Overview of POSIX IPC
|
2.4
|
R1: Ch51
|
10
|
Network Process Communication
·
Review of Transport Layer
Functionalities (TCP, UDP)
·
Sockets
|
3.1-3.2
|
T1: Ch2
|
11
|
Network Process Communication
·
Sockets API
·
TCP client & server
implementation
|
3.2-3.3
|
T1: Ch3 - Ch5
|
12
|
Network Process Communication
·
Implement UDP Client &
Server
|
3.4
|
T1: Ch7
|
13
|
Network Process Communication
·
Building reliable UDP
applications
·
Domain Name Conversion
|
3.5-3.6
|
T1: Ch22
|
14
|
Network Process Communication
·
Domain Name Conversion
Advanced Network Process Communication
·
Advanced I/O Functions -
send(), recv(), readv(), wrutev(), sendmsg(), recvmsg(), ancillary data
|
3.6, 4.1
|
T1: Ch11, Ch14
|
15
|
Mid-sem review session
|
|
|
16
|
Mid-sem review session
|
|
|
17
|
Advanced Network Process Communication
·
Unix Domain Sockets -
socket creation, datagram, stream socket based client and server.
·
Passing file descriptors
and credentials
|
4.2
|
T1: Ch15
|
18
|
Advanced Network Process Communication
·
Raw Sockets - Introduction,
ping implementation
|
4.3
|
T1: Ch28
|
19
|
Advanced Network Process Communication
·
Raw Sockets traceroute
implementation
|
4.3
|
T1: Ch28
|
20
|
Advanced Network Process Communication
·
Datalink access - access
all incoming and outgoing frames at datalink layer. Models used in different
UNIX operating Systems; libpcap API; UDP checksum detection application
|
4.4
|
T1: Ch29
|
21
|
Advanced Network Process Communication
·
Broadcast communication
within subnet
·
Multicast communication
within LAN and WAN
|
4.5, 4.6
|
T1: Ch20, Ch21
|
22
|
Advanced Network Process Communication
·
Client-server
inter-operability issues in the context of IPv4-IPv6
|
4.7
|
T1: Ch12
|
23
|
I/O Models
·
Overview of Unix I/O Models
·
I/O Multiplexing - select()
·
select() based
stop-and-wait client
·
select() based batch mode
client
·
select-based TCP server
|
5.1, 5.2
|
T1: Ch6
|
24
|
I/O Models
·
Introduction of poll(); poll()
based TCP server
·
Introduction of epoll(); epoll()
based TCP server
|
5.2
|
T1: Ch6, R1: Ch63.4
|
25
|
I/O Models
·
Non-blocking I/O -
non-blocking mode of read(), write() operations
·
process-based batch mode
client
·
thread-based batch mode
client
·
comparison of client
designs
|
5.3, 6.1
|
T1: Ch16
|
26
|
I/O Models
·
Non-blocking I/O:
non-blocking connect()
·
web client based on
non-blocking connect()
·
web client based on threads
·
Performance comparison of
web client designs
·
Signal-driven I/O - Client
using SIGIO, TCP server using Linux real time signals
·
Asynchronous I/O
|
5.3-5.5, 6.1
|
T1: Ch16, R1: 63.3
|
27
|
Client-Server Design
·
Server design - iterative,
concurrent, connectionless, connect-oriented models
·
Server design -
connectionless concurrent models;
·
UDP server concurrency
·
Server design - process-based
models - pre-forking; pre-threading;
·
performance comparison
|
6.2-6.4
|
T1: Ch30, T1: Ch22.7
|
28
|
Client-Server Design
·
Even-driven models -
Introduction; Level-triggered notifications; Edge-triggered notifications.
·
Combining I/O multiplexing
with Non-blocking I/O model
|
6.5, 6.6
|
R1: 63.1
Class Notes / Slides
|
29
|
Client-Server Design
·
Inetd super server, Syslog
daemon
Writing Secure Programs
·
Signals and race conditions
- methods to avoid signal race conditions.
|
6.7, 7.1
|
T1: Ch13.5, T1:
Ch13.2
Class Notes / Slides
|
30
|
Writing Secure Programs
·
Buffer-overflows - attacks,
and precautions.
·
Other common practices
|
7.2-7.3
|
Class Notes / Slides
|
31
|
Review Session
|
|
|
32
|
Review Session
|
|
|
Detailed Plan for Lab
work/Design work
Lab
No
|
Lab
Objective
|
Lab
Sheet Access URL
|
Content
Reference
|
1
|
Processes, memory layout, environment
variables, wait(), waitpid()
|
TBD
|
|
2
|
setjmp, zombie, exec, and signals
|
TBD
|
|
3
|
Signals & Pipes
|
TBD
|
|
4
|
FIFOs, MQs, Semaphores
|
TBD
|
|
5
|
Shared memory, mmap(),TCP sockets
|
TBD
|
|
6
|
TCP webserver, UDP sockets, UDS, DNS
API
|
TBD
|
|
7
|
IO Multiplexing, Pthreads
|
TBD
|
|
8
|
Selct-based Server, Signal driven IO,
epoll
|
TBD
|
|
Work integration: Detailed plan
No
|
Activity description
|
1
|
|
Project work: None
Evaluation Scheme:
Legend: EC = Evaluation Component; AN
= After Noon Session; FN = Fore Noon Session
No
|
Name
|
Type
|
Duration
|
Weight
|
Day,
Date, Session, Time
|
EC-1
|
Quiz-I/ Assignment-I
|
Online
|
-
|
5%
|
August
26 to September 4, 2017
|
|
Quiz-II
|
Online
|
-
|
5%
|
September
26 to October 4, 2017
|
|
Lab
|
Online
|
-
|
10%
|
October
20 to 30, 2017
|
EC-2
|
Mid-Semester
Test
|
Closed
Book
|
2 hours
|
30%
|
24/09/2017
(AN) 2 PM TO 4 PM
|
EC-3
|
Comprehensive
Exam
|
Open Book
|
3 hours
|
50%
|
05/11/2017
(AN) 2 PM TO 5 PM
|
Syllabus for Mid-Semester Test (Closed Book): Topics in Contact Hours. 1 to 14
Syllabus for Comprehensive Exam (Open Book): All topics
Important links and
information:
Elearn portal: https://elearn.bits-pilani.ac.in
Students are expected to visit the
Elearn portal on a regular basis and stay up to date with the latest
announcements and deadlines.
Contact sessions:
Students should attend the online lectures as per the schedule provided on the
Elearn portal.
Evaluation Guidelines:
1.
EC-1 consists of either two
Assignments or three Quizzes. Students will attempt them through the course pages
on the Elearn portal. Announcements will be made on the portal, in a timely
manner.
2.
For Closed Book tests: No books or
reference material of any kind will be permitted.
3.
For Open Book exams: Use of books and
any printed / written reference material (filed or bound) is permitted.
However, loose sheets of paper will not be allowed. Use of calculators is
permitted in all exams. Laptops/Mobiles of any kind are not allowed. Exchange
of any material is not allowed.
4.
If a student is unable to appear for
the Regular Test/Exam due to genuine exigencies, the student should follow the
procedure to apply for the Make-Up Test/Exam which will be made available on
the Elearn portal. The Make-Up Test/Exam will be conducted only at selected
exam centres on the dates to be announced later.
It shall be the responsibility of the
individual student to be regular in maintaining the self study schedule as
given in the course handout, attend the online lectures, and take all the
prescribed evaluation components such as Assignment/Quiz, Mid-Semester Test and
Comprehensive Exam according to the evaluation scheme provided in the handout.
No comments:
Post a Comment