System Calls Applie pplica Applica- ■■■■■ tion 1 tion 2 tion n System functions called by applications OS kernel containing TCP/IP protocol software CSIE NTUT TANAN
CSIE, NTUT, TAIWAN 11 System Calls System functions called by applications OS kernel containing TCP/IP protocol software Application 1 Application 2 Application n
Approaches to Communication During installing Os, Os designer must choose the exact set of procedures used to access protocols ° Two approaches New system calls on all conceptual operations Using convention 1O primitives but overload them CSIE NTUT TANAN
CSIE, NTUT, TAIWAN 12 Approaches to Communication • During installing OS, OS designer must choose the exact set of procedures used to access protocols • Two approaches – New system calls on all conceptual operations – Using convention I/O primitives but overload them
Basic lo functions in LInuX Six system functions for I/O(on file or device open close read write Iseek ioctl CSIE NTUT TANAN
CSIE, NTUT, TAIWAN 13 Basic I/O Functions in LINUX Six system functions for I/O (on file or device) – open – close – read – write – lseek – ioctl
Using linux I/o with TCP/IP when adding TCP/P protocols to UNIX system, we extend the conventional 1O facilities the set of file descriptors for applications to use read and write system calls to with new network descriptors Not all network communication fits easily into conventional UNIX open-read-write -close paradigm CSIE NTUT TANAN
CSIE, NTUT, TAIWAN 14 Using LINUX I/O with TCP/IP • when adding TCP/IP protocols to UNIX system, we extend the conventional I/O facilities – the set of file descriptors for applications to use – read and write system calls to with new network descriptors • Not all network communication fits easily into conventional UNIX open-read-write-close paradigm
Graphical view applications user process sockets TCP/UDP IP kernel hardware CSIE NTUT TANAN
CSIE, NTUT, TAIWAN 15 Graphical View applications TCP/UDP IP hardware sockets user process kernel