+ All Categories
Home > Technology > Networking chapter IV

Networking chapter IV

Date post: 18-May-2015
Category:
Upload: jayakumar-balasubramanian
View: 887 times
Download: 0 times
Share this document with a friend
Description:
Networking chapter IV covers certain advanced sockets aspects like fock() and select()
Popular Tags:
17
Compiled by: Jayakumar Balasubramanian Web: http://www.jwritings.com Email: [email protected]
Transcript
Page 1: Networking chapter IV

Compiled by: Jayakumar BalasubramanianWeb: http://www.jwritings.com

Email: [email protected]

Page 2: Networking chapter IV

Introduction Basics of Embedded Systems Program segments The ‘fork()’ system call Concurrent and Iterative servers I/O multiplexing methods Programming using select

Page 3: Networking chapter IV

Basics of Embedded SystemsDevelopment system TargetCross compilersDevelopment processDevelopment challenges:

Less resources Inter process communication issues Timing problems

Process vs. Threads

Page 4: Networking chapter IV

Servers and connections Servers:

Iterative servers Concurrent servers

Connections Control connections Data connections

Page 5: Networking chapter IV

Apartment vs. Bungalow

Page 6: Networking chapter IV

Process Vs Threads

Page 7: Networking chapter IV

The fork()

Page 8: Networking chapter IV

Concurrent servers

Page 9: Networking chapter IV

Concurrent servers

Page 10: Networking chapter IV

I/O MultiplexingBlocking I/ONon-blocking I/OI/O multiplexing (Select)Asynchronous I/O Signal driven I/O

Page 11: Networking chapter IV

Blocking I/O

Page 12: Networking chapter IV

Non-blocking I/O

Page 13: Networking chapter IV

I/O Multiplexing

Page 14: Networking chapter IV

Select() : The I/O Multiplexer

Page 15: Networking chapter IV

What does it do?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 occurs or when a specified amount of time has passed

Page 16: Networking chapter IV

The syntax for ‘select()’ int numfds;int numfds; struct timeval timeout; struct timeval timeout; fd_set rfds; fd_set rfds; fd_set wfds; fd_set wfds; fd_set efds; fd_set efds; s=select (numfds, &rfds, &wfds, &exfds, &timeout); s=select (numfds, &rfds, &wfds, &exfds, &timeout);

Page 17: Networking chapter IV

Web : http://www.jwritings.comEmail: [email protected]


Recommended