networking chapter iv
DESCRIPTION
Networking chapter IV covers certain advanced sockets aspects like fock() and select()TRANSCRIPT
Compiled by: Jayakumar BalasubramanianWeb: http://www.jwritings.com
Email: [email protected]
Introduction Basics of Embedded Systems Program segments The ‘fork()’ system call Concurrent and Iterative servers I/O multiplexing methods Programming using select
Basics of Embedded SystemsDevelopment system TargetCross compilersDevelopment processDevelopment challenges:
Less resources Inter process communication issues Timing problems
Process vs. Threads
Servers and connections Servers:
Iterative servers Concurrent servers
Connections Control connections Data connections
Apartment vs. Bungalow
Process Vs Threads
The fork()
Concurrent servers
Concurrent servers
I/O MultiplexingBlocking I/ONon-blocking I/OI/O multiplexing (Select)Asynchronous I/O Signal driven I/O
Blocking I/O
Non-blocking I/O
I/O Multiplexing
Select() : The I/O Multiplexer
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
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);
Web : http://www.jwritings.comEmail: [email protected]