1 / 6

Linux API Part 2

Linux API Part 2. Dr. Michael L. Collard www.sdml.info/collard www.sdml.info/collard/linux collard@cs.kent.edu. Threading: pthreads. POSIX threads NPTL (Native Posix Thread Library) Red Hat “Won” over NGPT (Next Generation Posix Threads) RHEL 3, Linux Kernel 2.6, GNU C Library

xaria
Download Presentation

Linux API Part 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Linux API Part 2 Dr. Michael L. Collard www.sdml.info/collard www.sdml.info/collard/linux collard@cs.kent.edu

  2. Threading: pthreads • POSIX threads • NPTL (Native Posix Thread Library) • Red Hat • “Won” over NGPT (Next Generation Posix Threads) • RHEL 3, Linux Kernel 2.6, GNU C Library • Performance: Create 100,000 threads on IA-32 • NPTL off: 15 minutes • NPTL on: 2 seconds

  3. Zero-Copy • Use read/write as before • Multiple copies in/out of kernel mode • mmap – memory map input file • Eliminates copy from input file • sendfile – copies data in the kernel • Limited to socket file descriptor for output

  4. read/write read(infd, buf, len) write(outfd, buf, len) “Zero Copy I: User-Mode Perspective” by Dragan Stancevic http://www.linuxjournal.com/article/6345

  5. mmap/write buf = mmap(infd, len) write(outfd, buf, len) “Zero Copy I: User-Mode Perspective” by Dragan Stancevic http://www.linuxjournal.com/article/6345

  6. sendfile sendfile(infd, outfd); “Zero Copy I: User-Mode Perspective” by Dragan Stancevic http://www.linuxjournal.com/article/6345

More Related