linux api part 2
Download
Skip this Video
Download Presentation
Linux API Part 2

Loading in 2 Seconds...

play fullscreen
1 / 6

Linux API Part 2 - PowerPoint PPT Presentation


  • 191 Views
  • Uploaded on

Linux API Part 2. Dr. Michael L. Collard www.sdml.info/collard www.sdml.info/collard/linux [email protected] 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

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Linux API Part 2' - xaria


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
linux api part 2

Linux API Part 2

Dr. Michael L. Collard

www.sdml.info/collard

www.sdml.info/collard/linux

[email protected]

threading pthreads
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
zero copy
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
read write
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

mmap write
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

sendfile
sendfile

sendfile(infd, outfd);

“Zero Copy I: User-Mode Perspective” by Dragan Stancevic http://www.linuxjournal.com/article/6345

ad