]> git.tuebingen.mpg.de Git - aple.git/commitdiff
Merge topic branch t/fs into pu
authorAndre Noll <maan@tuebingen.mpg.de>
Thu, 25 Jan 2024 16:23:04 +0000 (17:23 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Thu, 25 Jan 2024 16:23:04 +0000 (17:23 +0100)
* refs/heads/t/fs:
  fs: Add subsection on ext4 fast commits.

LVM.m4
Unix_Concepts.m4
include/css/aple.css

diff --git a/LVM.m4 b/LVM.m4
index bf130769e1ccf4e73513c292de25f47bcc59ab32..959d4cec09a9ca53ef395c7926880527d66c36aa 100644 (file)
--- a/LVM.m4
+++ b/LVM.m4
@@ -60,21 +60,18 @@ they can be submitted as a unit for performance reasons. The thusly
 processed bios then form an I/O request which is handed to an <em>
 I/O scheduler </em> (also known as <em> elevator</em>). </p>
 
-<p> At this time of writing (2018-11) there exist two different sets
-of schedulers: the traditional single-queue schedulers and the
-modern multi-queue schedulers, which are expected to replace the
-single-queue schedulers soon. The three single-queue schedulers,
-noop, deadline and cfq (complete fair queueing), were designed for
-rotating disks. They reorder requests with the aim to minimize seek
-time. The newer multi-queue schedulers, mq-deadline, kyber, and bfq
-(budget fair queueing), aim to max out even the fastest devices. As
-implied by the name "multi-queue", they implement several request
-queues, the number of which depends on the hardware in use. This
-has become necessary because modern storage hardware allows multiple
-requests to be submitted in parallel from different CPUs. Moreover,
-with many CPUs the locking overhead required to put a request into
-a queue increases. Per-CPU queues allow for per-CPU locks, which
-decreases queue lock contention. </p>
+<p> Traditionally, the schedulers were designed for rotating disks.
+They implemented a single request queue and reordered the queued
+I/O requests with the aim to minimize disk seek times. The newer
+multi-queue schedulers mq-deadline, kyber, and bfq (budget fair
+queueing) aim to max out even the fastest devices. As implied by
+the name "multi-queue", they implement several request queues,
+the number of which depends on the hardware in use. This has become
+necessary because modern storage hardware allows multiple requests
+to be submitted in parallel from different CPUs. Moreover, with many
+CPUs the locking overhead required to put a request into a queue
+increases. Per-CPU queues allow for per-CPU locks, which decreases
+queue lock contention. </p>
 
 <p> We will take a look at some aspects of the Linux block layer and on
 the various I/O schedulers. An exercise on loop devices enables the
@@ -837,12 +834,12 @@ EXERCISES()
        target_args</code>. Determine the correct values for the first three
        arguments to encrypt <code> /dev/loop0</code>. </li>
 
-       <li> The <code> target_args </code> for the dm-crypt target are
-       of the form <code> cipher key iv_offset device offset</code>. To
-       encrypt <code> /dev/loop0 </code> with AES-256, <code> cipher </code>
-       is <code> aes</code>, device is <code> /dev/loop0 </code> and both
-       offsets are zero. Come up with an idea to create a 256 bit key from
-       a passphrase. </li>
+       <li> The <code>target_args</code> for the dm-crypt target are
+       of the form <code>cipher key iv_offset device offset</code>. To
+       encrypt <code>/dev/loop0</code> with AES-256, <code>cipher</code>
+       is <code>aes</code>, <code>device</code> is <code>/dev/loop0</code>
+       and both offsets are zero. Come up with an idea to create a 256 bit
+       key from a passphrase. </li>
 
        <li> The <code> create </code> subcommand of <code> dmsetup(8)
        </code> creates a device from the given table. Run a command of
index 3841c01348f9f75c1844197299a3a920d69ed015..7f0b5d8b13f55ba701925ed09eeb9f6c417028d3 100644 (file)
@@ -145,18 +145,34 @@ interface based on the X window system facilitated cheap workstations
 which ran a complete open source software stack. </p>
 
 <p> The success of Linux, or <em>GNU/Linux</em> as some prefer to
-call it for reasons that should now be clear, has only increased
-over time, to the point where commercial Unix systems are mostly
-irrelevant. Today Linux runs on a wide variety of machines ranging
-from supercomputers to workstations, smart phones and IOT (internet
-of things) devices with very limited resources.
-
-<p> The same companies which almost killed Unix by commercializing it
-in order to maximize their profit make money with Linux today. However,
-they had to adjust their business model in order to comply with the
-GPL. Rather than selling proprietary software, they bundle open source
-software and sell support to paying customers. Some companies also
-sell hardware with Linux pre-installed. </p>
+call it for reasons that should now be clear, steadily increased over
+time. In 2003 the SCO group, a company which sold a proprietary Unix
+system, was unhappy about this progress and sued IBM, which offered
+various Linux products. SCO claimed to be the owner of Unix, and that
+Linux contained "millions of lines" of code copied from Unix. SCO's
+lawyers argued that the success of Linux originated from this theft
+of intellectual property and asked for $5 billion as compensation
+for the resulting losses. The company also tried to collect taxes
+from other Linux users. Microsoft funded SCO in these efforts. </p>
+
+<p> In the end SCO lost the lawsuit since it was evident that all that
+copied code never existed. In fact, the court ruled that SCO did not
+even own the Unix copyrights to begin with. Another fun fact is that
+the large number of bugs in the early Linux code actually helped to
+prove that Linux was original work. The long term effects of this
+lawsuit, an improved position of Linux and its ecosystem, last until
+the presence. Commercial Unix systems have become irrelevant as Linux
+runs on a wide variety of machines ranging from supercomputers to
+workstations, smart phones and IOT (internet of things) devices with
+very limited resources. </p>
+
+<p> While SCO went bankrupt eventually, some of the companies which
+almost killed Unix by maximizing their own profit still exist, and
+make money with Linux today. However, they had to adjust their
+business model in order to comply with the GPL. Rather than selling
+proprietary software, they bundle open source software and sell
+support to paying customers. Some companies also sell hardware with
+Linux pre-installed. </p>
 
 SUBSECTION(«Linux Distributions»)
 
@@ -1774,8 +1790,7 @@ SUBSECTION(«Pipes and Redirections»)
 
 <p> The <code>pipe(2)</code> system call takes no arguments and
 creates two file descriptors for the calling process which are tied
-together as a unidirectional first in, first out data channel that
-works just like a fifo, but without any files being involved. One
+together as a unidirectional first in, first out data channel. One
 file descriptor is the <em>read end</em> of the pipe, the other is
 the <em>write end</em>. Data written to the write end is buffered by
 the kernel and can be obtained by reading from the read end. </p>
@@ -1787,6 +1802,18 @@ a copy of both pipe file descriptors. Hence the parent process can
 communicate with the child by writing a message to the write end of
 the pipe for the child to read. </p>
 
+<p> This approach depends on file descriptor inheritance across
+<code>fork(2)</code>, so it does not work in the situation
+where neither process is an ancestor of the other. Files of
+type <em>fifo</em> (named pipes) overcome this restriction. To
+establish a connection between two <em>unrelated</em> processes,
+both processes call <code>open(2)</code> to obtain a file
+descriptor which is associated with the fifo. One process passes
+the <code>O_WRONLY</code> flag to open the file for writing while
+the other passes <code>O_RDONLY</code> to open it for reading. The
+two processes may then communicate in the same way as with the
+<code>pipe(2)/fork(2)</code> approach. </p>
+
 <p> The POSIX <code>dup(2)</code> and <code>dup2(2)</code> system
 calls allow a process to manipulate the entries of its file descriptor
 array. In particular the standard file descriptors 0, 1, and 2 can be
@@ -1811,12 +1838,6 @@ with <code>wc(1)</code>. Since <code>ls(1)</code> writes to stdout
 and <code>wc(1)</code> reads from stdin, <code>wc(1)</code> processes
 the output of <code>ls(1)</code>. </p>
 
-<p> Note that this trick does not work to establish a connection
-between two <em>existing</em> processes because it depends on file
-descriptor inheritance across <code>fork(2)</code>. In the general
-case one has to fall back to sockets or fifos to create the data
-channel. </p>
-
 SUBSECTION(«Stdio»)
 
 <p> The POSIX standard requires a compliant Unix system to provide
@@ -2510,6 +2531,9 @@ SECTION(«Further Reading»)
        href="https://www.newyorker.com/business/currency/the-gnu-manifesto-turns-thirty">
        The GNU Manifesto Turns Thirty</a>, by Maria Bustillos. </li>
 
+       <li> <a href="https://lwn.net/Articles/924577/">The SCO lawsuit,
+       20 years later</a> </li>
+
        <li> <a
        href="http://www.catb.org/~esr/writings/unix-koans/end-user.html">
        The Koan of Master Foo and the End User</a>. </li>
index da4c70ccddae9b482867e55f091cfcc3e5de3694..bb5544e5e90a944c3a33ebdb1dc600439b58493f 100644 (file)
@@ -18,6 +18,10 @@ h3 {
        font-size: 110%;
 }
 
+code {
+       font-size: 130%;
+}
+
 p {
        padding: 0px 0px 0px 0px;
 }