<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-11680311</id><updated>2011-12-14T21:52:11.349-05:00</updated><title type='text'>OS Kernel Hacks</title><subtitle type='html'>Computer operating system design and implementations, machine virtualization, network protocol stack implementation, and of course distributed systems, clusters, grid computing, and so on.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://advancedkernel.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://advancedkernel.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Pei Zheng</name><uri>http://www.blogger.com/profile/07201545645519471414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-11680311.post-112953261091982306</id><published>2005-10-17T03:03:00.000-04:00</published><updated>2005-10-17T03:03:30.943-04:00</updated><title type='text'>A Comparison of Solaris, Linux, and FreeBSD Kernels at OpenSolaris.org</title><content type='html'>The article at OpenSolaris.com not only discusses three major kernels: solaris, linux, and freebsd, but also shows a list of pointers to resources of these systems. &lt;br /&gt;&lt;br /&gt;Worth a read!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11680311-112953261091982306?l=advancedkernel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.opensolaris.org/os/article/2005-10-14_a_comparison_of_solaris__linux__and_freebsd_kernels/' title='A Comparison of Solaris, Linux, and FreeBSD Kernels at OpenSolaris.org'/><link rel='replies' type='application/atom+xml' href='http://advancedkernel.blogspot.com/feeds/112953261091982306/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11680311&amp;postID=112953261091982306' title='31 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/112953261091982306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/112953261091982306'/><link rel='alternate' type='text/html' href='http://advancedkernel.blogspot.com/2005/10/comparison-of-solaris-linux-and.html' title='A Comparison of Solaris, Linux, and FreeBSD Kernels at OpenSolaris.org'/><author><name>Pei Zheng</name><uri>http://www.blogger.com/profile/07201545645519471414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>31</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11680311.post-112135220609016645</id><published>2005-07-14T10:38:00.000-04:00</published><updated>2005-07-14T10:43:26.096-04:00</updated><title type='text'>Windows 2003 TCP/IP Implementation Details</title><content type='html'>While browsing the &lt;a href="http://msdnaa.net/"&gt;MSDNAA website&lt;/a&gt;, I came across this 116-page word document of &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=06c60bfe-4d37-4f50-8587-8b68d32fa6ee&amp;amp;DisplayLang=en"&gt;Windows 2003 TCP/IP implementation details&lt;/a&gt;. I think this is by far the most detailed explanation of Windows TCP/IP - you might find a chapter of windows networking in the "Microsoft Windows Internal" book by Mark Russinovich and David Solomon, but it is very high-level and does not provide this much of details.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11680311-112135220609016645?l=advancedkernel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.microsoft.com/downloads/details.aspx?FamilyID=06c60bfe-4d37-4f50-8587-8b68d32fa6ee&amp;DisplayLang=en' title='Windows 2003 TCP/IP Implementation Details'/><link rel='replies' type='application/atom+xml' href='http://advancedkernel.blogspot.com/feeds/112135220609016645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11680311&amp;postID=112135220609016645' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/112135220609016645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/112135220609016645'/><link rel='alternate' type='text/html' href='http://advancedkernel.blogspot.com/2005/07/windows-2003-tcpip-implementation.html' title='Windows 2003 TCP/IP Implementation Details'/><author><name>Pei Zheng</name><uri>http://www.blogger.com/profile/07201545645519471414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11680311.post-112008318236554462</id><published>2005-06-29T18:13:00.000-04:00</published><updated>2005-06-29T18:13:02.373-04:00</updated><title type='text'>User-Level Spin Locks - Threads, Processes &amp; IPC</title><content type='html'>Spin locks are used by SMP OS kernels for kernel thread (control path) synchonization.  It is a busy-waiting style meaning that the thread trying to acquire the spin lock will constantly poll for the availability of the lock. Therefore thread holding a spin lock should not do a lot of things. &lt;br /&gt;&lt;br /&gt;Here is an interesting post &lt;br /&gt;&lt;a href="http://www.codeproject.com/threads/spinlocks.asp"&gt;The Code Project - User-Level Spin Locks - Threads, Processes &amp; IPC&lt;/a&gt;   about user level spin lock.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11680311-112008318236554462?l=advancedkernel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.codeproject.com/threads/spinlocks.asp' title='User-Level Spin Locks - Threads, Processes &amp; IPC'/><link rel='replies' type='application/atom+xml' href='http://advancedkernel.blogspot.com/feeds/112008318236554462/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11680311&amp;postID=112008318236554462' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/112008318236554462'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/112008318236554462'/><link rel='alternate' type='text/html' href='http://advancedkernel.blogspot.com/2005/06/user-level-spin-locks-threads.html' title='User-Level Spin Locks - Threads, Processes &amp; IPC'/><author><name>Pei Zheng</name><uri>http://www.blogger.com/profile/07201545645519471414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11680311.post-111952571001769777</id><published>2005-06-23T07:21:00.000-04:00</published><updated>2005-06-23T07:21:50.020-04:00</updated><title type='text'>ACM Queue - The Reincarnation of Virtual Machines - </title><content type='html'>Mendel Rosenblum, Co-Founder of VMware was interviewed by ACM Queue talking about &lt;a href="http://acmqueue.com/modules.php?name=Content&amp;amp;pa=showpage&amp;amp;pid=168"&gt;ACM Queue - The Reincarnation of Virtual Machines - Like the best of the 1970s and 1980s, VMs have returned to the scene -- and they're a lot cooler than polyester pants.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The story gives a clear overview of the VM landscape. Considering the fact that the VM market is poised for a big battle between VMWare, Microsoft Virtual PC, and Xen, and VM's technical closeness with &lt;a href="http://www.cse.msu.edu/~zhengpei/emulator.html"&gt;network emulators&lt;/a&gt;, this is indeed an exciting field I need to follow.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11680311-111952571001769777?l=advancedkernel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://acmqueue.com/modules.php?name=Content&amp;pa=showpage&amp;pid=168' title='ACM Queue - The Reincarnation of Virtual Machines - '/><link rel='replies' type='application/atom+xml' href='http://advancedkernel.blogspot.com/feeds/111952571001769777/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11680311&amp;postID=111952571001769777' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/111952571001769777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/111952571001769777'/><link rel='alternate' type='text/html' href='http://advancedkernel.blogspot.com/2005/06/acm-queue-reincarnation-of-virtual.html' title='ACM Queue - The Reincarnation of Virtual Machines - '/><author><name>Pei Zheng</name><uri>http://www.blogger.com/profile/07201545645519471414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11680311.post-111707811984034519</id><published>2005-05-25T23:18:00.000-04:00</published><updated>2005-05-25T23:29:21.516-04:00</updated><title type='text'>Windows NT Native API</title><content type='html'>One of the authors of the well-known book "&lt;a href="http://www.microsoft.com/MSPress/books/6710.asp"&gt;Windows Internals&lt;/a&gt;" talks about Windows NT native APIs and other related topics such as Win32 DLLs, kernel/user mode, etc.&lt;br /&gt;&lt;br /&gt;&lt;font&gt;&lt;blockquote&gt; The Native API is equivalent to the system call interface on traditional monolithic operating systems such as most UNIXes. On most UNIXes, however, the system call interface is well documented and is generally available for use by standard applications.&lt;/blockquote&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;There is a nice picture showing the architecture of Windows NT DLLs and system services.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11680311-111707811984034519?l=advancedkernel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.sysinternals.com/ntw2k/info/ntdll.shtml' title='Windows NT Native API'/><link rel='replies' type='application/atom+xml' href='http://advancedkernel.blogspot.com/feeds/111707811984034519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11680311&amp;postID=111707811984034519' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/111707811984034519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/111707811984034519'/><link rel='alternate' type='text/html' href='http://advancedkernel.blogspot.com/2005/05/windows-nt-native-api.html' title='Windows NT Native API'/><author><name>Pei Zheng</name><uri>http://www.blogger.com/profile/07201545645519471414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11680311.post-111480287764909653</id><published>2005-04-29T13:06:00.000-04:00</published><updated>2005-04-29T15:32:21.306-04:00</updated><title type='text'>trickle: userland bandwidth shaper</title><content type='html'>The networking session of this year's USENIX has a paper talking about &lt;a href="http://www.usenix.org/events/usenix05/tech/freenix/eriksen.html"&gt;a userland bandwidth shaper created by Google engineer Marius Aamodt Eriksen&lt;/a&gt; (need login to download the paper, but the source code is available &lt;a href="http://monkey.org/%7Emarius/pages/?page=trickle"&gt;here&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;Form Trickle's man page:&lt;br /&gt;&lt;pre&gt;&lt;/pre&gt; &lt;blockquote&gt;   &lt;pre&gt;trickle is a userspace bandwidth manager.  Currently, trickle supports&lt;br /&gt;the shaping of any SOCK_STREAM (see socket(2)) connection established&lt;br /&gt;via the socket(2) interface.  Furthermore, trickle will not work&lt;br /&gt;with statically linked executables, nor with setuid(2) executables. &lt;br /&gt;trickle is highly configurable; download and upload rates can be&lt;br /&gt;set separately, or in an aggregate fashion.&lt;/pre&gt;&lt;/blockquote&gt;The trickle daemon, an LD_PRELOAD module, works by imposing a rate cap on the bandwidth (upload, download, or both) of a process or group of processes using socket connections.&lt;br /&gt;&lt;br /&gt;LD_PRELOAD is a way to intercept dynamic function called. You set the environment variable to your own shared library, in which you define your own functions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11680311-111480287764909653?l=advancedkernel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://monkey.org/~marius/pages/?page=trickle' title='trickle: userland bandwidth shaper'/><link rel='replies' type='application/atom+xml' href='http://advancedkernel.blogspot.com/feeds/111480287764909653/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11680311&amp;postID=111480287764909653' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/111480287764909653'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/111480287764909653'/><link rel='alternate' type='text/html' href='http://advancedkernel.blogspot.com/2005/04/trickle-userland-bandwidth-shaper.html' title='trickle: userland bandwidth shaper'/><author><name>Pei Zheng</name><uri>http://www.blogger.com/profile/07201545645519471414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11680311.post-111453063364603142</id><published>2005-04-26T11:40:00.000-04:00</published><updated>2005-04-26T11:50:33.646-04:00</updated><title type='text'>User Model Linux for Wireless Network Emulation</title><content type='html'>&lt;a href="http://www.usenix.org/events/usenix05/tech/"&gt;USENIX'05&lt;/a&gt; has an emulation track of 3 papers, one of which, "&lt;a href="http://www.auto.ucl.ac.be/%7Eguffens/comsc/guffens05freenix.pdf"&gt;Running virtualized native drivers in User Mode Linux&lt;/a&gt;", proposes a method of using User Mode Linux along with virtual wireless network interfaces for wireless network emulation. It uses the &lt;a href="http://hostap.epitest.fi/"&gt;Hostap driver&lt;/a&gt; in the guest OS to communicate the virtual wireless interface via TCP. While the system can be used to test ad hoc routing or other protocols, it may be only useful when the wireless network (wireless LAN, for example) is small. Good thing is, there is no need to modify the protocol implementation because it is executed in a guest OS.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11680311-111453063364603142?l=advancedkernel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.auto.ucl.ac.be/~guffens/comsc/guffens05freenix.pdf' title='User Model Linux for Wireless Network Emulation'/><link rel='replies' type='application/atom+xml' href='http://advancedkernel.blogspot.com/feeds/111453063364603142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11680311&amp;postID=111453063364603142' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/111453063364603142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/111453063364603142'/><link rel='alternate' type='text/html' href='http://advancedkernel.blogspot.com/2005/04/user-model-linux-for-wireless-network.html' title='User Model Linux for Wireless Network Emulation'/><author><name>Pei Zheng</name><uri>http://www.blogger.com/profile/07201545645519471414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11680311.post-111386122790663951</id><published>2005-04-18T17:38:00.000-04:00</published><updated>2005-04-24T14:58:50.440-04:00</updated><title type='text'>Linux Netfilter Revisit</title><content type='html'>The netfilter architecture in Linux kernel 2.4 and above makes packet filtering in kernel IP stack much easier: what you need to do is implementing your "hooks" and placing it into specific places in the kernel stack. Below is picture in &lt;span style=";font-family:Arial,Helvetica,sans-serif;font-size:85%;"  &gt;Paul "Rusty" Russell's 2000 Linux Journal article "&lt;a href="http://www.linux-mag.com/archive/2000-06/gear_01.html"&gt;Writing Modules for Netfilter&lt;/a&gt;".&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://open-source.arkoon.net/kernel/kernel_net.png"&gt;&lt;img style="width: 414px; height: 166px;" src="http://www.linux-mag.com/archive/2000-06/img2/gearheads_01.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Note that connection tracking is done in PRE_ROUTE and LOCAL_OUT, while NAT is done in PRE_ROUTE (destination NAT, such as port forwarding, for incoming connections), LOCAL_OUT (destination NAT), and POST_ROUTE (source NAT including masquerading for outgoing connections).&lt;br /&gt;&lt;br /&gt;A very nice figure of 2.4 kernel IP handling is &lt;a href="http://open-source.arkoon.net/kernel/kernel_net.png"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11680311-111386122790663951?l=advancedkernel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://advancedkernel.blogspot.com/feeds/111386122790663951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11680311&amp;postID=111386122790663951' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/111386122790663951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/111386122790663951'/><link rel='alternate' type='text/html' href='http://advancedkernel.blogspot.com/2005/04/linux-netfilter-revisit.html' title='Linux Netfilter Revisit'/><author><name>Pei Zheng</name><uri>http://www.blogger.com/profile/07201545645519471414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11680311.post-111359371903181312</id><published>2005-04-15T15:14:00.000-04:00</published><updated>2005-04-18T17:38:08.346-04:00</updated><title type='text'>Network Emulation: Multiple Network Stacks in One Kernel</title><content type='html'>While looking into the increasingly popular virtual machine technology, I realized my &lt;a href="http://gargoyle.arcadia.edu/mathcs/zhengpei/publications/empower-tpds04.pdf"&gt;previous  work on network emulation &lt;/a&gt; could be categorized into this broad area.&lt;br /&gt;&lt;br /&gt;To be exact, "pure" machine virtualization refers to allowing for multiple complete OSes to run top of a middle layer (always called Virtual Machine Manager VMM). Systems falling into this class are VMWare, Microsoft Virtual PC, and User Mode Linux, among others.&lt;br /&gt;&lt;br /&gt;But in the domain of network emulation/simulation, we don't really need to virtualize everything a general purpose OS will use. Instead, we may just focus on the network protocol stack in the kernel, and protocol instances.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.tel.fer.hr/imunes/"&gt;IMUNES&lt;/a&gt; is such a multi-net-stack emulator. Based on a FreeBSD kernel, IMUNES &lt;a href="http://tel.fer.hr/zec/papers/zec-mikuc-04.pdf"&gt;adds a vnet kernel structure to maintain global and static symbols used by the network stack code&lt;/a&gt; for each virtual node of the underlying cloned stack. So within each virtual node, a process (for example, a routing daemon) will only see emulated interfaces, routing tables, etc, previously configured for the virtual node. The way to bind a process to a virtual node is done by modifying process control block of the kernel.&lt;br /&gt;&lt;br /&gt;The creation of a virtual topology using multiple virtual nodes within a kernel is enabled by the &lt;a href="http://www.daemonnews.org/200003/netgraph.html"&gt;netgraph framework&lt;/a&gt; in the FreeBSD kernel.  Another way to build virtual links is to use &lt;a href="http://www.linux-mag.com/archive/2000-04/gear_01.html"&gt;virtual network interfaces&lt;/a&gt;.  In both cases, packets are handed over between virtual nodes only by reference (the socket buffer sk_buf).&lt;br /&gt;&lt;br /&gt;In IMUNES, queueing and traffic shaping are provided by a shaper called ng_pipe, a special netgraph node. Emulated network conditions include delay, bandwidth, and bit-error-rate.&lt;br /&gt;&lt;br /&gt;As you may have already figured out, this approach performs much better than pure virtual machine based network emulation and user-space based virtual node in terms of supporting long route path with high throughput. The downside is apparently the heavy modification made to the FreeBSD kernel.&lt;br /&gt;&lt;br /&gt;To dig further, read the &lt;a href="http://tel.fer.hr/zec/papers/zec-03.pdf"&gt;IMUNES USENIX paper&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;A very good summary of software tools for networking is &lt;a href="http://www.comsoc.org/ni/Public/2004/nov/nisoft.html"&gt;here (IEEE COMSOC)&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;My outdated &lt;a href="http://www.cse.msu.edu/%7Ezhengpei/emulator.html"&gt;network emulation page @MSU&lt;/a&gt; has a list of emulators.  I really need to update it.....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11680311-111359371903181312?l=advancedkernel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://advancedkernel.blogspot.com/feeds/111359371903181312/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11680311&amp;postID=111359371903181312' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/111359371903181312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/111359371903181312'/><link rel='alternate' type='text/html' href='http://advancedkernel.blogspot.com/2005/04/network-emulation-multiple-network.html' title='Network Emulation: Multiple Network Stacks in One Kernel'/><author><name>Pei Zheng</name><uri>http://www.blogger.com/profile/07201545645519471414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11680311.post-111259136392808670</id><published>2005-04-04T00:23:00.000-04:00</published><updated>2005-04-04T01:09:23.936-04:00</updated><title type='text'>Running Linux 2.6.11 On Dell Inspiron 5100</title><content type='html'>This weekend I decided to make my Dell Inspiron 5100 dual-boot for both Windows XP and Linux. I already have Windows there working fine. Based on the fact that I have Fedora Core II CDs burned last year when I worked for Nextel, I chose to use Fedora but with latest kernel. At least 16 hours have been taken for this job. Be patient.&lt;br /&gt;&lt;br /&gt;Section 0: Create a partition using ntfsresize in &lt;a href="http://www.knoppix.net/"&gt;Knoppix&lt;/a&gt;, the well-known single-CD Linux system. This allows &lt;span style="font-weight: bold;"&gt;resizing&lt;/span&gt; an NTFS partition (the laptop only has one disk).  The guide to this step is &lt;a href="http://users.tkk.fi/%7Etkarvine/linux-windows-dual-boot-resizing-ntfs.html"&gt;here&lt;/a&gt;.  Now I have a 10G partition for Linux.&lt;br /&gt;&lt;br /&gt;Section 1: Big trouble with the CD drive on my Inspirion 5100. It seems when it continues to read for sometime (let's say 1 hour), the CD drive will ALWAYS report read error as it is getting very hot. Thus there is no way to have a pretty complete installation of Fedora; I have to wait until it cools down. I ended up using my old Redhat 9 3-CD set, and chose "minimal" package selection - No KDE or GNOME, no kernel source, etc. Eventually I got a Redhat 9 with kernel 2.4.20 on my laptop. Now I wanted to make the network work.&lt;br /&gt;&lt;br /&gt;Section 2: Old kernels (2.4.x) do not have support for the built-in Broadcom 4401 Ethernet interface in Dell Insprion. But Broadcom provides a Linux driver &lt;a href="http://www.broadcom.com/drivers/downloaddrivers.php"&gt;here&lt;/a&gt;. Download and compile, follow the readme, and it worked.&lt;br /&gt;&lt;br /&gt;Section 3: Grab the 2.6.11 kernel from &lt;a href="http://www.kernel.org/"&gt;kernel.org&lt;/a&gt;. A good article about this step is &lt;a href="http://www.geocities.com/asimshankar/etc/linux/migrate26.html"&gt;here&lt;/a&gt;. The 2.6 kernel changed several modules names, as well as in-kernel module loader interfaces. So I must download the module-init-tools and replaced those "modprobe", "insmod" stuff with the new ones. The 2.6 kernel has bcm4400 support, and the module is named "b44". A kernel configuration is for the bcm 4400 support. After compilation, as the article suggested, I modified modprobe and rc.sysinit for usb mouse, etc. Then modified grub. Rebooted.&lt;br /&gt;&lt;br /&gt;Section 4: Make the build-in TrueMobile (broadcom 1300) work. After some google search, I figured out (&lt;a href="http://ndiswrapper.sourceforge.net/phpwiki/index.php?Installation"&gt;ndiswrapper&lt;/a&gt; + &lt;a href="http://support.dell.com/support/downloads/type.aspx?c=us&amp;cs=04&amp;amp;l=en&amp;s=bsd&amp;amp;SystemID=INS_PNT_P4_5100&amp;category=5&amp;amp;os=WW1&amp;osl=en&amp;amp;deviceid=4394&amp;devlib=5"&gt;Dell TrueMobile driver&lt;/a&gt;) is the solution. Downloaded both of them and followed the installation guide. At some point, the "make" did not proceed because my system does not have the docbook2html tool. Then I configued the wlan0 to be automatically up and hook to my access point, with proper IP setting. Then in rc.local, added a default gateway through my desktop proxy server and bring down the built-in ethernet interface (eth0), which will automatically remove the routes associated with it in the routing table.&lt;br /&gt;&lt;br /&gt;Section 5: Get apt, kde, firefox, etc. Installing rpms onto a Linux system always ends up with dependency hell. Apt makes this process extremely easire. I also tried Yum, but gave up later.&lt;br /&gt;&lt;br /&gt;Section 6: Since I use ssh a lot from the laptop, I don't want to always use my gateway machine as the intermediate hop. I want to directly ssh to a remote box. The solution is to use &lt;a href="http://i.cs.hku.hk/%7Ellcheng/specTopic/sshsocks/index.php"&gt;connect.c (created by  Shun-ichi Goto&lt;/a&gt;&lt;span style="text-decoration: underline;"&gt;) &lt;/span&gt;with openssh.&lt;br /&gt;&lt;br /&gt;Lessions learned:&lt;br /&gt;a. Never underestimate the time you're gonna take to do a Linux installation on a laptop. You need a lot of time searching online and playing directly with packages, sometime you have to hack it your self.&lt;br /&gt;&lt;br /&gt;b. RPM dependency is a hell. Because my CD drive does not always work, getting needed rpms for a special package is a pain in the neck. Get your network ready and use apt as sooner as possible.&lt;br /&gt;&lt;br /&gt;c. Dell Inspiron is hot! (after the CD drive spins for some time).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11680311-111259136392808670?l=advancedkernel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://advancedkernel.blogspot.com/feeds/111259136392808670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11680311&amp;postID=111259136392808670' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/111259136392808670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/111259136392808670'/><link rel='alternate' type='text/html' href='http://advancedkernel.blogspot.com/2005/04/running-linux-2611-on-dell-inspiron.html' title='Running Linux 2.6.11 On Dell Inspiron 5100'/><author><name>Pei Zheng</name><uri>http://www.blogger.com/profile/07201545645519471414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11680311.post-111256359856166950</id><published>2005-04-03T17:26:00.000-04:00</published><updated>2005-04-03T17:26:38.563-04:00</updated><title type='text'>Zero-Copy in Linux Kernel</title><content type='html'>Found a (supposedly) outdated doc on &lt;a href="http://www.linuxjournal.com/article/6345"&gt;Zero Copy in Linux Kernel&lt;/a&gt; written by &lt;span class="submitted"&gt;&lt;a href="http://www.linuxjournal.com/user/801134" title="View user profile."&gt;Dragan Stancevic&lt;/a&gt;.  The article clearly explains how send() and "sendfile()" differ from kernel's perspective.&lt;br /&gt;&lt;br /&gt;Using sendfile(&lt;/span&gt;&lt;tt&gt;socket, file, len&lt;/tt&gt;&lt;span class="submitted"&gt;), Data from a disk is first DMA-copied into kernel buffer, then the kernel socket buffer only collects descriptors (not the data!) of those skbs. Eventually the NIC performs DMA-gather over the socket buffer(skb descriptors) and the kernel buffer(data) into NIC's transmission ring buffer. Thus this operation (zero-copy in kernel) requires the NIC support scatter-gather DMA.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11680311-111256359856166950?l=advancedkernel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://advancedkernel.blogspot.com/feeds/111256359856166950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11680311&amp;postID=111256359856166950' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/111256359856166950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/111256359856166950'/><link rel='alternate' type='text/html' href='http://advancedkernel.blogspot.com/2005/04/zero-copy-in-linux-kernel.html' title='Zero-Copy in Linux Kernel'/><author><name>Pei Zheng</name><uri>http://www.blogger.com/profile/07201545645519471414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11680311.post-111178284464352598</id><published>2005-03-25T15:34:00.000-05:00</published><updated>2005-03-25T15:34:04.643-05:00</updated><title type='text'>Windows Virtual Memory</title><content type='html'>In light of a big project with Microsoft, I started to collect Windows OS resources.  Wong's &lt;a href="http://www.rojakpot.com/default.aspx?location=3&amp;amp;var1=143&amp;amp;var2=0"&gt;article&lt;/a&gt;  is definitely a must-read for anyone interested with Windows virtual memory management.&lt;br /&gt;&lt;br /&gt;Think you are pretty clear with Microsoft's VM?&lt;br /&gt;&lt;br /&gt;Question: what is the difference between a swap file and a page file?&lt;br /&gt;&lt;br /&gt;The differences lie in how the process is being swapped and how the free space is being used by other processes.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11680311-111178284464352598?l=advancedkernel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.rojakpot.com/default.aspx?location=3&amp;var1=143&amp;var2=0' title='Windows Virtual Memory'/><link rel='replies' type='application/atom+xml' href='http://advancedkernel.blogspot.com/feeds/111178284464352598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11680311&amp;postID=111178284464352598' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/111178284464352598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/111178284464352598'/><link rel='alternate' type='text/html' href='http://advancedkernel.blogspot.com/2005/03/windows-virtual-memory.html' title='Windows Virtual Memory'/><author><name>Pei Zheng</name><uri>http://www.blogger.com/profile/07201545645519471414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11680311.post-111171670753221757</id><published>2005-03-24T20:54:00.000-05:00</published><updated>2005-03-24T21:24:50.303-05:00</updated><title type='text'>Read-Copy Update Mutex in Linux Kernel</title><content type='html'>I ran into a nice &lt;a href="http://lse.sourceforge.net/locking/rcupdate.html"&gt;article&lt;/a&gt; talking about Read-Copy Update at &lt;a href="http://lse.sourceforge.net/"&gt;LSE sourceforge site (Linux Scalability Effort)&lt;/a&gt;.  RCP differs from traidational &lt;a href="http://www.linuxjournal.com/article/5833"&gt;spin-lock mutex&lt;/a&gt; (spin-waiting) in that:&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt; Read-Copy Update is one ... mutual exclusion method where readers (threads trying to access, but not modify the data) can access the shared data without acquiring any conventional lock. The writers (threads that update the data) however, have to use a special callback scheme to update the data. They update all the global references to the updated data with a new copy and use the callback scheme to free the old copy after all the CPUs have lost local references to it by going through a quiescent state (like a context switch).&lt;br /&gt;&lt;/blockquote&gt;The overhead of spin waiting could be high when multiple threads are accessing the same route cache or routing table, for example. As you can see, the "write" is more expensive because it has to make sure processors have lost reference to the old data. The implementation can be downloaded &lt;a href="http://sourceforge.net/projects/lse/"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;As a sidenote, semaphores in Linux are sleeping locks as opposed to spnning locks. So semaphores should be used when lock-held time is long considering the overhead of putting thread in sleep and waking it up later.&lt;br /&gt;&lt;br /&gt;At this point(03/24/2005), the latest kernel may have already incorporated this scheme or even better scheme to replace spin locks. I will check it out when I get a chance.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11680311-111171670753221757?l=advancedkernel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://lse.sourceforge.net/locking/rcupdate.html' title='Read-Copy Update Mutex in Linux Kernel'/><link rel='replies' type='application/atom+xml' href='http://advancedkernel.blogspot.com/feeds/111171670753221757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11680311&amp;postID=111171670753221757' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/111171670753221757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11680311/posts/default/111171670753221757'/><link rel='alternate' type='text/html' href='http://advancedkernel.blogspot.com/2005/03/read-copy-update-mutex-in-linux-kernel.html' title='Read-Copy Update Mutex in Linux Kernel'/><author><name>Pei Zheng</name><uri>http://www.blogger.com/profile/07201545645519471414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
