<?xml version="1.0" encoding="iso-8859-2"?>
<rss version="2.0">
 <channel>
  <title>ivoras' Home</title>
  <generator>genweb.py</generator>
  <item>
   <title>FreeBSD under VMWare</title>
   <link>freebsd/vmware.html</link>
   <description>&lt;p&gt;The following tips work both under VMWare ESX (2 &amp;amp; 3) and
VMWare Server 1.0.&lt;/p&gt;

&lt;h2&gt;1. General tips&lt;/h2&gt;
&lt;p&gt;Don't use a virtual machine for network-heavy workloads. VMware
and other full-hardware virtualization environments (MS Virtual PC,
QEmu, etc.) introduce a heavy penalty on I/O, especially network I/O.
Expect to be able to get only around 30%-40% out of a gigabit interface
(which still amounts to ~~40 MB/s). For example, don't use virtual
machines for network routers and similar tasks. Also, don't use them
for tasks which require exact timing (e.g. multimedia processing,
industrial machine control, etc.). These points are actually valid
for any combination of virtualization software and guest OS.&lt;/p&gt;

&lt;h2&gt;2. Don't use &lt;tt&gt;lnc&lt;/tt&gt;&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;This tip is no longer current, as lnc doesn't exist in 
FreeBSD 7. It's still valid for FreeBSD 6.3 and earlier versions.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;While it's the default, &lt;tt&gt;lnc&lt;/tt&gt; driver is the worst network
driver for your virtual machine. It's GIANT-locked (meaning it 
doesn't allow for much parallelizm in the OS), and it's
actually deprecated and will be dropped in FreeBSD 7.
The replacement for &lt;tt&gt;lnc&lt;/tt&gt; is &lt;tt&gt;le&lt;/tt&gt; and it's present
at least in FreeBSD 6.2 and newer, but it's not included in the default
GENERIC kernel. Thus, you'll have to configure and compile a custom
kernel with &lt;tt&gt;device lnc&lt;/tt&gt; replaced with &lt;tt&gt;device le&lt;/tt&gt;.
(Just loading the &lt;tt&gt;if_le&lt;/tt&gt; kernel module won't work because the
&lt;tt&gt;lnc&lt;/tt&gt; driver present in the kernel at boot time 
will detect and use the hardware first.)&lt;/p&gt;

&lt;p&gt;In VMWare ESX 3 and VMWare Server 1.0 there's an undocumented configuration
option for the virtual machine that enables VMWare to emulate Intel 
E1000 hardware instead of the AMD Lance&lt;sup&gt;[&lt;a href=&quot;#e1000please&quot;&gt;*&lt;/a&gt;]&lt;/sup&gt;. 
To use it, edit the .vmx file and put &lt;tt&gt;ethernet0.virtualDev=&quot;e1000&quot;&lt;/tt&gt;
in the appropriate place (anywhere). The simulated device also has TSO support 
(which is usable in FreeBSD 7, though I don't know what performance
can be achieved with the simulated hardware). Device &lt;tt&gt;em&lt;/tt&gt;
is faster and not GIANT-locked so it should give the best
performance.&lt;/p&gt;

&lt;h2&gt;3. Reduce &lt;tt&gt;kern.hz&lt;/tt&gt;&lt;/h2&gt;
&lt;p&gt;Kernel's timer frequency (&quot;HZ&quot;) in FreeBSD 6.x and 7.x is set to a
relatively large value - 1000 Hz. This was done in attempt to reduce latency
in the interim period while some kinks are sorted out and it's planed for
it to be reduced back to 100 Hz in future versions of FreeBSD. 
High HZ setting has a negative
impact on simulated machine's performance because the VM software spends a lot
of time handling timer interrupts instead of doing real work.&lt;/p&gt;
&lt;p&gt;You can change the HZ setting by adding a line like
&lt;tt&gt;kern.hz=100&lt;/tt&gt; in &lt;tt&gt;/boot/loader.conf&lt;/tt&gt;. In the extreme cases
you might want to use very low values for kern.hz like 20, but test first!&lt;/p&gt;

&lt;h2&gt;4. Disable internal VMWare swapping&lt;/h2&gt;
&lt;p&gt;Consider &lt;a href=&quot;http://sanbarrow.com/vmx/vmx-config-ini.html&quot;&gt;disabling
VMWare internal memory swapping&lt;/a&gt; and make the virtual machine fit
in in the physical memory of the host for best performance.&lt;/p&gt;

&lt;h2&gt;5. VMWare Tools not necessary&lt;/h2&gt;
&lt;p&gt;It would be nice to have VMWare Tools working on FreeBSD but apparently
the company doesn't want to support it properly. Currently, the only thing
that VMWare tools are useful on FreeBSD is to get GUI
features like clipboard sharing and automatic mouse focus grab in X.Org.
VMWare tools on Linux seem to include a driver that does something with
memory management, but it's not available for FreeBSD. You don't need
VMWare Tools for the following things to work: networking, timer, X.Org GUI.&lt;/p&gt;

&lt;p&gt;Networking is handled by the &lt;tt&gt;le&lt;/tt&gt; driver or the &lt;tt&gt;em&lt;/tt&gt; driver. These two will
work without any special configuration of FreeBSD. To use the em driver,
you might need to modify the VM configuration to include &lt;tt&gt;ethernet0.virtualDev = &quot;e1000&quot;&lt;/tt&gt;
or a similar appropriate line. To use the VMWare &lt;tt&gt;vmxnet&lt;/tt&gt; driver
(which as far as I can see isn't much different than the le driver), you
need to build a kernel without the &lt;tt&gt;le&lt;/tt&gt; driver first.&lt;/p&gt;

&lt;p&gt;Timer issues can be lessened (never resolved, even with VMware tools)
by reducing &lt;tt&gt;kern.hz&lt;/tt&gt; to something like 50 or 100 Hz (in &lt;tt&gt;loader.conf&lt;/tt&gt;), and
installing ntpd.&lt;/p&gt;

&lt;p&gt;X.Org can use the generic &quot;vmware&quot; display driver which is included in
the default X.Org collection of drivers. Mouse, etc. are also handled
generically.&lt;/p&gt;

&lt;p&gt;The only remaining functionality is the ability to &quot;shrink&quot; drives.
If you're running VMWare Server on Windows host, there are
&lt;a href=&quot;http://petruska.stardock.net/Software/VMware.html&quot;&gt;third party
    utilities for VMWare&lt;/a&gt; that can do the same thing.&lt;/p&gt;


&lt;sup&gt;&lt;p&gt;&lt;a name=&quot;e1000please&quot;&gt;[*]&lt;/a&gt;If you're from VMWare-the-company,
please don't remove this feature from both of the products. 
It's very useful both in ESX and Server for both production and
testing.&lt;/p&gt;&lt;/sup&gt;

</description>
  </item>
  <item>
   <title>What's cooking for FreeBSD 8?</title>
   <link>freebsd/freebsd8.html</link>
   <description>&lt;!-- $Id: freebsd8.html,v 1.18 2008/06/29 20:01:22 ivoras Exp $ --&gt;
&lt;p&gt;The next major release of FreeBSD, version 8, will probably
be an &quot;evolutional&quot; release. The focus will be on further improvements
of SMP capabilities and the stability of already implemented
subsystems. This page will document changes that will be included
in FreeBSD 8, including those that might end up being committed
to earlier branches. In other words, it describes differences between 7.0
and 8.0, no matter what happens to the versions in between.&lt;/p&gt;

&lt;p&gt;Also useful are the quarterly Status Reports:
&lt;ul&gt;
    &lt;li&gt;&lt;a href=&quot;http://www.freebsd.org/news/status/report-2007-10-2007-12.html&quot;&gt;2007 / Q4&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://lists.freebsd.org/pipermail/freebsd-current/2007-October/078060.html&quot;&gt;2007 / Q3&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;

&lt;p&gt;Everyone's encouraged to download a &lt;a href=&quot;ftp://ftp.freebsd.org/pub/FreeBSD/snapshots&quot;&gt;snapshot CD image&lt;/a&gt;
and try all the new features (as well as the old ones). Developers are
very interested in bug reports. Note that FreeBSD 8.0 is &lt;strong&gt;not
released yet&lt;/strong&gt; and both the snapshots and the default source
trees have debugging enabled by default (which results in dramatic
slowdowns so don't benchmark them without removing the debugging
options).&lt;/p&gt;

&lt;p&gt;If you're interested in how FreeBSD gets developed, you're encouraged to
read the &lt;a href=&quot;http://www.freebsd.org/community/mailinglists.html&quot;&gt;mailing lists&lt;/a&gt;
and &lt;a href=&quot;http://planet.freebsdish.org/complete/&quot;&gt;developer blogs&lt;/a&gt;.&lt;/p&gt;


&lt;h2&gt;Kernel &amp;amp; low level improvements&lt;/h2&gt;

&lt;h3&gt;MPSAFETTY&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; In final stages of development&lt;br/&gt;
&lt;b&gt;Will appear in 8.0:&lt;/b&gt; probably&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; Ed Schouten&lt;br/&gt;
&lt;b&gt;Web:&lt;/b&gt; &lt;a href=&quot;http://wiki.freebsd.org/TTYRedesign&quot;&gt;wiki page&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;The TTY layer is the traditional Unix interface to system users, providing
them with interactive sessions to run shells, etc. The current TTY layer in
FreeBSD is for the most part the traditional BSD TTY, which is integrated with
the drivers and other layers in a way that, though efficient, makes it
hard to maintain and extend. The initiative to rewrite the TTY layer aims to
make it a true abstraction layer, operating on behalf of both sides of TTY.
In addition, it will remove the TTY from the Giant lock, which will eliminate
problems with lags and skippy user interface behaviour in the console and
X.Org.&lt;/p&gt;


&lt;h3&gt;Kernel memory limit on AMD64 increased to 6 GB&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 8.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; Alan Cox&lt;br/&gt;
&lt;b&gt;Web:&lt;/b&gt; &lt;a href=&quot;http://lists.freebsd.org/pipermail/freebsd-hackers/2008-June/024807.html&quot;&gt;announcement&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;Some modern features (of which the most notable currently is ZFS) require
a large amount of kernel memory (this has nothing to do with traditional disk caches).
Up to now, it was only possible to allocate up to 2 GB for &lt;tt&gt;kmem_max&lt;/tt&gt;,
which is becoming a bit cramped. There is ongoing work to increase this to
at least 6 GB. Users of ZFS will be happy.&lt;/p&gt;


&lt;h3&gt;Kernel threads&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 8.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; Julian Elischer&lt;br/&gt;
&lt;b&gt;Web:&lt;/b&gt; &lt;a href=&quot;http://lists.freebsd.org/pipermail/cvs-src/2007-October/082727.html&quot;&gt;commit message&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;Kernel threads upto now were actually &quot;heavy weight&quot; processes running in the
kernel address space. This change introduces real light weight kernel threads
which consume less low-level resources (process locks, memory maps). It also
allows better grouping of threads for display purposes.&lt;/p&gt;


&lt;h3&gt;procstat(1): A process inspection utility&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 8.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; Robert Watson&lt;br/&gt;
&lt;b&gt;Web:&lt;/b&gt; &lt;a href=&quot;http://lists.freebsd.org/pipermail/freebsd-current/2007-December/080898.html&quot;&gt;announcement&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;procstat&lt;/tt&gt; combines functionality from the now-deprecated 
&lt;tt&gt;procfs(4)&lt;/tt&gt; and adds several new functionalities. Some of the data
procstat can provide are: process' command line arguments, file descriptor
information, stacks of the kernel threads in the process, security
credentials information from the process, thread information and virtual
memory mappings. This is utility is mostly useful for debugging.&lt;/p&gt;


&lt;h3&gt;TextDumps: gathering information after kernel panic&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to -CURRENT, MFC-ed to 7-STABLE&lt;br/&gt;
&lt;b&gt;Will appear in 8.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; Robert Watson&lt;br/&gt;
&lt;b&gt;Web:&lt;/b&gt; &lt;a href=&quot;http://lists.freebsd.org/pipermail/freebsd-stable/2008-April/041672.html&quot;&gt;Q&amp;amp;A on textdumps&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;The usual thing that happens after a kernel panic is a kernel memory
dump, either full or (in 7.0 and later) a &quot;minidump&quot;. The new &quot;textdump&quot;
feature doesn't store the actual kernel memory dump, but extracts commonly
needed information from it, stores it into a tar archive of text files,
and deletes the dump file. This significantly reduces the size requirements
of collecting such information, speeds up development, and enables people
to collect debugging information after a crash without kernel developer
experience.&lt;/p&gt;


&lt;h3&gt;ULE 3.0: New version of the SMP-optimized scheduler&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 8.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; Jeff Roberson&lt;br/&gt;
&lt;b&gt;Web:&lt;/b&gt; &lt;a href=&quot;http://lists.freebsd.org/pipermail/cvs-src/2008-March/087965.html&quot;&gt;commit message&lt;/a&gt;,
     &lt;a href=&quot;http://lists.freebsd.org/pipermail/cvs-src/2008-March/087969.html&quot;&gt;commit message&lt;/a&gt;,
     &lt;a href=&quot;http://lists.freebsd.org/pipermail/freebsd-current/2008-March/083981.html&quot;&gt;announcement&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;Evolution of the ULE scheduler resulted in support for fine-grained CPU 
affinity calculations, taking into account the physical topology of the
CPUs (caches, cores, sockets) and much improved support for binding threads
to CPUs. This results in additional functionalities (opens up the
possibility of assigning individual CPUs to jails) and noticeable performance
improvements.&lt;/p&gt;


&lt;h3&gt;Superpages&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 8.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author&lt;/b&gt; Alan Coy&lt;br/&gt;
&lt;b&gt;Web:&lt;/b&gt; &lt;a href=&quot;http://www.cs.rice.edu/~ssiyer/r/superpages/osdi02superpages/&quot;&gt;research paper&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Most general-purpose processors provide support for memory pages of large sizes, called 
&lt;em&gt;superpages&lt;/em&gt;. Superpages enable each entry in the translation lookaside buffer (TLB)
to map a large physical memory region into a virtual address space. This dramatically
increases TLB coverage, reduces TLB misses, and promises performance improvements for
many applications. However, supporting superpages poses several challenges to the operating
system, in terms of superpage allocation and promotion tradeoffs, fragmentation control, etc.
We analyze these issues, and propose the design of an effective superpage management system.
We implement it in FreeBSD on the Alpha CPU, and evaluate it on real workloads and benchmarks.
We obtain substantial performance benefits, often exceeding 30%; these benefits are sustained
even under stressful workload scenarios.&lt;/p&gt;
&lt;p&gt;For now, superpages are only available for AMD64 architecture (aka x86_64).&lt;/p&gt;


&lt;h3&gt;DTrace&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to -CURRENT (kernel trace only)&lt;br/&gt;
&lt;b&gt;Will appear in 8.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; John Birrell&lt;br/&gt;
&lt;b&gt;Web:&lt;/b&gt; &lt;a href=&quot;http://dtrace.what-creek.com/&quot;&gt;project web page&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;DTrace is a tool and a language developed by Sun Microsystems to help debugging and
profiling operating systems. It can aggregate information from different parts of
both kernel and userland and analyze them in a ways that's meaningful to the user.&lt;/p&gt;


&lt;h2&gt;Networking improvements&lt;/h2&gt;

&lt;h3&gt;VirtNet / VIMAGE / Imunes / Network stack virtualization&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; In final stages of development&lt;br/&gt;
&lt;b&gt;Will appear in 8.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; Marko Zec&lt;br/&gt;
&lt;b&gt;Web:&lt;/b&gt; &lt;a href=&quot;http://imunes.tel.fer.hr/virtnet/&quot;&gt;project web page&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;The network stack virtualization project aims at extending the FreeBSD
kernel to maintain multiple independent instances of networking state. This will
allow for complete networking independence between jails on a system, including
giving each jail its own firewall, virtual network interfaces, rate limiting,
routing tables, and IPSEC configuration.&lt;/p&gt;


&lt;h3&gt;Multiple routing tables / FIBs&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to 8-CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 8.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Authors:&lt;/b&gt; Julian Elischer&lt;br/&gt;
&lt;b&gt;Web:&lt;/b&gt; &lt;a href=&quot;http://lists.freebsd.org/pipermail/freebsd-arch/2007-December/007331.html&quot;&gt;proposal&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;Support for multiple routing tables (forwarding information bases)
allows advanced network topologies. The setfib utility can be used to
select routing tables on per-process level.&lt;/p&gt;


&lt;h3&gt;Equal cost multipath routing&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to 8-CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 8.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Authors:&lt;/b&gt; Qing Li&lt;br/&gt;
&lt;b&gt;Web:&lt;/b&gt; &lt;a href=&quot;http://lists.freebsd.org/pipermail/cvs-src/2008-April/089956.html&quot;&gt;commit message&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;ECMP routing allows for multiple routes to be handled by the kernel,
including default routes. It potentially offers substantial increases
in bandwidth by load-balancing traffic over multiple paths.&lt;/p&gt;


&lt;h3&gt;Zero-copy BPF&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to 8-CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 8.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Authors:&lt;/b&gt; Robert Watson, Christian S.J. Peron&lt;br/&gt;
&lt;b&gt;Web:&lt;/b&gt; &lt;a href=&quot;http://www.watson.org/~robert/freebsd/2007bsdcan/20070517-devsummit-zerocopybpf.pdf&quot;&gt;BSDCan slides&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;BPF is Berkeley Packet Filter, facility used to capture raw network packets
from the lower layers of the network stack according to user-defined filters
and forward them to an application, as well as insert raw packets to the network
stack.&lt;/p&gt;

&lt;p&gt;This improvement to BPF reduces the number of memory copy operations between
the kernel and the application which improves performance in some cases.&lt;/p&gt;


&lt;h3&gt;Kernel NFS locking support&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to 8-CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 8.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; Doug Rabson&lt;br/&gt;
&lt;b&gt;Web:&lt;/b&gt; &lt;a href=&quot;http://lists.freebsd.org/pipermail/cvs-src/2008-March/089272.html&quot;&gt;commit message&lt;/a&gt;,
    &lt;a href=&quot;http://lists.freebsd.org/pipermail/freebsd-current/2008-March/084446.html&quot;&gt;announcement&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;NFS lock manager in kernel improves performance and behaviour of NFS
locking (used to synchronize file access on remote machines). New features
include multithreaded operation, deadlock detection, and transparent
interaction with local file locks on the server.&lt;/p&gt;


&lt;h2&gt;Storage subsystems' improvements&lt;/h2&gt;

&lt;h3&gt;Boot support for GPT partitions&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 8.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; John Baldwin&lt;br/&gt;
&lt;b&gt;Web:&lt;/b&gt; &lt;a href=&quot;http://lists.freebsd.org/pipermail/cvs-src/2007-October/082851.html&quot;&gt;commit message&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;Support for booting from GPT partitions has been committed to -CURRENT. 
This support includes the boot sector and loader that enable common i386
machines with a generic BIOS to boot from GPT-partitioned drives.&lt;/p&gt;


&lt;h3&gt;bsdlabel gets extended to 26 partitions&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 8.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; Marcel Moolenaar&lt;br/&gt;
&lt;b&gt;Web:&lt;/b&gt; &lt;a href=&quot;http://lists.freebsd.org/pipermail/cvs-src/2007-December/084949.html&quot;&gt;commit message&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;bsdlabel is (finally!) extended to support more than 8 partitions.
The new limit of 26 partitions comes from the number of lower-case leters.&lt;/p&gt;
&lt;p&gt;To make use of this change, GEOM_PART needs to be used instead of
GEOM_BSD (this requires custom kernel configurations).&lt;/p&gt;


&lt;h2&gt;Other changes&lt;/h2&gt;

&lt;ul&gt;
    &lt;li&gt;User-controllable CPU/IRQ binding (jhb)&lt;/li&gt;
    &lt;li&gt;User-controllable CPU-thread binding with support for CPU sets (jeffr)&lt;/li&gt;
&lt;/ul&gt;


</description>
  </item>
  <item>
   <title>My CV</title>
   <link>cv2.html</link>
   <description>&lt;p&gt;Name: &lt;b&gt;Ivan Voras&lt;/b&gt;&lt;br/&gt;
Title: &lt;b&gt;dipl.ing. (M.Sc. CSE)&lt;/b&gt;&lt;br/&gt;
Academia: &lt;b&gt;PhD grad student&lt;/b&gt;&lt;br/&gt;
Currently employed: &lt;b&gt;University of Zagreb, Croatia, Faculty of electrical
    engineering and computing (Expert associate, Internet services
    architect)&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;My CV is available on request. I'm usually available for temporary
contracting work in the areas of designing and deploying Unix systems,
system-level programming in C &amp;amp; similar jobs, with some experience
in development team leadership.&lt;/p&gt;

</description>
  </item>
  <item>
   <title>My FreeBSD things</title>
   <link>freebsd/index.html</link>
   <description>&lt;!-- $Id: index.html,v 1.9 2008/05/18 04:57:48 ivoras Exp $ --&gt;
&lt;p&gt;I've come to have so many things related to the FreeBSD project that
I finally went and organised all into one section on the web. On the
downside, the font of the sections' listing is getting smaller and smaller
:)&lt;/p&gt;

&lt;p&gt;This page lists only the smaller projects, patches, etc. - bigger
projects have their own separate pages. See &lt;a href=&quot;../projects/&quot;&gt;here&lt;/a&gt;
for more projects.&lt;/p&gt;

&lt;h2&gt;What's cooking for FreeBSD 8?&lt;/h2&gt;
&lt;p&gt;See &lt;a href=&quot;freebsd8.html&quot;&gt;this page&lt;/a&gt; if you're interested.&lt;/p&gt;

&lt;p&gt;There's also my &lt;a href=&quot;http://blogs.freebsdish.org/ivoras/&quot;&gt;blog
    with FreeBSD-related themes&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Miscellaneous&lt;/h2&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href=&quot;http://www.freebsd.org/doc/en_US.ISO8859-1/articles/geom-class/index.html&quot;&gt;Short tutorial on writing FreeBSD GEOM classes, and on FreeBSD kernel programming in general&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
</description>
  </item>
  <item>
   <title>Encrypted iSCSI device tutorial</title>
   <link>freebsd/iscsi-eli.html</link>
   <description>&lt;p&gt;Suppose you want to use a remote iSCSI device, but you don't exactly trust either the storage or the network in between. Of course, there's a way around it :)&lt;/p&gt;

&lt;p&gt;The setup presented here is very simple and will behave like this:&lt;/p&gt;

&lt;pre&gt;
[iSCSI server] -- encrypted data on the server and over the wire -- [iSCSI client]
&lt;/pre&gt;

&lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; all these instructions are valid for FreeBSD 7.0 - previous versions are probably missing some parts.&lt;/p&gt;

&lt;h2&gt;Setting up an iSCSI target&lt;/h2&gt;

&lt;p&gt;You can skip this section if you already have an iSCSI target (a &quot;target&quot; is where the data is stored, i.e. the &quot;server&quot; node of iSCSI).&lt;/p&gt;

&lt;p&gt;1. Install the &lt;tt&gt;iscsi-target&lt;/tt&gt; port.&lt;/p&gt;

&lt;p&gt;2. Edit &lt;tt&gt;/usr/local/etc/iscsi/targets&lt;/tt&gt; file and add lines similar to the following:&lt;/p&gt;

&lt;pre&gt;
# NAME          DEVICE          START           LENGTH
extent0         /dev/da2        0               5GB
# NAME          ACCESS          STORAGE         NETMASK
target0         rw              extent0         10.0.0.0/24
&lt;/pre&gt;

&lt;p&gt;These lines should be self-explanatory. If you need more help, see &lt;tt&gt;targets(5)&lt;/tt&gt; or &lt;a href=&quot;ftp://ftp.netbsd.org/pub/NetBSD/misc/agc/HOWTO-iSCSI-target.txt&quot;&gt;NetBSD's iscsi-target HOWTO&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;3. Enable iscsi-target in &lt;tt&gt;/etc/rc.conf&lt;/tt&gt; by adding the following line to it:&lt;/p&gt;

&lt;pre&gt;
iscsi_target_enable=&quot;YES&quot;
&lt;/pre&gt;

&lt;p&gt;4. Start the server by running &lt;tt&gt;/usr/local/etc/rc.d/iscsi_target start&lt;/tt&gt;. You should see something like the following outputted to the console:&lt;/p&gt;

&lt;pre&gt;
Starting iscsi_target.
Reading configuration from `/usr/local/etc/iscsi/targets'
target0:rw:10.0.0.0/24
        extent0:/dev/da2:0:5368709120
DISK: 1 logical unit (10485760 blocks, 512 bytes/block), type iscsi fs
DISK: LUN 0: 5120 MB disk storage for &quot;target0&quot;
TARGET: TargetName is iqn.1994-04.org.netbsd.iscsi-target
&lt;/pre&gt;

&lt;h2&gt;Setting up the iSCSI initiator&lt;/h2&gt;

&lt;p&gt;The &quot;initiator&quot; is the client part in iSCSI, and it connects to the server. The following steps should be done on the client system.&lt;/p&gt;

&lt;p&gt;1. Edit &lt;tt&gt;/etc/iscsi.conf&lt;/tt&gt; and add the following lines:&lt;/p&gt;

&lt;pre&gt;
target0 { # nickname
        targetaddress        = 10.0.0.102
        targetname           = iqn.1994-04.org.netbsd.iscsi-target:target0
}
&lt;/pre&gt;

&lt;p&gt;2. Load the &lt;tt&gt;iscsi_initiator&lt;/tt&gt; kernel module with:&lt;/p&gt;

&lt;pre&gt;
# kldload iscsi_initiator
&lt;/pre&gt;

&lt;p&gt;Also, add the following line to &lt;tt&gt;/etc/loader.conf&lt;/tt&gt; to load the module on boot:&lt;/p&gt;

&lt;pre&gt;
iscsi_initiator_load=&quot;YES&quot;
&lt;/pre&gt;

&lt;p&gt;3. Start the iSCSI session by running:&lt;/p&gt;

&lt;pre&gt;
# iscontrol -n target0
&lt;/pre&gt;

&lt;p&gt;Several lines should be output to the console, which should look like the following:&lt;/p&gt;

&lt;pre&gt;
iscontrol[8516]: running
iscontrol[8516]: (pass3:iscsi0:0:0:0):  tagged openings now 0
iscontrol[8516]: cam_open_btl: no passthrough device found at 1:0:1
iscontrol[8516]: cam_open_btl: no passthrough device found at 1:0:2
iscontrol[8516]: cam_open_btl: no passthrough device found at 1:0:3
iscontrol: supervise starting main loop
&lt;/pre&gt;

&lt;p&gt;More importantly, the kernel log (which you can see with &lt;tt&gt;tail /var/log/messages&lt;/tt&gt;) should now contain something similar to this output:&lt;/p&gt;

&lt;pre&gt;
Jan  4 23:17:08 client kernel: da0 at iscsi0 bus 0 target 0 lun 0
Jan  4 23:17:08 client kernel: da0:  Fixed Direct Access SCSI-3 device
&lt;/pre&gt;

&lt;p&gt;This means the device &lt;tt&gt;da0&lt;/tt&gt; has been created - this is the local representation of the remote iSCSI drive.&lt;/p&gt;

&lt;p&gt;3. Set up GEOM_GELI on the new device:&lt;/p&gt;

&lt;pre&gt;
# geli init /dev/da0
&lt;/pre&gt;

&lt;p&gt;The utility will ask you for a passphrase which will be used to encrypt the data. GEOM_ELI (as is the encryption layer known) has many more options, but the defaults are good enough. It will use AES encryption with sane defaults.&lt;/p&gt;

&lt;p&gt;4. Load the GEOM_ELI kernel module:&lt;/p&gt;

&lt;pre&gt;
# kldload geom_eli.ko
&lt;/pre&gt;

&lt;p&gt;Also, add the following to &lt;tt&gt;/boot/loader.conf&lt;/tt&gt; to load the module at boot time:&lt;/p&gt;

&lt;pre&gt;
geom_eli_load=&quot;YES&quot;
&lt;/pre&gt;

&lt;p&gt;5. Attach the encrypted device:&lt;/p&gt;

&lt;pre&gt;
# geli attach /dev/da0
&lt;/pre&gt;

&lt;p&gt;Lines similar to the following should appear in the kernel log:&lt;/p&gt;

&lt;pre&gt;
Jan  4 23:33:28 client kernel: GEOM_ELI: Device da0.eli created.
Jan  4 23:33:28 client kernel: GEOM_ELI: Encryption: AES-CBC 128
Jan  4 23:33:28 client kernel: GEOM_ELI:     Crypto: software
&lt;/pre&gt;

&lt;p&gt;The device &lt;tt&gt;da0.eli&lt;/tt&gt; has been created - this is the end-point device that can be used by file systems and for other purposes (swap, etc.). &lt;/p&gt;

&lt;p&gt;6. Make the file system and mount it!&lt;/p&gt;

&lt;pre&gt;
# newfs -U -L mydata /dev/da0.eli
&lt;/pre&gt;

&lt;p&gt;A successful run of &lt;tt&gt;newfs&lt;/tt&gt; looks something like this:&lt;/p&gt;

&lt;pre&gt;
/dev/da0.eli: 5120.0MB (10485756 sectors) block size 16384, fragment size 2048
        using 28 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
        with soft updates
super-block backups (for fsck -b #) at:
 160, 376512, 752864, 1129216, 1505568, 1881920, 2258272, 2634624, 3010976, 3387328,
 3763680, 4140032, 4516384, 4892736, 5269088, 5645440, 6021792, 6398144,
 6774496, 7150848, 7527200, 7903552, 8279904, 8656256, 9032608, 9408960, 9785312, 
 10161664
&lt;/pre&gt;

&lt;p&gt;Since we used a volume label for the file system, observe the following message in the kernel log:&lt;/p&gt;

&lt;pre&gt;
Jan  4 23:38:17 client kernel: GEOM_LABEL: Label for provider da0.eli is ufs/mydata.
&lt;/pre&gt;

&lt;p&gt;Now you can mount the file system:&lt;/p&gt;

&lt;pre&gt;
# mount /dev/ufs/mydata /mydata
&lt;/pre&gt;

&lt;p&gt;&lt;i&gt;And that's it!&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;There are two points that can't be readily automated right now: the &lt;tt&gt;iscontrol&lt;/tt&gt; step which starts the iSCSI initiator, and the &lt;tt&gt;geli&lt;/tt&gt; requiring a password. The former can be approximated by creating a small shell script that does the step and putting it in &lt;tt&gt;/usr/local/etc/rc.d&lt;/tt&gt; but the second cannot be, since the whole point of having an encrypted storage is that it isn't accessible by unwanted people.&lt;/p&gt;

&lt;p&gt;The way this setup works is that the unencrypted data is used by the file system (as it should - you wouldn't be able to use it otherwise) via the &lt;tt&gt;da0.eli&lt;/tt&gt; device. This data is encrypted and the encrypted data is written to &lt;tt&gt;da0&lt;/tt&gt; device. This is the iSCSI client device and the data is tranferred to the server in its encrypted form. The server and the network never see unencrypted data.&lt;/p&gt;

&lt;p&gt;Due to GEOM's modularity, other components could be added to the data processing graph, such as journaling (gjournal), caching (gcache), etc. in which case the end-point device name will &quot;grow&quot; suffixes, such as &lt;tt&gt;da0.eli.journal&lt;/tt&gt;. Even RAID levels can be added, though it makes little sense to do it on the client (it's perfectly fine on the server).&lt;/p&gt;


</description>
  </item>
  <item>
   <title>FreeBSD gotchas</title>
   <link>freebsd/gotchas.html</link>
   <description>&lt;h2&gt;Apache or PHP crash when PHP is upgraded&lt;/h2&gt;
&lt;p&gt;This is a known bug in PHP which is exposed by certain ordering
of the extensions in extensions.ini. Some of the incompatibilities
are documented on php.net, but most aren't. The bug usualy manifets
on a newly upgraded PHP when the order of loaded extensions is semi-
randomly changed (from a previously working configuration). See
&lt;a href=&quot;http://lists.freebsd.org/pipermail/freebsd-ports/2006-November/036830.html&quot;&gt;this thread&lt;/a&gt;
for some info.&lt;/p&gt;

&lt;h2&gt;Apache parent process misteriously dies with PHP with lots of extensions&lt;/h2&gt;
&lt;p&gt;This one took a lot of time and karma to diagnose. The problem is:
apache suddenly misteriously dies, or is in a weird braindead state
where every new request cuases the child process assigned to serve it
to die.&lt;/p&gt;
&lt;p&gt;It seems that the reason for this is in the way FreeBSD handles threading
libraries. In particular, FreeBSD has three threading libraries that
can be used by any one process (&lt;tt&gt;libc_r&lt;/tt&gt;, &lt;tt&gt;libthr&lt;/tt&gt;, 
&lt;tt&gt;libpthread&lt;/tt&gt;), in addition
to using no threading libraries. As long as a single process uses only
one of these options, all is well. The problem is that any single
library can (erroneously!) bring a &quot;forced&quot; reference to a threading
library, and Bad Things happen to a process that stumbles into such
a situation.&lt;/p&gt;
&lt;p&gt;My problem was that Apache was built with &quot;prefork&quot; mode (no 
threading), and one of the libraries used for PHP was bringing in
&lt;tt&gt;libpthread&lt;/tt&gt;. This conclusion was arrived to by a 
trial-and-error process with
much educated guessing, since backtraces from the core dump didn't
list the library, but it immediately rang a bell - wasn't there a
shiny-looking switch in the process of building PostgreSQL's client 
libraries that said &lt;tt&gt;&quot;build libpq threadsafe&quot;&lt;/tt&gt;? Yes it was. It turns
out that &lt;tt&gt;libpq&lt;/tt&gt; was not only being built threadsafe, it was also
strongly linked to &lt;tt&gt;libpthread.so&lt;/tt&gt;. This is bad, as it caused
Apache to start without threading, then PHP (a DSO module in PHP) 
would load &lt;tt&gt;libpq.so&lt;/tt&gt;, which would load &lt;tt&gt;libpthread.so&lt;/tt&gt;
for that Apache child, which would... somehow... propagate to the
&lt;u&gt;parent&lt;/u&gt; process and cause it to die trying to call 
&lt;tt&gt;_pthread_main_np&lt;/tt&gt; function (for which there's only a
&quot;weak symbol&quot; in &lt;tt&gt;libc&lt;/tt&gt; and the threading libraries override
it with their own implementation). Building &lt;tt&gt;libpq.so&lt;/tt&gt;
without &quot;threadsafe&quot; option fixed this.&lt;/p&gt;

&lt;h2&gt;Apache with PHP or PHP-CGI dies with SIGNAL 11 or SIGNAL 6&lt;/h2&gt;
&lt;p&gt;This error is commonly found after running recursive portupgrade on the
php port. PHP has a long-standing issue with the order in which its
extensions / libraries are loaded. On FreeBSD, this order is specified
in &lt;tt&gt;/usr/local/etc/php/extensions.ini&lt;/tt&gt;. Running portupgrade will
reorder the extensions in an unpredictable way, breaking previously
working installations. The solution is to find out which order of
extensions works and make a backup of &lt;tt&gt;extensions.ini&lt;/tt&gt;.
Searching for &quot;freebsd php extensions problem crash&quot; on Google will
find a lot of references to this problem, and the problem is often
discussed in FreeBSD mailing lists. Apparently this is not a
FreeBSD-specific problem, but it's commonly found here due to the
way portupgrade works.&lt;/p&gt;

</description>
  </item>
  <item>
   <title>What's cooking for FreeBSD 7?</title>
   <link>freebsd/freebsd7.html</link>
   <description>&lt;!-- $Id: freebsd7.html,v 1.74 2008/03/15 12:54:47 ivoras Exp $ --&gt;
&lt;p&gt;The next major release of FreeBSD, version 7, is one of the
most significant so far, with amount of new technologies and
improvement largest since the introduction of 5.0. Since constantly
searching the mailing lists for important changes can be a bit 
tedious, I've created this (frequently updated) page to list
some of the more interesting new things in one place.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.freebsd.org/releases/7.0R/announce.html&quot;&gt;FreeBSD 7.0 has been released!&lt;/a&gt;
I've now started the continuation of this project:
&lt;a href=&quot;freebsd8.html&quot;&gt;What's cooking for FreeBSD 8&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Also useful are the quarterly Status Reports:
&lt;ul&gt;
    &lt;li&gt;&lt;a href=&quot;http://lists.freebsd.org/pipermail/freebsd-current/2007-October/078060.html&quot;&gt;2007 / Q3&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://lists.freebsd.org/pipermail/freebsd-current/2007-July/074772.html&quot;&gt;2007 / Q2&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://lists.freebsd.org/pipermail/freebsd-current/2007-April/070776.html&quot;&gt;2007 / Q1&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://lists.freebsd.org/pipermail/freebsd-current/2007-January/068708.html&quot;&gt;2006 / Q4&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;

&lt;p&gt;If you're interested in how FreeBSD gets developed, you're encouraged to
read the &lt;a href=&quot;http://www.freebsd.org/community/mailinglists.html&quot;&gt;mailing lists&lt;/a&gt;
and &lt;a href=&quot;http://planet.freebsdish.org/complete/&quot;&gt;developer blogs&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Network stack improvements and cleanup&lt;/h2&gt;

&lt;p&gt;Even though this document mentions only several people, the effort
to improve the network stack and its performance has been carried by
&lt;a href=&quot;http://wiki.freebsd.org/200705NetworkCabal&quot;&gt;many&lt;/a&gt;.

&lt;h3&gt;New &lt;tt&gt;sendfile()&lt;/tt&gt; implementation, improved &lt;tt&gt;sosend()&lt;/tt&gt;&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 7.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; Andre Oppermann, Robert Watson&lt;br/&gt;
&lt;b&gt;Homepage:&lt;/b&gt; &lt;a href=&quot;http://people.freebsd.org/~andre/&quot;&gt;http://people.freebsd.org/~andre/&lt;/a&gt;, 
    &lt;a href=&quot;http://docs.freebsd.org/cgi/mid.cgi?17683.63162.919620.114649&quot;&gt;announcement message&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;While working on TSO support, Andre Oppermann has found
several ways to optimize kernel's internal networking support. The new
&lt;tt&gt;sendfile()&lt;/tt&gt; implementation sends larger chunks of data at once
and improves performance up to 5x when used with TSO and other new
enhancements. Improvements to
the &lt;tt&gt;sosend()&lt;/tt&gt; and related functions resulted in lowering the
CPU consumption of sending side of network interfaces almost three
times. Note that these are microbenchmarks and performance 
improvements in real usage still needs to be quantified.&lt;/p&gt;


&lt;h3&gt;TSO and LRO support&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed or ready for -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 7.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; Andre Oppermann and Andrew Gallatin&lt;br/&gt;
&lt;b&gt;Homepage:&lt;/b&gt; &lt;a href=&quot;http://people.freebsd.org/~andre/&quot;&gt;http://people.freebsd.org/~andre/&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;The ongoing effort to improve FreeBSD's network performance
(especially after the hit taken during transition to SMP) has
resulted in the new ability to support TSO (TCP/IP segmentation offload)
and LRO (Large Receive Offload)
hardware on gigabit and faster cards. Some of the drivers
that support TSO include: em, bc, cxgb, ixgbe, msk, mxge, nxge, nfe, re
(or in plain words: Intel, Broadcom, NVidia, Realtek and other
cards, gigabit or better). LRO support is currently in mxge.&lt;/p&gt;


&lt;h3&gt;TCP socket buffers auto-sizing&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Partially committed to -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 7.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; Andre Oppermann&lt;br/&gt;
&lt;b&gt;Homepage:&lt;/b&gt; &lt;a href=&quot;http://people.freebsd.org/~andre/&quot;&gt;http://people.freebsd.org/~andre/&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;FreeBSD has a default 32K send socket buffer.  This supports a maximal
transfer rate of only slightly more than 2Mbit/s on a 100ms RTT trans-
continental link.  Or at 200ms just above 1Mbit/s.  With TCP send buffer
auto scaling and the default values below it supports 20Mbit/s at 100ms
and 10Mbit/s at 200ms. Both read and write buffer are auto-sized.&lt;/p&gt;
&lt;p&gt;While the support for send buffers auto sizing is committed, patches
for receiving side are still under testing.&lt;/p&gt;


&lt;h3&gt;Rapid Spanning Tree Protocol (802.1w)&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 7.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; Andrew Thompson&lt;br/&gt;
&lt;b&gt;Homepage:&lt;/b&gt; &lt;a href=&quot;http://people.freebsd.org/~thompsa/&quot;&gt;http://people.freebsd.org/~thompsa/&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;RSTP provides faster spanning tree convergence. The protocol will exchange
information with neighboring switches to quickly transition to forwarding
without creating loops. The code will default to RSTP mode but will downgrade
any port connected to a legacy STP network so is fully backward compatible.&lt;/p&gt;


&lt;h3&gt;SCTP (Stream Control Transmission Protocol)&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 7.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Authors:&lt;/b&gt; Randall Stewart, George Neville-Neil&lt;br/&gt;
&lt;b&gt;Homepage:&lt;/b&gt; &lt;a href=&quot;http://www.sctp.org/&quot;&gt;http://www.sctp.org/&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;FreeBSD is the reference implementation for the SCTP.&lt;/p&gt;
&lt;p&gt;Like TCP, SCTP provides a reliable transport service, ensuring that
data is transported across the network without error and in sequence.
Like TCP, SCTP is a session-oriented mechanism, meaning that a
relationship is created between the endpoints of an SCTP association
prior to data being transmitted, and this relationship is maintained
until all data transmission has been successfully completed.&lt;/p&gt;
&lt;p&gt;
Unlike TCP, SCTP provides a number of functions that are critical for
telephony signaling transport, and at the same time can potentially
benefit other applications needing transport with additional
performance and reliability. &lt;/p&gt;


&lt;h3&gt;Link aggregation / trunking&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; committed to -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 7.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; Reyk Floeter (from OpenBSD)&lt;br/&gt;
&lt;b&gt;Manpage:&lt;/b&gt; &lt;a href=&quot;http://www.freebsd.org/cgi/man.cgi?query=lagg&quot;&gt;lagg(4)&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;OpenBSD's trunk(4) was imported to FreeBSD in time to be shipped
in FreeBSD 7.0. The trunk interface allows aggregation of multiple network interfaces as
one virtual trunk interface for the purpose of providing fault-tolerance
and high-speed links. The driver currently supports the trunk protocols 
&lt;i&gt;failover&lt;/i&gt; (the default),
&lt;i&gt;fec&lt;/i&gt;, &lt;i&gt;lacp&lt;/i&gt;, &lt;i&gt;loadbalance&lt;/i&gt;, &lt;i&gt;roundrobin&lt;/i&gt;, and &lt;i&gt;none&lt;/i&gt;.&lt;/p&gt;


&lt;h2&gt;Improvements to kernel facilities&lt;/h2&gt;

&lt;h3&gt;PMC performance monitoring&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Available in -CURRENT, partially available in RELENG_6&lt;br/&gt;
&lt;b&gt;Will appear in 7.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; Joseph Koshy&lt;br/&gt;
&lt;b&gt;Homepage:&lt;/b&gt; &lt;a href=&quot;http://people.freebsd.org/~jkoshy/projects/perf-measurement&quot;&gt;http://people.freebsd.org/~jkoshy/projects/perf-measurement&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;This project implements a kernel module (&lt;tt&gt;hwpmc(4)&lt;/tt&gt;), an application programming 
interface (&lt;tt&gt;pmc(3)&lt;/tt&gt;) and a few simple applications (&lt;tt&gt;pmcstat(8)&lt;/tt&gt; and &lt;tt&gt;pmccontrol(8)&lt;/tt&gt;) 
for measuring system performance using event monitoring hardware in modern CPUs.&lt;/p&gt;
&lt;p&gt;Some parts (&lt;tt&gt;hwpmc&lt;/tt&gt;, &lt;tt&gt;libpmc&lt;/tt&gt;, &lt;tt&gt;pmcstat&lt;/tt&gt;) were developed even before 
RELENG_6 was branched and new development goals for 7.x include support for
callgraphs and a GUI front end.&lt;/p&gt;


&lt;h3&gt;Interrupt filtering&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Mostly committed to -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 7.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; Paolo Pisati&lt;br/&gt;
&lt;b&gt;Homepage:&lt;/b&gt; &lt;a href=&quot;http://wiki.freebsd.org/Interrupts&quot;&gt;wiki page&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
   Interrupt filtering is a new method to handle interrupts in FreeBSD
   that retains backward compatibility with the previous models (FAST and
   ITHREAD), while improving over them in some aspects. With interrupt
   filtering, the interrupt handler is divided into 2 parts: the filter
   (that checks if the actual interrupt belongs to a device) and a
   private per-handler ithread (that is scheduled in case some blocking
   work has to be done). The main benefits of this work are:
&lt;ul&gt;
    &lt;li&gt; Feedback from filters (the operating system finally knows what's
       the state of an event and can react consequently).&lt;/li&gt;
    &lt;li&gt; Lower latency/overhead for shared interrupt line.&lt;/li&gt;
    &lt;li&gt; Previous experiments with interrupt filtering showed an increase
       in performance against the plain ithread model in some cases.&lt;/li&gt;
    &lt;li&gt; General shrink of the machine dependent code - part of the
       interrupting handling code was turned into machine independent
       code.&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;


&lt;h3&gt;Linuxulator for Linux 2.6&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 7.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Authors:&lt;/b&gt; Alexander Leidinger, Roman Divacky&lt;br/&gt;
&lt;b&gt;Homepage:&lt;/b&gt; &lt;a href=&quot;http://blogs.freebsdish.org/netchild/2007/01/09/progress-in-the-linuxulator/&quot;&gt;blog post&lt;/a&gt;,
    &lt;a href=&quot;http://lists.freebsd.org/pipermail/cvs-src/2007-January/073665.html&quot;&gt;cvs commit note&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;FreeBSD includes support for natively executing Linux binaries. This is
done via runtime translation of Linux syscalls to BSD syscalls, with no
performance penalty. The facility is colloquially called the &quot;linuxulator&quot;.&lt;/p&gt;
&lt;p&gt;Linuxulator in -CURRENT has been updated to run binaries made for Linux
2.6.16 (though the default for 7.0 will still be 2.4), and the official
Linux environment will be Fedora Core 5.&lt;/p&gt;


&lt;h3&gt;New scheduler: ULE 2.0 / 3.0&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 7.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; Jeff Roberson&lt;br/&gt;
&lt;b&gt;Homepage:&lt;/b&gt; &lt;a href=&quot;http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/sched_ule.c&quot;&gt;CVS file reference&lt;/a&gt;,
&lt;a href=&quot;http://lists.freebsd.org/pipermail/cvs-src/2007-January/073279.html&quot;&gt;commit message&lt;/a&gt;,
&lt;a href=&quot;http://jeffr-tech.livejournal.com/3729.html&quot;&gt;description&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;The original SCHED_ULE was under-performing and buggy, so it got reworked.
The new scheduler replaces, and has the same name as, SCHED_ULE, but is of a
somewhat different architecture. It replaces the double queue mechanism with
circular queues, and fixes a lot of other things, but it's still an O(1) 
scheduler with per-CPU queues.&lt;/p&gt;
&lt;p&gt;During SCHED_ULE 2 development there was a brief period where there was a
third (or fourth, depending on how you count) scheduler, named SCHED_SMP,
forked from SCHED_ULE 2 and heavily optimized for configurations with 
large number of CPUs (8+).
This SCHED_SMP has been renamed and committed as SCHED_ULE. While the new
scheduler will really shine for multi-CPU machines, it's now also recommended
for single processor systems as it has much better interactive performance
(mixing of processes with different requirements for IO vs CPU time). ULE
will not be enabled by default for 7.0 but it's an officially recommended
performance optimization.&lt;/p&gt;


&lt;h3&gt;Improved accounting file format&lt;/h3&gt;

&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 7.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; Diomidis Spinellis&lt;br/&gt;
&lt;b&gt;Manpage:&lt;/b&gt; &lt;a href=&quot;http://www.freebsd.org/cgi/man.cgi?query=acct&quot;&gt;acct(5)&lt;/a&gt;&lt;br/&gt;
&lt;/p&gt;

&lt;p&gt;The accounting record format has been revised to store time values with
microsecond precision.  This allows the recording of meaningful values
for short-running commands on modern fast processors.  The adoption of
the IEEE 754 float format for storing time and usage values greatly
increases their range and precision, and also simplifies the processing
of accounting records by third party tools.  The new record format and
the tools lastcomm(1) and sa(8) maintain backwards compatibility with
the original accounting format.&lt;/p&gt;


&lt;h2&gt;Storage subsystems' improvements&lt;/h2&gt;

&lt;h3&gt;ZFS&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 7.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; Pawel Jakub Dawidek&lt;br/&gt;
&lt;b&gt;Homepage:&lt;/b&gt; &lt;a href=&quot;http://lists.freebsd.org/pipermail/freebsd-current/2006-August/065306.html&quot;&gt;announcement message&lt;/a&gt;,
    &lt;a href=&quot;http://lists.freebsd.org/pipermail/freebsd-current/2007-April/070544.html&quot;&gt;commit announcement message&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;Sun's ZFS is in the process of being ported to FreeBSD, with the
intention of offering most (or all) features found in the original
implementation. It's integrated with FreeBSD's existing features like
UFS and GEOM, thus offering the possibility of creating FreeBSD UFS
file systems on ZFS volumes, and using GEOM providers to host ZFS
file systems.&lt;/p&gt;
&lt;p&gt;ZFS is an advanced file system (actually, a combination of file
system and volume manager) with many interesting features built-in:
snapshots, copy-on-write, dynamic striping and RAID5, up to 128-bit
file system size (limited to 64 bits in practice 
&lt;a href=&quot;http://lists.freebsd.org/pipermail/freebsd-fs/2006-August/002207.html&quot;&gt;even in Solaris&lt;/a&gt; 
- there's no 128-bit integer type in standard C language), and 
globally optimal I/O sorting and aggregation. It's marked
EXPERIMENTAL in 7.0-RELEASE.&lt;/p&gt;
&lt;p&gt;ZFS is still experimental on FreeBSD, and it's recommented that
users get familiar with &lt;a href=&quot;http://wiki.freebsd.org/ZFS&quot;&gt;FreeBSD
ZFS documentation&lt;/a&gt; before using it. For a more light-hearted
introduction see &lt;a href=&quot;http://youtube.com/watch?v=o3TGM0T1CvE&quot;&gt;this
presentation by Pawel&lt;/a&gt;.&lt;/p&gt;


&lt;h3&gt;tmpfs&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 7.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Authors:&lt;/b&gt; Julio M. Merino Vidal, Rohit Jalan, Howard Su, Glen Leeder&lt;br/&gt;
&lt;b&gt;Homepage:&lt;/b&gt; &lt;a href=&quot;http://wiki.freebsd.org/TMPFS&quot;&gt;TMPFS page on FreeBSD wiki&lt;/a&gt;,
    &lt;a href=&quot;http://netbsd-soc.sourceforge.net/projects/tmpfs/&quot;&gt;TMPFS at NetBSD&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;TMPFS is a memory file system designed to efficiently allocate (and
deallocate) memory used for the file system itself, as contrasted to the
&quot;usual&quot; way of creating memory file systems by creating memory storage
devices (&quot;RAM drives&quot;). It's marked EXPERIMENTAL for 7.0-RELEASE.&lt;/p&gt;


&lt;h3&gt;gjournal&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 7.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; Pawel Jakub Dawidek&lt;br/&gt;
&lt;b&gt;Homepage:&lt;/b&gt; &lt;a href=&quot;http://bsdblogs.droso.org/pjd&quot;&gt;http://bsdblogs.droso.org/pjd&lt;/a&gt;,
    &lt;a href=&quot;http://docs.freebsd.org/cgi/mid.cgi?20060619131101.GD1130&quot;&gt;announcement message&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;Gjournal is a GEOM storage class that provides data journaling
facilities to any providers (and consumers) the user needs. As a
special case it has support in UFS file system code, and in this 
combination it makes UFS a journaled file system. In itself,
gjournal consumes two devices (one for the data, one for the
journal) and provides one. Since it takes special care to work
well with disk drive hardware caches, it can be used to accelerate
and provide reliability in many other uses, such as GELI and GBDE
encrypted device providers.&lt;/p&gt;
&lt;p&gt;I'm proud to say current gjournal is a continuation of my idea
implemented for Google's Summer of Code 2005.&lt;/p&gt;


&lt;h3&gt;gvirstor&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 7.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; Ivan Voras&lt;br/&gt;
&lt;b&gt;Homepage:&lt;/b&gt; &lt;a href=&quot;http://wiki.freebsd.org/gvirstor&quot;&gt;http://wikitest.freebsd.org/gvirstor&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;Gvirstor is a GEOM storage class that provides a
storage device of arbitrary size in &quot;overcommit&quot; mode (i.e. larger
than physically available storage). Providers can be
added to the virstor device on-line (while used, e.g. mounted),
and removed if unused and at the end of the list of components.&lt;/p&gt;
&lt;p&gt;This work was created by me, with Pawel Jakub Dawidek as mentor
and sponsored by Google in Summer of Code 2006.&lt;/p&gt;


&lt;h3&gt;gmultipath&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 7.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; Matt Jacob&lt;br/&gt;
&lt;b&gt;Homepage:&lt;/b&gt; &lt;a href=&quot;http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/geom/multipath/g_multipath.c?rev=1.1&amp;content-type=text/x-cvsweb-markup&quot;&gt;CVS message&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;Gmultipath allows failover between multiple
devices that represent the same storage device.
This is an active/passive{/passive...}
arrangement that has no intrinsic internal knowledge of whether devices
it is given are truly multipath devices. As such, this is a simplistic
approach, but still a useful one.
The first of N identical devices (and N *may* be 1!) becomes the active
path until a BIO request is failed with EIO or ENXIO. When this occurs,
the active disk is ripped away and the next in a list is picked to
(retry and) continue with.&lt;/p&gt;


&lt;h2&gt;New platforms&lt;/h2&gt;

&lt;h3&gt;New platform: ARM architecture&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to -CURRENT, MFC-ed to RELENG_6&lt;br/&gt;
&lt;b&gt;Will appear in 7.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Authors:&lt;/b&gt; Olivier Houchard, Warner Losh &amp;amp; more&lt;br/&gt;
&lt;b&gt;Homepage:&lt;/b&gt; &lt;a href=&quot;http://www.freebsd.org/platforms/arm.html&quot;&gt;http://www.freebsd.org/platforms/arm.html&lt;/a&gt;,
    &lt;a href=&quot;http://bsdimp.blogspot.com/&quot;&gt;http://bsdimp.blogspot.com/&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;Support for ARM embedded architecture has been under development since
6.0, enabling FreeBSD presence in the embedded markets.&lt;/p&gt;
&lt;p&gt;The support is now MFC-ed to 6.x and is available in 6.2-RELEASE.
It's still under development and will likely support more boards in the
future.&lt;/p&gt;


&lt;h3&gt;New platform: sun4v (Niagara / T1)&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 7.0:&lt;/b&gt; probably&lt;br/&gt;
&lt;b&gt;Authors:&lt;/b&gt; Kip Macy, John Birrell &amp;amp; more&lt;br/&gt;
&lt;b&gt;Homepage:&lt;/b&gt; &lt;a href=&quot;http://docs.freebsd.org/cgi/mid.cgi?20061005072924.GA86424&quot;&gt;CVS announcement&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;There's still a long way to fully supporting Sun's Niagara/sun4v platform,
but progress is slowly being made. Niagara offers advanced features such as 
eight cores and 32 threads per CPU, and hardware public key cryptography
acceleration. Unfortunately, this architecture is not supported out-of-the-box
in 7.0.&lt;/p&gt;

&lt;h2&gt;Security features&lt;/h2&gt;

&lt;h3&gt;Security event auditing&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to -CURRENT, MFC-ed to RELENG_6&lt;br/&gt;
&lt;b&gt;Will appear in 7.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Authors:&lt;/b&gt; Robert Watson &amp;amp; more&lt;br/&gt;
&lt;b&gt;Homepage:&lt;/b&gt; &lt;a href=&quot;http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/audit.html&quot;&gt;http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/audit.html&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;Event auditing allows the reliable, fine-grained, and configurable 
logging of a variety of security-relevant system events, including logins, 
configuration changes, and file and network access. These log records 
can be invaluable for live system monitoring, intrusion detection, and 
postmortem analysis. FreeBSD implements Sun's published BSM API and file 
format, and is interoperable with both Sun's Solaris and Apple's 
Mac OS X audit implementations.&lt;/p&gt;
&lt;p&gt;Audit framework was MFC-ed to RELENG_6 and is available in 6.2-RELEASE.&lt;/p&gt;


&lt;h3&gt;New privilege separation capabilities&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 7.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; Robert Watson&lt;br/&gt;
&lt;b&gt;Homepage:&lt;/b&gt; &lt;a href=&quot;http://lists.freebsd.org/pipermail/freebsd-arch/2006-October/005705.html&quot;&gt;list announcement&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;This is a framework which can be used together with MAC
to creating policies similar to RBAC (as seen in Solaris &amp;amp; others)
which allow the root privilege to be separated into several fine 
grained capabilities such as &quot;can access the network&quot; or &quot;can bypass 
file system quotas&quot;. This is work in progress and no shipped
policy modules directly implement all of the functionality yet.&lt;/p&gt;


&lt;h2&gt;Multimedia features&lt;/h2&gt;

&lt;h3&gt;Hi-def audio&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Mostly committed to -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 7.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; Ariff Abdullah&lt;br/&gt;
&lt;b&gt;Homepage:&lt;/b&gt; &lt;a href=&quot;http://people.freebsd.org/~ariff/HDA/&quot;&gt;http://people.freebsd.org/~ariff/HDA/&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;Newly developed driver, &lt;tt&gt;snd_hda&lt;/tt&gt; has been developed to 
support professional sound equipment and new hardware on the
market. HDA hardware is capable of delivering 192 kHz/32 bit 
quality for two and 96 kHz/32 bit for up to eight channels.
Latency has been reduced for many cases.&lt;/p&gt;
&lt;p&gt;Related to this, new drivers for envy24(ht) sound hardware
is committed to -CURRENT, and multichannel audio support is due
to be finished soon.&lt;/p&gt;


&lt;h2&gt;Userland enhancements&lt;/h2&gt;

&lt;h3&gt;jemalloc&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt; Committed to -CURRENT&lt;br/&gt;
&lt;b&gt;Will appear in 7.0:&lt;/b&gt; sure&lt;br/&gt;
&lt;b&gt;Author:&lt;/b&gt; Jason Evans&lt;br/&gt;
&lt;b&gt;Homepage:&lt;/b&gt; &lt;a href=&quot;http://people.freebsd.org/~jasone/jemalloc/&quot;&gt;http://people.freebsd.org/~jasone/jemalloc/&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;The currently used &lt;tt&gt;malloc()&lt;/tt&gt; library, called &lt;em&gt;phkmalloc&lt;/em&gt;
since its creator is Poul-Henning Kamp, is almost a decade old in
its present implementation. It was designed for a time when memory
was scarce, the priorities considered in memory allocation were
different, and multithreading was still an academic idea. Even so, it's 
one of the more popular malloc() implementations, used in all BSDs 
and even some Linux distributions.&lt;/p&gt;
&lt;p&gt;Because of its inefficiency when used in multithreaded applications
running on multiprocessor systems, a new userland memory allocator was
created, named &lt;em&gt;jemalloc&lt;/em&gt; after Jason Evans, its creator. The
improvements in computer speed and memory availability mean that
compared to phkmalloc, which only needed to be conservative in memory
usage, jemalloc needed to be more sophisticated and account for
low-level properties such as CPU cache locality and parallel execution.&lt;/p&gt;
&lt;p&gt;The result is an allocator which is optimized for multithreading,
using multiple allocation arenas to help concurrency. On single
processor systems there's only one arena, while on multi-processor
or multi-core systems there are four times as many arenas as there
are processors. Allocations are divided into broad classes based on 
their size and those classes are further subdivided. Benchmarks show
that &lt;em&gt;jemalloc&lt;/em&gt; does significantly better in multithreaded
applications (like MySQL) and for applications that make many small
allocations.&lt;/p&gt;


&lt;h2&gt;Bits &amp; pieces&lt;/h2&gt;
&lt;b&gt;Authors:&lt;/b&gt; many
&lt;/p&gt;

&lt;p&gt;Here are some additional changes for 7.0 that are not so
glamorous or are smaller in scope:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Lots of performance improvements on SMP machines (see
        &lt;a href=&quot;http://people.freebsd.org/~jeff/sysbench.png&quot;&gt;MySQL read performance&lt;/a&gt;,
        &lt;a href=&quot;http://people.freebsd.org/~jeff/mysqlwrite.png&quot;&gt;MySQL write performance&lt;/a&gt; and
        &lt;a href=&quot;http://obsecurity.dyndns.org/bind-resperf.png&quot;&gt;BIND performance&lt;/a&gt;
        graphs.)&lt;/li&gt;
    &lt;li&gt;Significantly increased scalability on SMP machines, mainly from
        extraordinary work done by David Xu (the libthr threading library),
        &lt;a href=&quot;http://jeffr-tech.livejournal.com/&quot;&gt;Jeff Roberson&lt;/a&gt;
        (scheduler, flock locking), Atillio Rao (improved
        kernel locking performance) and Robert Watson (file descriptor locking,
        unix sockets locking and more).&lt;/li&gt;
        &lt;li&gt;Significantly increased 
        &lt;a href=&quot;http://www.watson.org/~robert/freebsd/netperf/freebsd7.txt&quot;&gt;network scalability&lt;/a&gt;,
        resulting mostly from switch
        to direct dispatch of the network stack from netisr. This is 
        especially helpful for 10 Gbit/s NICs and was mainly done by
        Robert Watson and Kip Macy.&lt;/li&gt;
    &lt;li&gt;GIANT lock has been pushed further back, and almost all kernel
        subsystems are now finely locked (e.g. VM, VFS, Net). 
        Some of the recent improvements are: locking the CAM subsystem
        and many SCSI drivers (by Scott Long), and similar
        locking work has been done on the NFS client and the Firewire 
        implementation.&lt;/li&gt;
    &lt;li&gt;iSCSI initiator (iSCSI target is available in ports)&lt;/li&gt;
    &lt;li&gt;SATA support&lt;/li&gt;
    &lt;li&gt;Read-only access to XFS file systems&lt;/li&gt;
    &lt;li&gt;Added support for MSI/MSI-X extensions to PCI&lt;/li&gt;
    &lt;li&gt;Support for Apple (Mac) hardware is being worked on&lt;/li&gt;
    &lt;li&gt;pf firewall updated to 4.1&lt;/li&gt;
    &lt;li&gt;X.Org 7.2 - things like beryl now work if you have the right
        drivers&lt;/li&gt;
    &lt;li&gt;gcc 4.2&lt;/li&gt;
    &lt;li&gt;Implemented symbol versioning for many base OS libraries&lt;/li&gt;
    &lt;li&gt;&lt;tt&gt;libthr&lt;/tt&gt; becomes the default threading library&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Things that didn't make it&lt;/h2&gt;
&lt;p&gt;Despite plans and best efforts, some things won't make it into FreeBSD 7.
These are:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;b&gt;SCHED_CORE&lt;/b&gt; - Doesn't perform as well as SCHED_ULE2&lt;/li&gt;
    &lt;li&gt;&lt;b&gt;DTrace&lt;/b&gt; - Licensing issues in some Sun's header files
    are preventing inclusion of DTrace in FreeBSD.&lt;/p&gt;
    &lt;li&gt;&lt;b&gt;Superpages&lt;/b&gt; - Not developed in time to go into 7.0-RELEASE&lt;/li&gt;
&lt;/ul&gt;


&lt;hr&gt;
&lt;p&gt;Of course, this much new technology will need much testing before it's
ready for use. You can help by installing a snapshot of -CURRENT and
running it on as close to your regular load as possible. Disable debugging
features (which are enabled by default during development) before
benchmarking.&lt;/p&gt;

</description>
  </item>
  <item>
   <title>Predictions of future</title>
   <link>musings/index.html</link>
   <description>&lt;p&gt;It's fun to pretend to predict future events and environments, if only
so we can laugh when the predictions turn out to be wrong and much more
quaint than the real thing. So, here are my predictions. I don't want to
be overly optimistic and put the predictions too near &quot;our time&quot;, so let's
say they are targeted for about 20 years from now (beginning of 2008.) though
some of them may be realized even 10 years from now. Here's the list:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Microsoft will sell cars, or car parts, or fridges. Something
    &quot;classical&quot;.&lt;/li&gt;
    &lt;li&gt;Dell is the new Apple.&lt;/li&gt;
    &lt;li&gt;Google is the new Microsoft. Some FutureTech Company is threatening
    the long and obnoxious rule of Google.&lt;/li&gt;
    &lt;li&gt;The concept of paying for bandwidth instead of content is relegated
    to the history books and looks like something from third-world nations in
    Africa.&lt;/li&gt;
    &lt;li&gt;Computers without always-online Internet connectivity will be
    almost useless to the &quot;common man&quot;, though there will always be a core
    of a culture of &quot;old-fashioned&quot; users that want total control over
    their data (probably evolving from the today's OpenBSD and Crypto nut
    communities). The &quot;old-fashioned&quot; applications that deal only with
    local data will stagnate, simply because there's nothing new to invent
    there (the last real inventions in desktop apps happened in Xerox some
    decades ago: the mouse and WYSIWYG editors).&lt;/li&gt;
    &lt;li&gt;A small percentage of &quot;global warming&quot; and other &quot;sky is falling&quot;
    theories happen. We'll probably lose Venice, but people will continue
    to live their lives without major interruptions. Possible future
    &quot;sky is falling&quot; theories include meteor hits and WW3.&lt;/li&gt;
    &lt;li&gt;USA and Russia are constantly attempting to start another 
    Cold War but nobody cares.&lt;/li&gt;
&lt;/ul&gt;
</description>
  </item>
  <item>
   <title>FreeBSD 7 Footshooters</title>
   <link>freebsd/freebsd7-nags.html</link>
   <description>&lt;p&gt;This page will contain a list of (relatively) small annoyances and issues
present in FreeBSD 7 (and possibly earlier versions), with the purpose of
forewarning and helping others that have stumbled on the same problems as I
have. These are nothing special and some of them may be documented elsewhere.&lt;/p&gt;

&lt;h2&gt;tmpfs and fstab&lt;/h2&gt;
&lt;p&gt;If you mechanically add &quot;2&quot; to the end of fstab lines (fsck pass#), you'll
get a big surprise the next time you reboot the machine if you try to add
tmpfs to the list, or change the entry from md-based /tmp to tmpfs. The problem
is that there's no fsck for tmpfs so when the machine boots, it will try
to check the file system, will fail and stop the boot process. The solution
is to simply change the &quot;2&quot; to &quot;0&quot;.&lt;/p&gt;

&lt;h2&gt;SCTP depends on IPv6&lt;/h2&gt;
&lt;p&gt;You can't build a kernel with SCTP option but without IPV6 option, so remove it
together with IPV6.&lt;/p&gt;

&lt;h2&gt;ZFS manipulation needs writable /boot&lt;/h2&gt;
&lt;p&gt;Modifying zpools and zfs (e.g. adding devices to zpools) needs to be done
with /boot/zfs directory writable. Since /boot is usually on the root file system,
the root partition needs to be writable. This is important in single user
mode where the root file system is mounted read-only. After mounting it rw,
and before starting ZFS with &lt;tt&gt;/etc/rc.d/zfs start&lt;/tt&gt;, hostid must be
initialized with &lt;tt&gt;/etc/rc.d/hostid start&lt;/tt&gt;. Failure to have /boot
writable while changing zfs structure will result in a panic when ZFS
is started &quot;regularily&quot; the next time. This
can be fixed by deleting &lt;tt&gt;zpool.cache&lt;/tt&gt; from /boot/cache and performing
&lt;tt&gt;zfs import&lt;/tt&gt;. Failure to initilize hostid will result in ZFS file
system(s) not being present the next time ZFS is started, which can be fixed
by &lt;tt&gt;zfs import -f&lt;/tt&gt;.&lt;/p&gt;

&lt;h2&gt;Compiler flag -Os might produce bad code&lt;/h2&gt;
&lt;p&gt;There have been many reports, and my own experience supports them, that
using &lt;tt&gt;gcc -Os&lt;/tt&gt; flag (optimize for smaller code) sometimes produces
bad code. The symptoms vary wildly over architectures and flag combinations,
so that a system that appears to be working fine might have subtle bugs lurking
to be discovered in the most inconvenient time.
This affects both the kernel and the userland. The compiler in FreeBSD 7.0
is gcc 4.2.1. This might be fixed in the future by importing a newer version
of the compiler, but don't assume it's happened if you need the flag.&lt;/p&gt;

&lt;h2&gt;ZFS is only experimental&lt;/h2&gt;
&lt;p&gt;ZFS (the file system) is an experimental feature in FreeBSD. Don't
even try using it before &lt;a href=&quot;http://wiki.freebsd.org/ZFSTuningGuide&quot;&gt;proper
tuning&lt;/a&gt;.&lt;/p&gt;
</description>
  </item>
  <item>
   <title>Conferences</title>
   <link>conferences.html</link>
   <description>&lt;!-- $Id: conferences.html,v 1.11 2007/11/17 15:55:06 ivoras Exp $ --&gt;
&lt;p&gt;I was present and presented the following papers (or gave named
lectures) at various conferences:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;&lt;i&gt;BSDCan 2007 Developers' Summit talk about &lt;a href=&quot;http://wiki.freebsd.org/finstall&quot;&gt;finstall&lt;/a&gt;&lt;/i&gt;: 
        &lt;a href=&quot;freebsd/ivoras_finstall.pdf&quot;&gt;ivoras_finstall.pdf&lt;/a&gt;
        (&lt;a href=&quot;http://www.bsdcan.org/&quot;&gt;BSDCan&lt;/a&gt;)&lt;/li&gt;
    &lt;li&gt;&lt;i&gt;BSDCan 2007 Developers' Summit talk about &lt;a href=&quot;http://wiki.freebsd.org/gvirstor&quot;&gt;gvirstor&lt;/a&gt;&lt;/i&gt;: 
        &lt;a href=&quot;freebsd/ivoras_finstall.pdf&quot;&gt;ivoras_gvirstor.pdf&lt;/a&gt;
        (&lt;a href=&quot;http://www.bsdcan.org/&quot;&gt;BSDCan&lt;/a&gt;)&lt;/li&gt;
    &lt;li&gt;&lt;i&gt;Network Distributed File System in User Space&lt;/i&gt;
        &lt;a href=&quot;papers/tdfs.pdf&quot;&gt;tdfs.pdf&lt;/a&gt; 
        (&lt;a href=&quot;http://iti.srce.hr/&quot;&gt;ITI 2006.&lt;/a&gt;).&lt;/li&gt;
    &lt;li&gt;&lt;i&gt;A hierarchical file system interface to database-based 
        content management application&lt;/i&gt; &lt;a href=&quot;papers/ferwebdav.pdf&quot;&gt;ferwebdav.pdf&lt;/a&gt;
        (&lt;a href=&quot;http://iti.srce.hr/&quot;&gt;ITI 2006.&lt;/a&gt;).&lt;/li&gt;
    &lt;li&gt;&lt;i&gt;On recording and presentation of measurement data 
        acquired via web services&lt;/i&gt; &lt;a href=&quot;papers/webservicesdata.pdf&quot;&gt;webservicesdata.pdf&lt;/a&gt; 
    (&lt;a href=&quot;http://www.mipro.hr/&quot;&gt;MIPRO 2006)&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;i&gt;Integracija Jabber sustava u CMS&lt;/i&gt; 
        &lt;a href=&quot;DORS2006_Jabber.pdf&quot;&gt;DORS2006_Jabber.pdf&lt;/a&gt; 
        (&lt;a href=&quot;http://www.open.hr/dc2006/&quot;&gt;DORS/CLUC 2006.&lt;/a&gt;)&lt;/li&gt;
    &lt;li&gt;&lt;i&gt;A WebDAV view of FER's Content Management System&lt;/i&gt;
        &lt;a href=&quot;ivoras_ferweb-webdav2.pdf.gz&quot;&gt;ivoras_ferweb-webdav2.pdf.gz&lt;/a&gt;
        (&lt;a href=&quot;http://www.carnet.hr/CUC&quot;&gt;CUC 2005&lt;/a&gt;)&lt;/li&gt;
    &lt;li&gt;&lt;i&gt;Distribuding a Web-based Content Management system&lt;/i&gt; 
        &lt;a href=&quot;papers/distribferweb_iti.pdf&quot;&gt;distribferweb_iti.pdf&lt;/a&gt; 
        (&lt;a href=&quot;http://iti.srce.hr/&quot;&gt;ITI&lt;/a&gt; 2005)&lt;/li&gt;
    &lt;li&gt;&lt;i&gt;WebDAV u uredskom okruženju&lt;/i&gt; &lt;a href=&quot;papers/webdav.pdf&quot;&gt;webdav.pdf&lt;/a&gt;
        (&lt;a href=&quot;http://www.open.hr/article.php?10.255&quot;&gt;DORS&lt;/a&gt; 12, 2005)&lt;/li&gt;
    &lt;li&gt;&lt;i&gt;FreeBSD 5.2&lt;/i&gt; &lt;a href=&quot;papers/freebsd52.pdf&quot;&gt;freebsd52.pdf&lt;/a&gt; 
        (DORS 11, 2004)&lt;/li&gt;
	&lt;li&gt;&lt;i&gt;Kako ubrzati PHP program&lt;/i&gt; &lt;a href=&quot;ubrzatiphp.pdf&quot;&gt;ubrzatiphp.pdf&lt;/a&gt;
        (DORS X, 2003)&lt;/li&gt;
	&lt;li&gt;&lt;i&gt;FreeBSD 5 - Čiji je Unix dulji&lt;/i&gt; &lt;a href=&quot;freebsdlinux.pdf&quot;&gt;freebsdlinux.pdf&lt;/a&gt;
        (CLUC V, 2003)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Except if otherwise specified, these documents are for personal use only.
No printing, lecturing or distribuding them is allowed, or any other use
for commercial purposes is allowed without written consent from the Author.&lt;/p&gt;

&lt;p&gt;Osim ako nije drugačije naznačeno, dokumenti se smiju koristiti samo za
osobne potrebe. Nije dozvoljeno umnažanje, prezentiranje ili korištenje u
komercijalne svrhe bez pismene dozvole autora.&lt;/p&gt;

</description>
  </item>
  <item>
   <title>S e a r c h</title>
   <link>search.html</link>
   <description>&lt;!-- SiteSearch Google --&gt;
&lt;form method=&quot;get&quot; action=&quot;http://ivoras.sharanet.org/search.html&quot; target=&quot;_top&quot;&gt;
&lt;table border=&quot;0&quot; bgcolor=&quot;#ffffff&quot;&gt;
&lt;tr&gt;&lt;td nowrap=&quot;nowrap&quot; valign=&quot;top&quot; align=&quot;left&quot; height=&quot;32&quot;&gt;
&lt;a href=&quot;http://www.google.com/&quot; style=&quot;border: 0px white&quot;&gt;
&lt;img src=&quot;http://www.google.com/logos/Logo_25wht.gif&quot; border=&quot;0&quot; alt=&quot;Google&quot; align=&quot;middle&quot; style=&quot;border: 0px white&quot;&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/td&gt;
&lt;td nowrap=&quot;nowrap&quot;&gt;
&lt;input type=&quot;hidden&quot; name=&quot;domains&quot; value=&quot;ivoras.sharanet.org&quot;&gt;&lt;/input&gt;
&lt;label for=&quot;sbi&quot; style=&quot;display: none&quot;&gt;Enter your search terms&lt;/label&gt;
&lt;input type=&quot;text&quot; name=&quot;q&quot; size=&quot;31&quot; maxlength=&quot;255&quot; value=&quot;&quot; id=&quot;sbi&quot;&gt;&lt;/input&gt;
&lt;label for=&quot;sbb&quot; style=&quot;display: none&quot;&gt;Submit search form&lt;/label&gt;
&lt;input type=&quot;submit&quot; name=&quot;sa&quot; value=&quot;Search&quot; id=&quot;sbb&quot;&gt;&lt;/input&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td nowrap=&quot;nowrap&quot;&gt;
&lt;table&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;input type=&quot;radio&quot; name=&quot;sitesearch&quot; value=&quot;&quot; id=&quot;ss0&quot;&gt;&lt;/input&gt;
&lt;label for=&quot;ss0&quot; title=&quot;Search the Web&quot;&gt;&lt;font size=&quot;-1&quot; color=&quot;#000000&quot;&gt;Web&lt;/font&gt;&lt;/label&gt;&lt;/td&gt;
&lt;td&gt;
&lt;input type=&quot;radio&quot; name=&quot;sitesearch&quot; value=&quot;ivoras.sharanet.org&quot; checked id=&quot;ss1&quot;&gt;&lt;/input&gt;
&lt;label for=&quot;ss1&quot; title=&quot;Search ivoras.sharanet.org&quot;&gt;&lt;font size=&quot;-1&quot; color=&quot;#000000&quot;&gt;ivoras.sharanet.org&lt;/font&gt;&lt;/label&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;input type=&quot;hidden&quot; name=&quot;client&quot; value=&quot;pub-5720255218574527&quot;&gt;&lt;/input&gt;
&lt;input type=&quot;hidden&quot; name=&quot;forid&quot; value=&quot;1&quot;&gt;&lt;/input&gt;
&lt;input type=&quot;hidden&quot; name=&quot;channel&quot; value=&quot;8965453374&quot;&gt;&lt;/input&gt;
&lt;input type=&quot;hidden&quot; name=&quot;ie&quot; value=&quot;UTF-8&quot;&gt;&lt;/input&gt;
&lt;input type=&quot;hidden&quot; name=&quot;oe&quot; value=&quot;UTF-8&quot;&gt;&lt;/input&gt;
&lt;input type=&quot;hidden&quot; name=&quot;flav&quot; value=&quot;0000&quot;&gt;&lt;/input&gt;
&lt;input type=&quot;hidden&quot; name=&quot;sig&quot; value=&quot;lGh-bTaqRMhqXdXs&quot;&gt;&lt;/input&gt;
&lt;input type=&quot;hidden&quot; name=&quot;cof&quot; value=&quot;GALT:#E9382F;GL:1;DIV:#CCCCCC;VLC:7E3939;AH:center;BGC:FFFFFF;LBGC:FF3333;ALC:E9382F;LC:E9382F;T:000000;GFNT:7E3939;GIMP:7E3939;FORID:11&quot;&gt;&lt;/input&gt;
&lt;input type=&quot;hidden&quot; name=&quot;hl&quot; value=&quot;en&quot;&gt;&lt;/input&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/form&gt;
&lt;!-- SiteSearch Google --&gt;


&lt;!-- results --&gt;
&lt;!-- Google Search Result Snippet Begins --&gt;
&lt;div id=&quot;googleSearchUnitIframe&quot;&gt;&lt;/div&gt;

&lt;script type=&quot;text/javascript&quot;&gt;
    var googleSearchIframeName = 'googleSearchUnitIframe';
    var googleSearchFrameWidth = 480;
    var googleSearchFrameborder = 0 ;
    var googleSearchDomain = 'www.google.hr';
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
     src=&quot;http://www.google.com/afsonline/show_afs_search.js&quot;&gt;
&lt;/script&gt;
&lt;!-- Google Search Result Snippet Ends --&gt;



&lt;!-- ads --&gt;

&lt;script language=&quot;JavaScript&quot;&gt;
/*    hide_ads = true; */
&lt;/script&gt;


&lt;div style=&quot;margin-top:20px; text-align: center&quot;&gt;
&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-5720255218574527&quot;;
google_ad_width = 110;
google_ad_height = 32;
google_ad_format = &quot;110x32_as_rimg&quot;;
google_cpa_choice = &quot;CAAQ463zzwEaCH20f7pPcGBpKLPGvnU&quot;;
google_ad_channel = &quot;0903802332&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;
&lt;/div&gt;

&lt;div style=&quot;margin-top:5px; text-align: center&quot;&gt;
&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-5720255218574527&quot;;
google_ad_width = 110;
google_ad_height = 32;
google_ad_format = &quot;110x32_as_rimg&quot;;
google_cpa_choice = &quot;CAAQreH-gwIaCEPOWY2-mLNiKLm_2IcB&quot;;
google_ad_channel = &quot;9887071407&quot;;
//--&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;
&lt;/div&gt;

</description>
  </item>
  <item>
   <title>Tree macro tutorial</title>
   <link>freebsd/usetree.html</link>
   <description>&lt;p&gt;BSD systems include macros for several useful structures and algorithms,
including several types of &lt;a href=&quot;http://www.freebsd.org/cgi/man.cgi?query=queue&quot;&gt;lists&lt;/a&gt;
and &lt;a href=&quot;http://www.freebsd.org/cgi/man.cgi?query=tree&quot;&gt;trees&lt;/a&gt;. 
While the lists are easy to use, I always forget the right order of
declarations for trees. So here it is, how to use tree macros in FreeBSD
(C language):&lt;/p&gt;

&lt;p&gt;First, declare the structure that is to be stored in the tree:
&lt;pre&gt;
    struct mydata {
        RB_ENTRY(mydata) linkage;
        int payload;
    };
&lt;/pre&gt;
Second, declare the comparison function. This function compares two
structures in the way similar to &lt;tt&gt;strcmp()&lt;/tt&gt;:
&lt;pre&gt;
    static int mydata_cmp(struct mydata *e1, struct mydata *e2) {
        return e2-&amp;gt;payload - e1-&amp;gt;payload;
    }
&lt;/pre&gt;
Next, declare the head structure and head entry. Head structure is the
struct type of the tree head, and it's the way tree is accessed.
&lt;pre&gt;
    RB_HEAD(mydata_entries, mydata) head = RB_INITIALIZER(&amp;amp;head);
&lt;/pre&gt;
You're now ready to declare the prototypes for the internal tree
structures and the functions themselves:
&lt;pre&gt;
    RB_PROTOTYPE(mydata_entries, mydata, linkage, mydata_cmp);
    RB_GENERATE(mydata_entries, mydata, linkage, mydata_cmp);
&lt;/pre&gt;
&lt;/p&gt;

&lt;p&gt;The tree can now be used normally, the way described in the manual:
&lt;pre&gt;
    struct mydata *data;
    RB_INSERT(mydata_entries, &amp;amp;head, data);

    struct mydata find;
    find.payload = 42;
    data = RB_FIND(mydata_entries, &amp;amp;head, &amp;amp;find);

    RB_FOREACH(data, mydata_entries, &amp;amp;head)
        printf(&quot;%d\n&quot;, data-&amp;gt;payload);
&lt;/pre&gt;
&lt;/p&gt;

&lt;p&gt;In the examples above:
&lt;ul&gt;
    &lt;li&gt;&lt;tt&gt;mydata&lt;/tt&gt; is the structure to be stored in the tree.
        It contains some arbitrary payload data but must contain
        an TREE_ENTRY element.&lt;/li&gt;
    &lt;li&gt;&lt;tt&gt;mydata_entries&lt;/tt&gt; is the type that contains the tree.
        It's declared by the RB_HEAD macro.&lt;/li&gt;
    &lt;li&gt;&lt;tt&gt;head&lt;/tt&gt; is the tree head.
&lt;/ul&gt;
&lt;/p&gt;
</description>
  </item>
  <item>
   <title>Papers</title>
   <link>papers/papers.html</link>
   <description>&lt;h2&gt;Academic/scientific papers&lt;/h2&gt;
&lt;table width=&quot;100%&quot;&gt;
    &lt;tr&gt;&lt;th&gt;Title&lt;/th&gt;&lt;th&gt;Abstract&lt;/th&gt;&lt;th&gt;Event&lt;/th&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;&lt;i&gt;&lt;a href=&quot;p2pdb.pdf&quot;&gt;A distributed system for data storage and retrieval&lt;/a&gt;&lt;/i&gt; (in&amp;nbsp;Croatian)&lt;/td&gt;
        &lt;td&gt;This work studies technologies applied in building distributed peer-to-peer network systems for data storage and retrieval. These systems consist of arbitrary number of network nodes connected on a higher layer and their connectivity is not influenced by physical topologies of networks of which they are a part of - they form &quot;overlay networks.&quot; All nodes in a peer-to-peer overlay network have equal functionality (there are no &quot;server nodes&quot;). This equality of nodes presents some unique problems: mutual discovery of active nodes and varied connectivity as nodes join and depart the network. Various solutions for these problems are presented and evaluated and an architecture for a peer-to-peer system is proposed. The proposed system uses TCP/IP protocols for inter-node communication and allows storage and retrieval of data records in the form of dictionaries (mappings). A prototype of the system is implemented in Java programming language, and technical and user documentation is provided in this work.&lt;/td&gt;
        &lt;td&gt;dipl.ing. thesis&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;&lt;i&gt;&lt;a href=&quot;tdfs.pdf&quot;&gt;Network Distributed File System in User Space&lt;/a&gt;&lt;/i&gt;&lt;/td&gt;
        &lt;td&gt;File systems have traditionally been implemented in the operating system's kernel to ensure maximum possible speed and integration with the rest of the operating system, and this was true even for network file systems such as NFS. However, available CPU power on mainstream architectures continues to increase daily at a rate which is not closely followed by speed of computer network equipment. When considering development of network-distributed file systems today it becomes clear that speed improvements offered by pure kernel-side implementations are no longer significant given the bandwidth and latencies of computer networks. Recent efforts in enabling user-space file system implementations on free / open source Unix-like operating systems have made it possible to create a solution for distributing file system data over computer networks entirely in user-space. In this work we present such a solution - the Trivially Distributed File System.&lt;/td&gt;
        &lt;td&gt;ITI 2006&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;&lt;i&gt;&lt;a href=&quot;ferwebdav.pdf&quot;&gt;A hierarchical file system interface to database-based content management application&lt;/a&gt;&lt;/i&gt;&lt;/td&gt;
        &lt;td&gt;When considering the usability of computer applications one, of the most important factors is the interface they provide for data manipulation. Historically, though each application has defined it's own user interface, some types of interfaces have emerged as most applicable for certain types of data. Over time, some applications (or types of applications) have gained enough popularity that they became ubiquitous and well-known to most computer users to the extent that users consider them the norm, and as such, optimal for their daily tasks. In this paper we present an idea and implemented method of exposing data from a web content management system in the form of hierarchical file system, manageable and editable by usual file management and office application tools.&lt;/td&gt;
        &lt;td&gt;ITI 2006&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;&lt;i&gt;&lt;a href=&quot;webservicesdata.pdf&quot;&gt;On recording and presentation of measurement data acquired via web services&lt;/a&gt;&lt;/i&gt;&lt;/td&gt;
        &lt;td&gt;Web services have greatly eased exchange of data, but the usage of web services carries its own specific downsides as well as advantages.  Most notable of these are latency of  transmission  and  reliability  of   server equipment. In this work a straightforward  solution  for  distribution and representation of measurement data was created. This solution is comprised  of two parts: a back end process which communicates with the data source via  a web service protocol based on XML (in  Python  language),  and  a  front-end module for  the  FERweb  Content management  system  (in  PHP  language).  These  processes communicate asynchronously via the database.&lt;/td&gt;
        &lt;td&gt;MIPRO 2006&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;&lt;i&gt;&lt;a href=&quot;distribferweb_iti.pdf&quot;&gt;Distributing Web-based Content Management System - &quot;FERweb&quot;&lt;/a&gt;&lt;/i&gt;&lt;/td&gt;
        &lt;td&gt;This work explores various ways of distributing the FERweb CMS system (a web-based Content Management System of the University of Zagreb, Faculty of Electrical engineering and computing) 
            Primary aim of this project is enhancing the performance of the system, within the constraint that the efforts must be based on existing technologies used in the project and with minimal impact on the existing code.&lt;/td&gt;
        &lt;td&gt;ITI 2005&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
        

&lt;h2&gt;General papers&lt;/h2&gt;

&lt;table width=&quot;100%&quot;&gt;
    &lt;tr&gt;&lt;th&gt;Title&lt;/th&gt;&lt;th&gt;Date&lt;/th&gt;&lt;th&gt;Abstract&lt;/th&gt;&lt;/tr&gt;

    &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;switch-complexity.pdf&quot;&gt;On implementation of &lt;tt&gt;switch()..case&lt;/tt&gt; in gcc&lt;/a&gt;&lt;/td&gt;&lt;td&gt;January&amp;nbsp;2&amp;nbsp;2005&lt;/td&gt;
        &lt;td&gt;A simple exploration of how the &lt;tt&gt;switch()..case&lt;/tt&gt; construct is compiled into machine
            code in gcc 3.4
        &lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;distribferweb_iti.pdf&quot;&gt;Distribuding Web-based CMS&lt;/a&gt;&lt;/td&gt;&lt;td&gt;June&amp;nbsp;24,&amp;nbsp;2005&lt;/td&gt;
        &lt;td&gt;This is the &quot;official&quot; version of the following paper, presented at the
            &lt;a href=&quot;http://iti.srce.hr&quot;&gt;ITI 2005&lt;/a&gt; conference.&lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;distribferweb.pdf&quot;&gt;Web CMS Distribution&lt;/a&gt;&lt;/td&gt;&lt;td&gt;May&amp;nbsp;7,&amp;nbsp;2004&lt;/td&gt;
        &lt;td&gt;This work explores various ways of making the FERweb CMS system (a web-based Content Management 
            System of the Faculty of electrical engineering and computing at the University of Zagreb) a 
            &quot;distributed system&quot;. Here, the notion of a distributed system is taken quite literally, and stands 
            for executing as many components of the system as possible on as many different computer systems. 
            The only limits here imposed are that of the practical value of such distribution . its end result 
            must be either an increase of total performance delivered to the user of the system, an increase of 
            overall system reliability, or providing distinct new functionality that was previously not possible, 
            and that the efforts must be based on existing technologies used in the project already, with minimal 
            impact on the existing code. Where appropriate and where available resources permit, measurements 
            are taken and reported.
        &lt;/td&gt;
    &lt;/tr&gt;


	&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;osbench.pdf&quot;&gt;OS Benchmark&lt;/a&gt;&lt;/td&gt;&lt;td&gt;April&amp;nbsp;10,&amp;nbsp;2004&lt;/td&gt;
		&lt;td&gt;This article presents the results of benchmarking various operating systems. 
			The benchmarks include synthetic tests (bytebench, ubench, bonnie++) and, more importantly, 
			semi-&quot;real world&quot; tests (pgbench, web CMS). Operating systems benchmarked are various versions of FreeBSD, 
			DragonflyBSD, NetBSD and Linux.
		&lt;/td&gt;
	&lt;/tr&gt;

	
	&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;gccoptim.pdf&quot;&gt;GCC as Optimising Compiler&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Feb&amp;nbsp;17,&amp;nbsp;2004&lt;/td&gt;
		&lt;td&gt;This paper aims to present and analyse some of the optimisations that
			are conducted by the GNU C compiler, in version 3.3.4 (on a i386 FreeBSD
			system). This is only an informal and introductory paper and is not
			meant to be comprehensive nor complete, only to give insight at things
			that are happening ``behind the scenes''.
		&lt;/td&gt;
	&lt;/tr&gt;
	
	&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;phprpc.pdf&quot;&gt;Description of PHP-RPC protocol&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Jan&amp;nbsp;15,&amp;nbsp;2004&lt;/td&gt;
		&lt;td&gt;Because of the need for a truly light-weight RPC mechanism in PHP,
			a new protocol is formed: PHP-RPC, to be used instead of XML-RPC when
			communicating to purely PHP applications. This protocol is faster
			and has a smaller overhead.
		&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;


&lt;h2&gt;Curriculum papers (mostly in Croatian)&lt;/h2&gt;

&lt;table width=&quot;100%&quot;&gt;
	&lt;tr&gt;&lt;th&gt;Title&lt;/th&gt;&lt;th&gt;Date&lt;/th&gt;&lt;th&gt;Abstract&lt;/th&gt;&lt;/tr&gt;

	&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;rdram.pdf&quot;&gt;RDRAM Memorija&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Feb&amp;nbsp;8,&amp;nbsp;2004&lt;/td&gt;
		&lt;td&gt;Ovaj rad opisuje osnovni rad Direct Rambus RAM sustava, kakav se još uvijek koristi. 
			Na kraju rada je dan kratak opis promjena u novijim inačicama sustava.
		&lt;/td&gt;
	&lt;/tr&gt;

    &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;kse.pdf&quot;&gt;KSE sustav u FreeBSD 5.0&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Dec&amp;nbsp;2002&lt;/td&gt;
		&lt;td&gt;Cilj ovog rada je prikazati mogućnosti postizanja višedretvenog rada u operacijskom 
			sustavu FreeBSD 5.0, sa posebnim osvrtom na novorazvijeni sustav KSE: Kernel Scheduled 
			Entities koji donosi mnoga poboljšanja u odnosu na prethodno dostupna rješenja, 
			posebno u podršci za iskorištavanje više sistemskih procesora (ukoliko su prisutni) 
			i konkurentnog izvršavanja poziva jezgre operacijskog sustava. Praktični dio rada 
			demonstrira korištenje različitih postojećih metoda postizanja višedretvenosti 
			u aplikacijama, te njihove posljedice za aplikaciju i cijeli sustav.
		&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;

	
&lt;h2&gt;Other (conference presentations, etc.)&lt;/h2&gt;

&lt;table width=&quot;100%&quot;&gt;
    &lt;tr&gt;&lt;th&gt;Title&lt;/th&gt;&lt;th&gt;Date&lt;/th&gt;&lt;th&gt;Abstract&lt;/th&gt;&lt;/tr&gt;

    &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;ivoras_finstall.pdf&quot;&gt;FreeBSD's finstall&lt;/a&gt;&lt;/td&gt;&lt;td&gt;May,&amp;nbsp;2007&lt;/td&gt;
        &lt;td&gt;Presentation of new FreeBSD graphical installer, given at BSDCan 2007.&lt;/td&gt;&lt;/tr&gt;

    &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;ivoras_gvirstor.pdf&quot;&gt;FreeBSD's GVIRSTOR&lt;/a&gt;&lt;/td&gt;&lt;td&gt;May,&amp;nbsp;2007&lt;/td&gt;
        &lt;td&gt;Presentation of GEOM_VIRSTOR kernel module for FreeBSD, givent at BSDCan 2007.&lt;/td&gt;&lt;/tr&gt;

    &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;webdav.pdf&quot;&gt;WebDAV u uredskom okruženju&lt;/a&gt;&lt;/td&gt;&lt;td&gt;April,&amp;nbsp;2005&lt;/td&gt;
        &lt;td&gt;Korištenje WebDAV-a u poslovnom okruženju, primjene, poslužitelji, klijenti.&lt;/td&gt;&lt;/tr&gt;

    &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;freebsd52.pdf&quot;&gt;FreeBSD 5.2&lt;/a&gt;&lt;/td&gt;&lt;td&gt;April,&amp;nbsp;2004&lt;/td&gt;
        &lt;td&gt;FreeBSD arhitektura i okruženje, novosti u 5.2, napredne
            mogućnosti uporabe&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;

	&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;../ubrzatiphp.pdf&quot;&gt;Kako ubrzati PHP program&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Mar,&amp;nbsp;2003&lt;/td&gt;
		&lt;td&gt;PHP je spor! Zbog prilično &quot;labave&quot; sintakse, PHP interpreter mora prolaziti kroz
			puno više provjera nego za neke druge skriptne jezike. PHP-ov &quot;model programiranja&quot;
			je često neoptimalan s resursima...
		&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;../freebsdlinux.pdf&quot;&gt;Uvod u FreeBSD&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Mar,&amp;nbsp;2003&lt;/td&gt;
		&lt;td&gt;Čiji Unix je dulji? Kratka povijest vremena, BSDL vs GPL, BSD is dead!
			*BSD, Prednosti FreeBSDa...&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;


&lt;h2&gt;There's more!&lt;/h2&gt;

&lt;p&gt;There's a separate section containing &lt;a href=&quot;freebsd.html&quot;&gt;my FreeBSD papers&lt;/a&gt;.&lt;/p&gt;
</description>
  </item>
  <item>
   <title>Should I buy a Mac?</title>
   <link>musings/mac.html</link>
   <description>&lt;h2&gt;A Mac?&lt;/h2&gt;

&lt;p&gt;Thanks to a friend, I had a chance to try two Apple laptops, a MacBook
and a MacBook Pro over the weekend. The reason for this is that I wanted to
try a Macintosh system for some time now, but I never had a chance until now.
I mean, I saw the commercials, the web sites and the blogs, had a chance 
to tinker with the occasional demo system but I never used them for more than
5 minutes.&lt;/p&gt;

&lt;p&gt;I'd first like to vent some acid about the availability and pricing of
Apple computers in this sorry little excuse for a country. It seems there's
only one Apple partner/reseller in this country, and the prices they have
are very unreasonable. The MacBook costs (when directly converted back to USD)
around $2100, and the MacBook pro costs close to twice than that, around 
$4100. Compare this to &lt;a href=&quot;http://store.apple.com/&quot;&gt;regular Apple
prices (in US)&lt;/a&gt; and you'll see the local prices are doubled! I know Apple
computers are traditionally priced up to 25% more than
&lt;a href=&quot;http://shop.lenovo.com/SEUILibrary/controller/e/web/LenovoPortal/en_US/catalog.workflow:expandcategory?current-catalog-id=12F0696583E04D86B9B79B0FEC01C087&amp;current-category-id=8FA114A7D9FF4F38AE8E19B36EC665A7&quot;&gt;equivalent
PC laptops&lt;/a&gt; but this is ridiculous.&lt;/p&gt;

&lt;h2&gt;Hardware&lt;/h2&gt;

&lt;p&gt;By the feeling of it, both laptops seem to weigh about the same (I didn't
measure it with scales), which is suprising for the smaller one. The MacBook
is too heavy for its size, especially when compared to similar PC laptops.
I don't know who designed the keyboard on the MacBook nor why he designed it
like that, but he should be shot for it. Not only is it ugly, but it's also
unergonomic in several ways: the keys have an awkward shape and angle (totally
parallel with the surface of the laptop), and
the space between the keys is too large for comfort. The keyboard on the
MacBook Pro looks small for the size of the laptop surface, but the keys
are actually large enough. There's plenty
of empty space around it could maybe be filled with more buttons or controls
(the &quot;function&quot; keys are half-height and double for hardware control keys like
audio volume and screen brigthness - they could have been larger and the
hardware controls could have been separate).
The quality and feeling of it is much better than that of MacBook but it's
still behind that of quality PC laptops. The lid of the MacBook Pro is 
opened by a small narrow &quot;button&quot; which is tedious to push as it's too
narrow for my fingers. Overally, both models &quot;feel&quot; more robust than
average PC laptop hardware, with the only exception being the CD loader,
which emits strangely screeching noises when loading and unloading CDs.
The location of the CD/DVD slot drive on MacBook Pro - at the &lt;i&gt;front&lt;/i&gt;
of the laptop - is a bad joke. The only hardware-related thing I'm
impressed with is the magnetic power plug - it's much cooler that I
thought it would be.&lt;/p&gt;

&lt;p&gt;The screens on both are reasonably good but again not as good as on
high end PC laptops (especially Sony's). On the MacBook the colors seems
somewhat washed up (noticable while playing DVDs).&lt;/p&gt;

&lt;p&gt;The connectors on the MacBook are badly placed - all of them are on the
left side of the laptop, placed too close together, which is again
unreasonable as there's plenty of empty space on that side alone. The
MacBook has only two USB ports, one next to the other, which creates
problems if you have bulky USB devices or connectors. MacBook Pro, though
much larger, has almost the same number of ports. There are still only
two USB ports, but luckily this time placed on both sides. The network port
(RJ-45) is on the right hand side now, which is better since most people
are right handed. There's no VGA port (there's an adapter), which makes 
both models unreasonably tedious to use for giving presentations over
a projector.&lt;/p&gt;

&lt;h2&gt;Software&lt;/h2&gt;

&lt;p&gt;Keyboard layout deserves a special mention. As a person that's 
been using PCs and PC laptops &quot;forever&quot;, I think some of the choices
Apple made are simply not reasonable. It's a special problem for me as I'm
using non-US layout (Croatian), and while the layout is close enough to
that used on PC laptops, there are three big problems with it: the first is
that the &quot;Y&quot; and &quot;Z&quot; keys are switched (this is a special local problem
here as they have been switched before by the industry in early nineties
and people have just gotten used to it - it's a small matter but it
creates stupid typos). The second is that the &quot;special&quot; keys or puncuations
that have been replaced by local diacrytic characters on the keyboard
can be accessed by completely different key sequences than on PC
keyboars. For example, to type the &quot;@&quot; character on a PC keyboard, the sequence
is AltGR-V, but on a Mac it's Ctrl-Shift-2 (three keys!), which is almost
impossible to type with one hand. The &quot;|&quot; character on PC is AltGr-W, and
on the Mac it's Alt-Shift-Ž, which is not consistent with the sequence for &quot;@&quot;.
The third problem is that the &quot;Enter key&quot; is much too small (most of it is
about 1 cm in width). All these problems are related to the local version of the
Mac keyboard and probably don't exist for US users on the US
keyboard, but are very annoying for people who work with both PCs and 
Macs over here. As I do a lot of writing (both programming and &quot;normal&quot; text), this
is simply a handicap.&lt;/p&gt;

&lt;p&gt;After a short time to get used to it, MacOS X (10.4) seems much better than
the hardware it runs on. Though it doesn't look as impressive as it does
on commercials and demos, it's decent and pleasent to work with. I have
the feeling that its graphic capabilities are underused. Maybe it's because
of new developments in &lt;a href=&quot;http://www.youtube.com/watch?v=ZD7QraljRfM&quot;&gt;Linux&lt;/a&gt;
and &lt;a href=&quot;http://www.microsoft.com/windows/products/windowsvista/default.mspx&quot;&gt;Windows&lt;/a&gt;,
but it looks somewhat simplistic in comparison. I can find four major things
I dislike in the UI: the buttons don't have enough visual feedback when they
are pressed, it looks like there's a bug that &quot;locks&quot; windows in drag mode
even when drag-lock is disable, the mouse pointer controlled by the track
pad doesn't continue to move in the same direction when you reach the end
of the trackpad with your finger like it does in Windows and Linux, and
applications are incisistent in how they look (&quot;brushed metal&quot; vs &quot;light-gray
gradient&quot; skin). Overall I'd say these are really minor problems and I think
I can get used to them. The Spotlight feature is very neat, but I didn't
create nearly enough documents to test it fully.&lt;/p&gt;

&lt;p&gt;The overall philosopy of the UI is fine, I'd say the applications I've tried
behave more consistently than on Windows or on Linux, so this is a definite
good point. Unfortunately, I didn't try XCode as I hoped I could because the
keyboard layout is just depressingly hard to use for programming.&lt;/p&gt;

&lt;p&gt;I managed to find all applications I'd need in normal use, either as bundled
or on the web (the fact that OS X is Unix underneath has helped this a lot). At 
first I thought I would have objections to the &quot;single-mouse-button&quot; policy,
but I got used to it very quickly. I'd still recommend getting a two-button mouse
for real work but it's not that bad even with the single button.&lt;/p&gt;

&lt;h2&gt;Hmmm...&lt;/h2&gt;

&lt;p&gt;At the end, I decided not to buy any of them. The MacBook Pro is so
expensive that it's silly (at local prices), and the MacBook has too
many hardware issues (bad placement of ports, keyboard that seems to be designed
to make your hands hurt while using it, unusually heavy weight) to be
usable. I think I can see myself using a MacBook Pro if, for example, someone
bought it for me or I win it at a lottery, and I find a way to fix the
keayboard layout issues, but I just don't feel like
buying it for my own money. The &quot;wow&quot; effect is practically nonexistant.&lt;/p&gt;

</description>
  </item>
  <item>
   <title>Broodings and daydreams</title>
   <link>musings/start.html</link>
   <description>&lt;p&gt;This is just a collection of random thoughts. Don't take them
seriously.&lt;/p&gt;



</description>
  </item>
  <item>
   <title>BSDCan 2007 and FreeBSD DevSummit 2007</title>
   <link>musings/bsdcan.html</link>
   <description>&lt;!-- $Id: bsdcan.html,v 1.1 2007/08/11 10:31:33 ivoras Exp $ --&gt;

&lt;h2&gt;BSDCan&lt;/h2&gt;
&lt;p&gt;It's been a very interesting and useful conference, I've learned much
from it and met many interesting people. It's no use just listing the talks
given on the conference (you can look that up &lt;a href=&quot;http://www.bsdcan.org/2007/schedule/&quot;&gt;here&lt;/a&gt;),
but, together with DevSummit, this was one of the best events I've ever been to.&lt;/p&gt;
&lt;p&gt;I'll try and think of something more to say...&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;
&lt;a href=&quot;bsdcan2007_lobby.jpg&quot;&gt;&lt;img src=&quot;bsdcan2007_lobby.jpg&quot; border=&quot;0&quot; width=&quot;288&quot; height=&quot;216&quot;&gt;&lt;/a&gt;
&lt;/p&gt;


&lt;h2&gt;DevSummit - Day 2&lt;/h2&gt;
&lt;p&gt;This is the &quot;official&quot; day of DevSummit talks, and has so far proven to
be very interesting and instructive. Reports on ZFS and SMP scalability
were also uplifting: it's really great to see so much good work being
done recently. An interesting piece of information was the result of recent
scalability measurements: FreeBSD 4.x run excellent on 1 CPU machines,
5.x scaled to 2 CPUs, 6.x to 4 CPUs, and 7.x will run great on 8 CPU
machines (&lt;a href=&quot;http://people.freebsd.org/~kris/scaling/mysql.html&quot;&gt;see
here&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Another very interesting talk was a self-referential, meta-presentation
on giving presentations about FreeBSD by Robert Watson, which also addressed
the problem of having too much to say and ttoo little time in a... unique...
way :) During the talk he brought up a very interesting point about
the way FreeBSD is organized: it's one of the very rare open-source projects
that have institutionalized &quot;transition of power&quot; - leadership is reelected
every few years and is in no way fixed or messianic.&lt;/p&gt;

&lt;p&gt;This was also the day I gave two of my talks, about 
&lt;a href=&quot;http://wiki.freebsd.org/gvirstor&quot;&gt;gvirstor&lt;/a&gt; and
&lt;a href=&quot;http://wiki.freebsd.org/finstall&quot;&gt;finstall&lt;/a&gt;!&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;
&lt;a href=&quot;bsdcan2007_devsummit.jpg&quot;&gt;&lt;img src=&quot;bsdcan2007_devsummit.jpg&quot; border=&quot;0&quot; width=&quot;288&quot; height=&quot;216&quot;&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;h2&gt;DevSummit - Day 1&lt;/h2&gt;
&lt;p&gt;Informal sessions were spread across the day, and have proven to
be very interesting. I was mostly on the &quot;alternative&quot; track,
participating in discussions about the ports tree and storage
systems. Judging from the reaction a brief mention of it provoked,
it looks like &lt;a href=&quot;http://wiki.freebsd.org/finstall&quot;&gt;finstall&lt;/a&gt;
is going to be very popular!&lt;/p&gt;

&lt;h2&gt;DevSummit - Day 0&lt;/h2&gt;
&lt;p&gt;The flight was long and the customs check barbaric, but finally I've
arrived at University of Ottawa campus to attend the 
&lt;a href=&quot;http://wiki.freebsd.org/200705DevSummit&quot;&gt;DevSummit&lt;/a&gt; and
&lt;a href=&quot;http://www.bsdcan.org/2007/&quot;&gt;BSDCan&lt;/a&gt; events held there.
The campus is really nice and big, I really like the architecture.&lt;/p&gt;

&lt;p&gt;Since it was late afternoon, the only thing I could do was join the
others at the highly regarded introductory beer consuming at local Royal
Oak pub.
&lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;
&lt;a href=&quot;bsdcan2007_intro.jpg&quot;&gt;&lt;img src=&quot;bsdcan2007_intro.jpg&quot; border=&quot;0&quot; width=&quot;288&quot; height=&quot;216&quot;&gt;&lt;/a&gt;
&lt;/p&gt;
</description>
  </item>
  <item>
   <title>Roadrunner and the unfairness of life</title>
   <link>musings/roadrunner.html</link>
   <description>&lt;p&gt;
&lt;img src=&quot;roadrunner.jpg&quot; style=&quot;float:right; margin: 10px;&quot; width=&quot;200&quot;&gt;
I doubt I'm the first one to notice it, but (re)watching the old
&quot;&lt;a href=&quot;http://en.wikipedia.org/wiki/Road_Runner_%28cartoon%29&quot;&gt;Road runner&lt;/a&gt;&quot;
cartoons it struck me just how unfairly the life treats Coyote
(as well as how brutal and cheerfully violent the cartoons are -
no way something like that would be made nowadays). Like all kids,
I enjoyed watching Wile E. Coyote fail in comical ways, getting
kicked, squashed, burned and blown up, laughing all the way.&lt;/p&gt;

&lt;p&gt;The whole cartoon is the embodiment of the &quot;Life isn't fair&quot;
line. It just isn't fair (to coyote)! Starting from the cartoons'
name: everyone knows them as the &quot;Road runner cartoons&quot; despite
that 90% of the time we look at the Coyote character, starving
and trying to survive by catching the scrawny (and stupid) bird.
And it's not like the Coyote is being melodramatic or depressed -
life actually &lt;u&gt;isn't&lt;/u&gt; fair to him, and everything &lt;u&gt;has&lt;/u&gt;
turned against him. The laws of physics have been rigged so he
will suffer: he's attracting heavy, sharp, hot and explosive
objects like a multi-purpose magnet (or a temporary black hole)
, the Roadrunner can walk
on thin air but that same air will drop him to his doom, explosives
will not explode except when he's near them, slings and giant
springs have Newton's
&lt;a href=&quot;http://en.wikipedia.org/wiki/Newton%27s_second_law#Newton.27s_second_law:_law_of_acceleration&quot;&gt;second
    and third laws&lt;/a&gt; suspended until he's on the path of
maximum damage (to himself), and energy sources (batteries and
fuel tanks) will only (but always) fail when his vehicle is upside down.
The Roadrunner apparently has telekinetic and 
&lt;a href=&quot;http://en.wikipedia.org/wiki/Extra-sensory_perception&quot;&gt;ESP&lt;/a&gt;
abilities allowing it to sense his weapons and redirect their
fire to the Coyote, and they &lt;u&gt;will&lt;/u&gt; hit him no matter where he
hides.&lt;/p&gt;

&lt;p&gt;The Coyote is like some modern &lt;a href=&quot;http://en.wikipedia.org/wiki/Tantalus#Story_of_Tantalus&quot;&gt;Tantalus&lt;/a&gt;,
tortured forever by the near presence of his food but never
allowed to eat it. Alternatively, maybe he was Hitler in his
former life and his karma is just catching up with him. There's
never any blood on him or around him - the worst that happens
is that his body gets mangled and his fur burned, so he
continues to live forever (probably in pain).&lt;/p&gt;

&lt;p&gt;On the other hand he sometimes really is stupid, making
his experiments under unstable boulders, trusting his life
with untested contraptions and, at last, failing to find
something else to eat. He can also be considered the
embodiment of stupid optimism.&lt;/p&gt;

</description>
  </item>
  <item>
   <title>Python Blowfish</title>
   <link>projects/blowfish.html</link>
   <description>&lt;p&gt;This is a slightly modified version of the pure python implementation
of the Blowfish cipher by Michael Gilfix. This version contains methods
to encrypt and decrypt arbitrary strings (of arbitrary length) using the
&lt;a href=&quot;http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Counter_.28CTR.29&quot;&gt;CTR
cipher mode&lt;/a&gt;. I've added three new methods: &lt;tt&gt;initCTR()&lt;/tt&gt;, 
&lt;tt&gt;encryptCTR()&lt;/tt&gt; and &lt;tt&gt;decryptCTR()&lt;/tt&gt; to make this happen.

&lt;p&gt;&lt;a href=&quot;blowfish.py.gz&quot;&gt;Download Blowfish in Python&lt;/a&gt; module.&lt;/p&gt;
</description>
  </item>
  <item>
   <title>Ideas</title>
   <link>musings/ideas.html</link>
   <description>&lt;p&gt;I'm an ideas kind of guy - I tend to have a lot of ideas and no time to
implement them. Since ideas are a dime a dozen, and there's no way I can find the
time and resources (i.e. money) to make use of most of them, I'll just dump them
on this page. Of course, most ideas are garbage, and the same holds for
those on this page.&lt;/p&gt;

&lt;p style=&quot;font-size: smaller&quot;&gt;&lt;i&gt;The small print:&lt;/i&gt;
If anyone actually manages to implement an idea presented here, I'd
appreciate I get mentioned in credits (also, I won't refuse money :) ).
If anyone wants to implement an idea on this page and really wants 
me to remove the idea from the page, I can be persuaded (let's trade).&lt;/p&gt;

&lt;p&gt;Anyway, here's my idea dump, in no particular order:&lt;/p&gt;

&lt;h2&gt;Hardware&lt;/h2&gt;

&lt;p&gt;&lt;b&gt;Oval displays?&lt;/b&gt; In the almost-traditional over-the-top
&quot;what will Apple do next, designer-vise&quot; discussion with 
&lt;a href=&quot;http://mrgan.com&quot;&gt;a friend&lt;/a&gt; we came up with an &quot;interesting&quot;
idea - round / oval displays. Of course, it's a stupid idea. Or is it?
Technologically, an OS that has such advanced display features as OS X
shouldn't have any problems with maintaining an oval display region /
desktop. The one major technological problem could be waste area 
during production, if the displays are to be &quot;cut out&quot; of 
a rectangular slab of LCD. That leaves us the UI / human interface
problem. Does it have any benefits here (aside from being unusual and
sexy given current technology design standards)? The human field of 
vision is oval, so it could be argued that an oval display is more
adjusted to it. Except for blocks of text, I believe that
most other design elements can be modified to fit an oval shape.&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;&lt;b&gt;2x 2.5&quot; drives in a 5.25&quot; bay&lt;/b&gt; I want a 5.25&quot; case (internal
HDD enclosure) like it's used for holding 3.5&quot; hard drives in a 5.25&quot;
bay, but one that holds two 2.5&quot; drives (one above the other), with
proper cooling and hot swap ability. I want to do create a 
RAID1 array from the drives
(hardware RAID optional, but forget it if it's not smart enough to
handle hot swapping properly). Computers usually have more than
enough 5.25&quot; bays so why not use them?
&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;&lt;b&gt;&quot;Auxels&quot;&lt;/b&gt; The problem: Star-trek interface (i.e. touch
screen) is cool, but the ape descendants using them (e.g. people)
like tactile feedback. I think this kind of feedback could be 
provided by low frequency acoustic vibrations from behind the
screen, Since these must be localized to where the user &quot;clicked&quot;
with his finger, the audio sources or conducts must be spread
across the surface, pixel-like. Hence &quot;auxels&quot; - acoustic
pixels.
&lt;/p&gt;

&lt;h2&gt;Software&lt;/h2&gt;

&lt;p&gt;&lt;b&gt;JavaScript application server&lt;/b&gt;  Current web development
environments as a rule, use a different language at the server side
(e.g. PHP) and at the client side (JavaScript). It would be great to
use a single language (by default - JavaScript) for both, thus dropping
the requirement that programmers need to use two languages and allowing
much better client-server integration (i.e. AJAX-y features). This is
something I actually intend to implement, if I ever get the free time.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;JavaScript application &quot;platform&quot;&lt;/b&gt; Creating basic user interfaces
in HTML is fairly easy when compared to any other method except
visual &quot;drag and drop&quot; design. At the same time, HTTP's model of
transactions (do UI on the client side, then POST the data to the 
server for processing) is easy and simple to understand. Why not create
a sort of embeddable server which would allow developers to code
for the same processing model (i.e. HTML or XML templates, business logic
code, backend code, database) in plain JavaScript and package it all
in one desktop application (&quot;exe&quot;)? I don't consider desktop applications
dead yet.&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;&lt;b&gt;P2P mp3 streaming&lt;/b&gt; Many people within the office listen to
MP3 streaming &quot;radio stations&quot;, and many of them listen to the same
ones. Wouldn't it be great if the clients themselves became sort of
repeating stations? Each client listening to a stream could offer the
same stream to the other computers in the office, possibly via mDNS
or similar discovery protocol. In effect, this would save enormous
bandwidth on the Internet.&lt;/p&gt;
&lt;p&gt;This could as well be generalized to other types of traffic, such
as web pages. BitTorrent is a right step in this direction.&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;&lt;b&gt;Imaginary RPG&lt;/b&gt; Imagine a CRPG which is not much tied to the
physical world. In it, events and environment depend on the imagination
and the &quot;willpower&quot; of the participants. Let something like Solaris
(from Stanislav Lem's book) or Limbo (from Planescape RPG setting) grant
participant whatever they wish for, and let it be real. Let people have
their wishes granted, and get in conflict with the wishes of other 
people!&lt;/p&gt;
&lt;p&gt;I guess I'm after a sort of game with tangible (to make a pun) duality
between the real and the unreal. If a man walks the desert and wishes
it, he could perceive the desert as a forest, and as far as he is
concerned, it WOULD be a forest. But unless he's powerful enough, a wall
in real world will appear as wall in his own reality.&lt;/p&gt;
&lt;p&gt;Or maybe a more interesting thing would be &quot;reality by consensus&quot;, where
actions and the environment up to a point in future are implicitly or
explicitly &quot;agreed upon&quot; by the participants, and everyone's wishes
have a certain echo in the reality-to-be.&lt;/p&gt;
&lt;p&gt;This looks like a primarily non-combat CRPG, but there's space for
combat too - I'm thinking of something like the ending combat in
the Star Trek novel &lt;i&gt;Spock must die&lt;/i&gt;, where the combatants &quot;wish&quot;
various (mostly environmental) cataclysms on each other.&lt;/p&gt;

&lt;h2&gt;SciFi/stories&lt;/h2&gt;
&lt;p&gt;Occasionally, I just get random ideas that are best classified as
SciFi stories' plots :)&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Loophole for FTL?&lt;/b&gt;
Photons have momentum but zero rest mass. What if you try to STOP photons
as-is, would you get infinite energy?&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;&lt;b&gt;A non-linear universe&lt;/b&gt;
Consider how light spreads through glass: photons are constantly 
absorbed and released by the atoms in their path. Suppose that 
releases are not strictly in the same direction, but *always* vary, 
either constantly (always x deg from the entry point in a certain 
direction) or randomly. Could lens-optics be possible? Is it 
happening now? By a very slight amount related to the alpha constant?&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;&lt;b&gt;Blinded by the sight of God?&lt;/b&gt;
God said in the Bible: &quot;no man shall see me and live!&quot; - what if God
is everywhere and everything, and this is the reason for mortality?
Would the sensory deprived from birth live forever?&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;&lt;b&gt;Perpetual catastrophe&lt;/b&gt;
Oldish couple looking at sunset over a skyscraper city. So beautiful, 
so fragile. It's discovered that the galactic core has exploded (with a nod
to Larry Niven), and the shock wave is coming just behind the light 
(or some other random catastrophe - volcanic winter?). Most people 
are despairing and rowdy, some (the couple is one of them?) are building 
a room - cubic room with many layers of shielding, to contain a 
monument (a stone slab) with writings, and cultural treasure around it. 
The room's shielding is a marvel of technology. Out of boredom, 
someone sets a satellite/s searching for the room signature and finds 
there two almost identical sites! When dug out, the second room looks
almost destroyed, but in there are writings in it that look like they talk
about sudden discovery of &quot;the second one&quot;, which are dismally 
copied again, on the newly finished monument, before it is sealed.&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;&lt;b&gt;Nagging suspicion&lt;/b&gt;
&quot;There's something sinister when a accomplished and fruitful writer 
receives, every week precisely, one of his own books by mail.&quot; Each book is 
neatly wrapped in decorative paper, with a paper card containing the 
preceding sentence attached with a piece of plain string to the wrapping.&lt;/p&gt;
&lt;p&gt;(The writer goes mad and kills the postman :) )&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;&lt;b&gt;O Fermi where art thou?&lt;/b&gt;
What is the easiest way for a long-living (immortal even) race to discover, 
in a galaxy full of stars each of which could have it's own system of planets, 
where the best mining areas, rich with needed (and expensive) substances are? 
How about this: bio-engineer an evolution, starting with several thousands 
of possible life-starting structures, and culminating one day in beings marveling 
at their intelligence when they discover radio, and seed the galaxy with it. 
After that, they'd only have to listen for beacons appearing, beckoning 
from spots across the space.&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;&lt;b&gt;The late race&lt;/b&gt;
The cosmic background radiation is low, around 3 kelvins. Imagine how much 
time does it take for a universe created in a Big Bang to cool down so much!
Regarding the Fermi paradox: this universe may be dying - all the civilizations
have come and gone, and those who remain would be saddened and depressed looking 
at the night sky that is mostly black. Our civilization is mostly dark, 
almost depressed and disinterested - were the youngest civilization happier, 
sparkling with the enthusiasm of a newborn universe?&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;&lt;b&gt;Does the Matrix have debuggers?&lt;/b&gt;
Hutchison Effect (various weird Tesla+Philadelphia experiment+anti-gravity 
effects) was not repeated by Hutchison since 1980ies - he claims that it simply
doesn't work now. What if something has changed since the time he did it (and 
possibly when Tesla did it) and now? Was a bug fixed in the Matrix?

&lt;hr&gt;

&lt;p&gt;&lt;b&gt;Zero point energy?&lt;/b&gt;
Zero point energy of the vacuum has been proven and theoretically calculated.
In relativity, energy and mass are almost interchangeable. So zero point energy,
which has extremely huge densities, could &quot;produce&quot; enough gravity to visibly 
bend space. So far, no fiction. But we're not noticing any space-bending in 
random blocks of vacuum. What if matter and its effects we notice is actually
the LACK of (zero-point) energy?&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;&lt;b&gt;A realistic Matrix&lt;/b&gt;
Imagine a world heavily interwoven with digital information and 
presentation-enhancing technology, for example where words in books get 
highlighted when people touch them, automatically bringing on a view of 
encyclopedia that defines it, etc. People are happy and always young. 
Then a reality is revealed: it's a Matrix-like world where people painstakingly
save money IRL to have a few hours of virtual happiness, and IRL live in
dirty conditions in what are practically sleeping pens not homes.
(Hmmm... cf. Gibson's Matrix)&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;&lt;b&gt;Randomness as a positive evolutionary trait?&lt;/b&gt;
Some &quot;Dark Enemy&quot; or Force or whatever is preying on all intelligence, it's attracted to 
intelligent creatures and kills them/turns them into itself/does something horrible. 
It is fought, defeated and exiled into another dimension/galaxy/some dark place 
thought uninhabitable. Certainly, no intelligence would arise in such a place. 
But it does, and eventually is attacked by and defeats the Dark Enemy, by evolving 
to be as much random as possible, never going in straight lines, always doing 
multiple actions at the same time, which seem unrelated and purposeless, so it 
isn't perceived as intelligent behavior. Its actions result in a Rube Goldberg-style 
&quot;incredible machine&quot; sequences with far-reaching consequences. Then it goes exploring 
&quot;Our Place&quot;... would we notice before it's too late?&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;&lt;b&gt;Security by obscurity&lt;/b&gt;
In ancient books, names of demons and other Scary Things were often 
deliberately misspelled in order not to provoke their manifestation by 
accidentally speaking such a name. The practice went on for a long time and 
at the end no one really knew the right names to speak. What if some loser finds 
such a book, tries to pronounce a name for fun and accidentally stumbles on the 
right pronunciation? Instant dark ages - a demon appears, all science suddenly 
stops working or malfunctions...&lt;/p&gt;

</description>
  </item>
  <item>
   <title>FreeBSD papers</title>
   <link>papers/freebsd.html</link>
   <description>&lt;script language=&quot;JavaScript&quot;&gt;
	window.location = &quot;../freebsd/papers.html&quot;;
&lt;/script&gt;
</description>
  </item>
  <item>
   <title>My FreeBSD papers</title>
   <link>freebsd/papers.html</link>
   <description>&lt;h2&gt;Conference talks&lt;/h2&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;ivoras_finstall.pdf&quot;&gt;Slides from my BSDCan 2007 DevSummit talk about finstall&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;ivoras_gvirstor.pdf&quot;&gt;Slides from my BSDCan 2007 DevSummit talk about gvirstor&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
  </item>
  <item>
   <title>Matrix as an OS</title>
   <link>musings/matrixos.html</link>
   <description>&lt;p&gt;Since one of my fascinations is operating systems design, implementation
and maintenance, ever since I've first seen the Matrix movies I've thought
some of the concepts in them can be related to familiar concepts in
operating systems:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;&lt;b&gt;The Matrix world&lt;/b&gt;: a running operating system, with userland (the
        &quot;common&quot; world, in which people live, and the kernel (the &quot;Matrix&quot;
        proper). Apparently it's a pretty buggy OS...
    &lt;/li&gt;
    &lt;li&gt;&lt;b&gt;People&lt;/b&gt;: processes, both kernel processes and user processes.
        There's a big distinction between normal, &quot;unprivileged&quot;
        people, and daemons with root privileges - &quot;agents&quot;. Root
        daemons can open privileged ports, kill random processes,
        manage memory, etc.
    &lt;/li&gt;
    &lt;li&gt;&lt;b&gt;Matrix&lt;/b&gt;: the kernel. It looks like a message passing kernel,
        not necessarily a microkernel (though they are some
        microkernel aspects, such as the abundance of kernel
        processes, strict separation of duty between them, and the
        already mentioned message passing). Kernel manages all
        processes, and performs operations on their behalf (such
        as keeping them alive, servicing them and recycling them).
        But there's an apparent security defect: some userland
        processes can (because of a bug) transfer and execute
        parts of their programs in the kernel space. Only certain
        syscalls are affected (the &quot;phones&quot;), and this kind of
        privilege escalation garbles the userland process' return
        stack, such that if the process receives a signal, it
        segfaults and is garbage collected (if you're killed in the
        Matrix, you're dead for real).
    &lt;/li&gt;
    &lt;li&gt;&lt;b&gt;Oracle&lt;/b&gt;: the process (task) scheduler. Has all the numbers
        from process monitoring (resource usage) and knows in
        advance (broadly) how to schedule them to run to their
        optimum.
    &lt;/li&gt;
    &lt;li&gt;&lt;b&gt;Agents&lt;/b&gt;: system monitoring / intrusion detection 
        / prevention system (IDS / IPS) with heuristical operation. 
        Most of them have a kernel 
        part (kernel module) but are basically daemons run with 
        superuser privileges in the userland. They are tasked to find
        and kill processes which attempt to violate system
        security.
    &lt;/li&gt;
    &lt;li&gt;&lt;b&gt;The trainman&lt;/b&gt;: kernel-userland gateway / message
        passing queue. You've got to go through him if you
        want to validly pass data between userland and kernel.
        You also might be stuck in the queue forever.
    &lt;/li&gt;
    &lt;li&gt;&lt;b&gt;The Merovingian&lt;/b&gt;: networking / IPC stack. It's
        his business to know everything going on between
        processes. Has a bug manifesting in occasional input /
        output data corruption.
    &lt;/li&gt;
    &lt;li&gt;&lt;b&gt;Vampires / ghosts&lt;/b&gt;: compatibility shims for
        older API / KPI versions. Their code is rudimentary
        and, for historical reasons, interfaces with parts of
        kernel normal processes shouldn't (i.e. they have lots
        of layering violations).
    &lt;/li&gt;
    &lt;li&gt;&lt;b&gt;The Architect&lt;/b&gt;: kernel monitoring infrastructure
        (hypervisor), tasked with monitoring processes, 
        killing those that wedge and restarting those that
        crashed. Since it's a realtime high-availability OS,
        the debugging and monitoring infrastructure has the
        absolute highest priority and is &quot;blessed&quot; to be 
        infallible (thus, to limit the possibility of error,
        is very limited in its complexity). It's been 
        misconfigured to be overzealous,
        does availability checking too often, taking too many
        resources, and so interferes with the normal operation 
        of the operating system.
    &lt;/li&gt;
    &lt;li&gt;&lt;b&gt;Keymaster&lt;/b&gt;: security / privilege subsystem. 
        It's stable, but unfortunately relies on the VM system
        and the IPC system which are buggy, and can be 
        exploited by processes to gain more privileges from him.
    &lt;/li&gt;
    &lt;li&gt;&lt;b&gt;THE PLOT&lt;/b&gt;: There's a design bug between the VM 
        (virtual memory) system, the process management system
        and the scheduler, manifesting under high system load 
        (lots of processes, high memory pressure). It is a
        compound error, which results in at least three things:
        &lt;ul&gt;
            &lt;li&gt;Memory pages can get corrupt or missasigned to
            processes that don't own them. Since kernel and
            userland share the VM, processes on either side
            can end up with memory pages from the other,
            revealing sensitive data and making way for
            security escalations. Mixing up the VM pages
            bypasses address space protection between
            the processes.&lt;/li&gt;
            &lt;li&gt;The IPC subsystem, bad as it already is,
            gets even worse when its data structures get
            corrupted or the memory load gets so high it
            deadlocks waiting for buffers.&lt;/li&gt;
            &lt;li&gt;The system monitor goes berserk, killing and
            restarting processes in a loop, unaware that
            it makes the things worse by building additional
            memory pressure and process load, eventually
            greatly helping spread  the VM pages corruption
            between the processes.&lt;/li&gt;
        &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;b&gt;Agent Smith&lt;/b&gt;: privileged IPC daemon with part of it
        implemented as a kernel module. It's so
        closely tied with the kernel module part that it
        shares data structures with it without sanity
        checking. Once it was killed by another privileged
        process, but it was in the middle of a syscall so
        when the monitor restarted him, the corruption
        which was already done to its process descriptor
        resulted in most of its program being executed in the
        kernel context. It continued to work in this
        corrupted state for a long time, wedged in a loop,
        erroneously
        tagging processes as security breaches and
        overwriting some of their memory pages with its own.
    &lt;/li&gt;
    &lt;li&gt;&lt;b&gt;Neo&lt;/b&gt;: Initially a userland network server
        process, the VM corruption resulted in it being
        assigned both superuser privileges and high priority 
        (CPU time). Eventually, it got its
        executable memory pages mixed up with the IDS 
        process Smith, but not the data pages. Before long
        it also starts killing processes, including Smith
        and his corrupted copies.
    &lt;/li&gt;
    &lt;li&gt;&lt;b&gt;THE ENDING&lt;/b&gt;: process Smith eventually tries
        to kill the scheduler process, but since it's
        itself scheduled by it, cannot do so reliably.
        The system gets wedged because the scheduler cannot
        perform its tasks anymore, including interrupt
        servicing, but the part of Smith's code in the
        scheduler's VM image (which is accidentally also
        the part shared with process Neo) still runs.
        Since there are only two processes running, they
        both are trying to kill each other.
        Meanwhile, since interrupts are no longer being served,
        the hardware watchdog timer wakes up,
        inserts a NMI, which wakes up the monitoring system.
        It decides the system is in a critical state and
        proceeds to kill all processes, then restarts them
        to bring the system up again. The End.
    &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;b&gt;Post mortem analysis&lt;/b&gt;: There appears to be an inherent flaw in 
the design of the operating system, especially in the VM, IPC 
and monitoring subsystems, resulting in a global memory
corruption among processes and critical failure of address
space protection for a small number of processes.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Recommendation&lt