<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6982205</id><updated>2011-08-28T07:50:36.898-07:00</updated><title type='text'>cat /dev/random</title><subtitle type='html'>&lt;p&gt;Ideas of the technical variety.&lt;/p&gt;

&lt;p&gt;If you want to join comment somewhere, or if you know us talk to us. Eventually we'll figure out a more efficient way to let us know. But for now, I'm not giving out my email. Why? 4 letters. S.P.A.M.&lt;/p&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://codemill.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6982205/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://codemill.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>aducore</name><uri>http://www.blogger.com/profile/06953267202765734340</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://www.wam.umd.edu/~aducore/me.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6982205.post-2492614544625472859</id><published>2009-04-09T09:11:00.000-07:00</published><updated>2009-04-09T11:56:57.781-07:00</updated><title type='text'>Page Table Hacking in P.O.S.</title><content type='html'>This post covers what I think is a clever way to handle the paging data used in 32 bit x86 architectures, specifically when PAE is not enabled. It requires 4MB of the linear address range (&amp;lt;0.1%) and is trivially easy to setup.&lt;br /&gt;&lt;br /&gt;In order to access the memory associated with a linear address &lt;span style="font-family:courier new;"&gt;LA&lt;/span&gt;, the CPU must figure out what physical address &lt;span style="font-family:courier new;"&gt;PA&lt;/span&gt; coresponds to that linear address. This is done through some paging circutry that maps linear pages (aligned 4K regions of the linear address range) to physical page frames (aligned 4K regions of the physical RAM.) This circutry uses a 2-level tree of tables that are stored in RAM. The root node of this tree is called the page directory, it contains 1024 pointers to the physical addresses of the secondary tables (called page tables) and the page directory takes up one page frame (4K = 1024 entries x 4 bytes per entry.) The CPU keeps track of the physical location of the page directory in the &lt;span style="font-family:courier new;"&gt;cr0&lt;/span&gt; CPU register. The page tables pointed to by the page directory have the same structure: 1024 pointers to the physical addresses of individual page frames. (The pointers used in these tables are only concerned with the address of a page frame, which are aligned on 4K boundaries, so the bottom 12 bits aren't useful for finding a page and are instead used as flags and to controll permissions and things like special large 4M pages that I won't go into here.)&lt;br /&gt;&lt;br /&gt;It's important to note here that the structure of the page directory and the page tables are identical.&lt;br /&gt;&lt;br /&gt;With 1024 entries in the page directory (the root node) and the page tables (the leaf nodes), 10 bits of the address can be used as an index into these tables. The way this works in practice is to use the highest order 10 bits of &lt;span style="font-family:courier new;"&gt;LA&lt;/span&gt; as the index for the page directory, and the next 10 bits of &lt;span style="font-family:courier new;"&gt;LA&lt;/span&gt; as the index in the page table. This is enough to get a physical page frame (as I'll show below), and then the last 12 bits of &lt;span style="font-family:courier new;"&gt;LA&lt;/span&gt; are used as an offset within that page frame. We can break &lt;span style="font-family:courier new;"&gt;LA&lt;/span&gt; down, then, into 3 values: the highest order 10 bits will be called &lt;span style="font-family:courier new;"&gt;LAd&lt;/span&gt; (&lt;span style="font-family:courier new;"&gt;d&lt;/span&gt; for directory), the next 10 will be called &lt;span style="font-family:courier new;"&gt;LAt&lt;/span&gt; (&lt;span style="font-family:courier new;"&gt;t&lt;/span&gt; for table) and the last 12 will be called &lt;span style="font-family:courier new;"&gt;LAo&lt;/span&gt; (&lt;span style="font-family:courier new;"&gt;o&lt;/span&gt; for offset).&lt;br /&gt;&lt;br /&gt;A single entry in a page table points to a single page frame (4K). Since a page table has 1024 of these entries, each page table maps 4M of the linear address range. Similarly, since each page table maps 4M, each entry in the page directory (which points to a page table) is associated with that 4M of the linear address range, and there being 1024 of these entries in the page directory, the entire page directory maps 4G of linear addresses, which is what we'd expect with 32 bit addresses.&lt;br /&gt;&lt;br /&gt;For the sake of shorter examples, let's call the physical address of the page directory &lt;span style="font-family:courier new;"&gt;PD&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;In order to convert the linear &lt;span style="font-family:courier new;"&gt;LA&lt;/span&gt; into the physical address &lt;span style="font-family:courier new;"&gt;PA&lt;/span&gt;, the CPU computes the following: &lt;span style="font-family:courier new;"&gt;PT &lt;/span&gt;&lt;span style="font-size:85%;"&gt;(page table)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; = PD[LAd]&lt;/span&gt;; &lt;span style="font-family:courier new;"&gt;PF &lt;/span&gt;&lt;span style="font-size:85%;"&gt;(page frame)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; = PT[LAt]&lt;/span&gt;; &lt;span style="font-family:courier new;"&gt;PA = PF + LAo&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What would happen if an entry in the page directory pointed to the page directory itself, rather than to a page table?&lt;br /&gt;&lt;br /&gt;Let's assume that the last entry in &lt;span style="font-family:courier new;"&gt;PD&lt;/span&gt; points to &lt;span style="font-family:courier new;"&gt;PD&lt;/span&gt; itself (&lt;span style="font-family:courier new;"&gt;PD[0x3FF] = PD&lt;/span&gt;).&lt;br /&gt;&lt;br /&gt;Now, let's figure out what memory we would be reading to/writing from if we used the linear address &lt;span style="font-family:courier new;"&gt;LA=0xFFFFFF004&lt;/span&gt;. Using the above notation, &lt;span style="font-family:courier new;"&gt;LAd=0x3FF&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;LAt=0x3FF&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;LA0=0x001&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;First, &lt;span style="font-family:courier new;"&gt;PT = PD[PAd] = PD[0x3FF] = PD&lt;/span&gt;.&lt;br /&gt;Then, &lt;span style="font-family:courier new;"&gt;PF = PT[LAt] = PD[0x3FF] = PD&lt;/span&gt;.&lt;br /&gt;Finally, PA = PF + LAo = PD + 0x004&lt;br /&gt;&lt;br /&gt;So, the linear address &lt;span style="font-family:courier new;"&gt;0xFFFFF004&lt;/span&gt; points to 4 bytes after the beginning of the page directory. Treating the page directory as an array of 1024 4-byte objects, this then coresponds to the 2nd entry in the page directory. Interpret &lt;span style="font-family:courier new;"&gt;LA&lt;/span&gt; as a pointer to an entry in a page directory, and &lt;span style="font-family:courier new;"&gt;*LA&lt;/span&gt; equates to the physical address of the page table used to map the 2nd 4MB range of linear addresses.&lt;br /&gt;&lt;br /&gt;What about the linear address &lt;span style="font-family:courier new;"&gt;LA = 0xFFC02008&lt;/span&gt;? Here, &lt;span style="font-family:courier new;"&gt;LAd = 0x3FF&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;LAt = 0x002&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;LAo = 0x00B&lt;/span&gt;.&lt;br /&gt;First, &lt;span style="font-family:courier new;"&gt;PT = PD[PAd] = PD[0x3FF] = PD&lt;/span&gt;.&lt;br /&gt;Then, PF = PT[LAt] = PD[0x002]&lt;br /&gt;Finally, &lt;span style="font-family:courier new;"&gt;PA = PF + LAo = PD[0x002] + 0x00B&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Now, the physical address you get coresponds to the 4th entry in the page table pointed to by the 3rd entry in the page directory, or, the entry that handles which physical page is used for all memory reference in the range &lt;span style="font-family:courier new;"&gt;0x00C08000&lt;/span&gt; through &lt;span style="font-family:courier new;"&gt;0x00C08FFF&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;So, if &lt;span style="font-family:courier new;"&gt;PD[0x3FF] = PD&lt;/span&gt;, you can do the following:&lt;br /&gt;&lt;br /&gt;To control what physical page some 4K linear page (&lt;span style="font-family:courier new;"&gt;LA&lt;/span&gt;) is mapped to, write to the linear address:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;0xFFC00000|((LA&amp;amp;0xFFFFF000)&amp;gt;&amp;gt;10)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To control which page frame the page directory points to for use as a page table for some 4MB region of linear addresses (&lt;span style="font-family:courier new;"&gt;LA&lt;/span&gt;), write to the linear address:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;0xFFFFF000|((LA&amp;amp;0xFFC00000)&amp;gt;&amp;gt;20)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If one ever writes to 0xFFFFFFFC, it will break this system.&lt;br /&gt;&lt;br /&gt;This will work on any system, even ones that use trees that are 3 or 4 levels deep, so long as the following 2 conditions hold:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Each 'node' in the tree is the same size, and covers the same number of bits in the linear address.&lt;/li&gt;&lt;li&gt;The size of the nodes is the same as the size of the page frames pointed to by the leaf nodes.&lt;/li&gt;&lt;/ol&gt;This doesn't seem to be an option on x86_64 machines, but I haven't looked too much into that (as I'm writing code on a 32 bit machine, I'm not worried)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6982205-2492614544625472859?l=codemill.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codemill.blogspot.com/feeds/2492614544625472859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6982205&amp;postID=2492614544625472859' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6982205/posts/default/2492614544625472859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6982205/posts/default/2492614544625472859'/><link rel='alternate' type='text/html' href='http://codemill.blogspot.com/2009/04/page-table-hacking-in-pos.html' title='Page Table Hacking in P.O.S.'/><author><name>aducore</name><uri>http://www.blogger.com/profile/06953267202765734340</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://www.wam.umd.edu/~aducore/me.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6982205.post-112809504555378225</id><published>2005-09-30T08:31:00.000-07:00</published><updated>2005-09-30T08:46:42.200-07:00</updated><title type='text'>Music Conversion</title><content type='html'>Me and Ducore (or Ducore and I)are working on tidying up and standardizing/sychronizing our music libraries, and I figured this would be a good place to brainstorm ideas/get stuff written down so its not just in our heads.&lt;br /&gt;&lt;br /&gt;Here is the agreed upon format:&lt;br /&gt;&lt;br /&gt;/[music root]/[Artist]/[Album]/[track number (zero padded)] - [Track Name].mp3|ogg&lt;br /&gt;&lt;br /&gt;if you dont know the track number or if it is not applicable, then it is "xx"&lt;br /&gt;&lt;br /&gt;There are more specifics for special cases that can be added later in comments. Eventually, a document should be written up to capture all of the rules. If I were more proactive and had more time right now, this post would be that document. However, I mainly wanted to use this post to propose a method of automating filename conversion, which Ducore thinks is imprcatical, and I intend to find a method to prove him wrong.&lt;br /&gt;&lt;br /&gt;here is my newest idea:&lt;br /&gt;&lt;br /&gt;1)use some program (eg, Amarok, rhythmbox, cantus, etc) to determine any tracks that do not have Artist/Album/TrackNumber/TrackName in the id3 tag. use said program to retreive this information from cddb if possible. Also, at this point try to identify duplicates and trash files as much as possible.&lt;br /&gt;&lt;br /&gt;2)create a playlist containing only the files that have the aformentioned id3 tags. extract a list of filenames from the playlist file.&lt;br /&gt;&lt;br /&gt;3)write a script that will loop through this file list and for each file extract the track name and number using "id3info" and rename the track to "[number] - [name]". We could also be more proactive and move it to the appropriate directory as well, but for teh most part, things should already be in the right place. This removes any reliance on file names already being formatted in any particular way. after this is done, only a relatively (hopefully) small number of files will need to be done by hand.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6982205-112809504555378225?l=codemill.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codemill.blogspot.com/feeds/112809504555378225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6982205&amp;postID=112809504555378225' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6982205/posts/default/112809504555378225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6982205/posts/default/112809504555378225'/><link rel='alternate' type='text/html' href='http://codemill.blogspot.com/2005/09/music-conversion.html' title='Music Conversion'/><author><name>Tim</name><uri>http://www.blogger.com/profile/13495963961389863008</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6982205.post-111713097354750294</id><published>2005-05-26T10:56:00.000-07:00</published><updated>2005-05-26T11:10:14.186-07:00</updated><title type='text'>Building a computer</title><content type='html'>So I'm not that up to speed on building computers. Sure, I know what the different parts do, but I'm not sure which motherboards are good, where the current AMD v. Intel debate stands, and so forth, but if you're reading this you probably do. My brother wants to build a computer for college, and he's asking me (quite ungrammatically) for help. The only real stress test he'll be doing is gaming. So, here are my (his) questions:&lt;br /&gt;&lt;br /&gt;What is a good price for a CPU?&lt;br /&gt;AMD versus Intel?&lt;br /&gt;Motherboards: here's the last email he sent me... it's interesting to see how far English has been degraded for online communication:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;so the other mother board that supports intel is intel is that good or&lt;br /&gt;bad like how do their products fair in comparrison to others? its&lt;br /&gt;specs are 800/533MHz fsb, and as far as expansion slots it has&lt;br /&gt;PCI-E x16 :1&lt;br /&gt;PCI-E x1 :2&lt;br /&gt;PCI Slots :4&lt;br /&gt;So the two mother boards are as following (AMD then Intel with prices)&lt;br /&gt;could you tell me which seems better for more specifics go to&lt;br /&gt;&lt;a onclick="return top.js.OpenExtLink(window,event,this)" href="http://newegg.com/" target="_blank"&gt;newegg.com&lt;/a&gt;&lt;br /&gt;ASUS A8N SLI Deluxe Socket 939 NVidia nforce4 SLI ATX AMD Motherboard&lt;br /&gt;Intel BoxD915PBLL Socket T(LGA 775) Intel 915P ATX Intel Motherboard thanks&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;If you can figure that out, advice will be paid for in wampum.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6982205-111713097354750294?l=codemill.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codemill.blogspot.com/feeds/111713097354750294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6982205&amp;postID=111713097354750294' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6982205/posts/default/111713097354750294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6982205/posts/default/111713097354750294'/><link rel='alternate' type='text/html' href='http://codemill.blogspot.com/2005/05/building-computer.html' title='Building a computer'/><author><name>aducore</name><uri>http://www.blogger.com/profile/06953267202765734340</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://www.wam.umd.edu/~aducore/me.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6982205.post-111275317519381673</id><published>2005-04-05T18:44:00.000-07:00</published><updated>2005-04-05T19:14:37.306-07:00</updated><title type='text'>Posts Make Blogs Better</title><content type='html'>&lt;p&gt;When I lost my hard drive last summer, I also lost all my work on the web server I was writing.  Well, ever the glutton for punishment, I've jumped back in again.  So far, I've got the request parsing for HTTP/0.9 and HTTP/1.0 complete, and 1.1 will be added soon.  However, I've hit a conceptual logjam.  Here's the deal: my server works thusly:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;A server socket starts up, listening for connections.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The new socket is passed to a connection thread.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The connection thread activates a parser, which returns an HTTPRequest object, containing all the info on the request&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;The request is passed to the selected HTTPHandler objects, generating an HTTPReply.&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The HTTPReply is sent.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;If the connection is persistent, start parsing the next request.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;As if the bold weren't hint enough, that's the part that is frsustrating me.  In the old version the requested URI was split into four parts, thusly: [http://&amp;lt;server&amp;gt;]/&amp;lt;path&amp;gt;/&amp;lt;item&amp;gt;[?&amp;lt;query_string&amp;gt;] and the appropriate handler was selected by &lt;i&gt;item&lt;/i&gt;.  There was a special file &amp; directory catch-all handler which was run if &lt;i&gt;item&lt;/i&gt; didn't match any other defined handler.  But this ignores the fact that handling should be different if the request method is, say, PUT instead of GET.  Or if the request contains certain headers, or even specific body data.  So then I figured I'd just pass the data to each handler in time, and let them decide whether or not they should deal with the request.  That's lovely and all, but it doesn't scale well.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;So now we get to the question: how do I decide which handlers are used on a given request?  Keep in mind that it needs to be extensibile, so a new handler can easily be added.  But I'm stumped, which presents a problem, because right now all you get back is a Invalid Request or No Content response, which does not make a very good server.  Suggestions will be stolen and implemented with no repayment, credit, or even thanks given.  Who can resist such an offer?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6982205-111275317519381673?l=codemill.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codemill.blogspot.com/feeds/111275317519381673/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6982205&amp;postID=111275317519381673' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6982205/posts/default/111275317519381673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6982205/posts/default/111275317519381673'/><link rel='alternate' type='text/html' href='http://codemill.blogspot.com/2005/04/posts-make-blogs-better.html' title='Posts Make Blogs Better'/><author><name>Ben</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6982205.post-110305638774350943</id><published>2004-12-14T13:31:00.000-08:00</published><updated>2004-12-14T12:33:07.743-08:00</updated><title type='text'>Does anybody actually read this?</title><content type='html'>None of us have posted anything in a while. We really are squatting. That, or when we come up with a good idea our first impulse is not to tell the whole internet about it, thereby preventing us from making any money from it. So, who reads this, anyway?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6982205-110305638774350943?l=codemill.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codemill.blogspot.com/feeds/110305638774350943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6982205&amp;postID=110305638774350943' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6982205/posts/default/110305638774350943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6982205/posts/default/110305638774350943'/><link rel='alternate' type='text/html' href='http://codemill.blogspot.com/2004/12/does-anybody-actually-read-this.html' title='Does anybody actually read this?'/><author><name>aducore</name><uri>http://www.blogger.com/profile/06953267202765734340</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://www.wam.umd.edu/~aducore/me.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6982205.post-108887614571107279</id><published>2004-07-03T10:35:00.000-07:00</published><updated>2004-07-03T10:35:45.710-07:00</updated><title type='text'>clusterfuck modules</title><content type='html'>&lt;p&gt;I have version 0.1 working. It supports packing, unpacking, and executing clusterfuck tasks, which are represented as tar files containing the template filesystem (I didn't follow the first idea of having a filesystem image, and all the metadata in other files, all wrapped up in a tarball.) The new filesystem must contain the file /run, which will be executed to run the task, and the filesystem MUST NOT contain the file /.run, it will be created as the secure entrance point for  the task. So now, modules. I think they will be determined by a file named "/etc/modules" which will contain a new-line delimeted list of required modules (java, perl, etc.) The /.run program will set the appropriate environment variables to make all the modules available through the path, and may setup any special environment variables needed by modules, like paths to packages in java or perl. The modules will (probably) go into either /bin/modules or /modules, whichever I decide I like better. The hope is that by having commonly used modules cached and inserted into the tasks that need them, the overall size of the task files will decrease, lowering network traffic. Sofar, here's the list of modules I think would be usefull.&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;clusterfuck (to create and submit tasks to the clusterfuck server, which still needs to be writen)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;coreutils&lt;/li&gt;&lt;br /&gt;&lt;li&gt;gcc&lt;/li&gt;&lt;br /&gt;&lt;li&gt;java&lt;/li&gt;&lt;br /&gt;&lt;li&gt;perl&lt;/li&gt;&lt;br /&gt;&lt;li&gt;proc (just mounts the /proc filesystem; I need to check the security implications of this first.)&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;Any ideas on what else would be useful?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6982205-108887614571107279?l=codemill.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codemill.blogspot.com/feeds/108887614571107279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6982205&amp;postID=108887614571107279' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6982205/posts/default/108887614571107279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6982205/posts/default/108887614571107279'/><link rel='alternate' type='text/html' href='http://codemill.blogspot.com/2004/07/clusterfuck-modules.html' title='clusterfuck modules'/><author><name>aducore</name><uri>http://www.blogger.com/profile/06953267202765734340</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://www.wam.umd.edu/~aducore/me.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6982205.post-108747502803629871</id><published>2004-06-17T05:17:00.000-07:00</published><updated>2004-06-17T05:26:10.506-07:00</updated><title type='text'>So Close, Yet So Far</title><content type='html'>Check out &lt;a href="http://bstorer.blogpsot.com"&gt;bstorer.blogpsot.com&lt;/a&gt; (note the transposed letters).  Could it be more of the antithesis of Ben?&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Sidenote: My brother Drew thought one of his teachers was stupid because she pronounced "antithesis" as "an-tith-a-sis".  We had to explain to him that she was right, and that it was not pronounced "anti-thesis".&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Anyway, I think it'll work for &amp;lt;anything&amp;gt;.blogpsot.com.  I know it works with aducore, too, which might be even funnier.  Or as funny.  Or less funny.  Or some fourth thing.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;The point is, there is funniness with aducore, too.  Unless there isn't.  But there should be.  Unless there shouldn't.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&amp;lt;END POLITICIAN SPEAK&amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6982205-108747502803629871?l=codemill.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codemill.blogspot.com/feeds/108747502803629871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6982205&amp;postID=108747502803629871' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6982205/posts/default/108747502803629871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6982205/posts/default/108747502803629871'/><link rel='alternate' type='text/html' href='http://codemill.blogspot.com/2004/06/so-close-yet-so-far.html' title='So Close, Yet So Far'/><author><name>Ben</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6982205.post-108696251831953592</id><published>2004-06-11T06:56:00.000-07:00</published><updated>2004-06-11T07:01:58.320-07:00</updated><title type='text'>Break Out the Geometry Books</title><content type='html'>So I want to write a program that will, in the course of its work, plot approximately 10,000 points in 3D space.  I'm writing it in Java, and I need to optimize the drawing routines so that I can allow rotating, and possibly moving of the observation point.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;One solution would be to use the Java3D API.  But that is a separate download, and doesn't even work on my computer's shitty vid card.  So that's out.  Anybody know a fast way to do affine transformations?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6982205-108696251831953592?l=codemill.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codemill.blogspot.com/feeds/108696251831953592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6982205&amp;postID=108696251831953592' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6982205/posts/default/108696251831953592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6982205/posts/default/108696251831953592'/><link rel='alternate' type='text/html' href='http://codemill.blogspot.com/2004/06/break-out-geometry-books.html' title='Break Out the Geometry Books'/><author><name>Ben</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6982205.post-108457049075536925</id><published>2004-05-14T14:20:00.000-07:00</published><updated>2004-05-14T14:47:21.546-07:00</updated><title type='text'>Clusterfuck</title><content type='html'>&lt;p&gt;I'm thinking about writing some programs to let jobs that can be split up into small tasks that run independently (think S.E.T.I., genetic algorithms, neural networks, etc.) be run on any number of available computers. The basic idea is this: a client would check out a task from some server, run it in a sandbox, and then tar up and return the result data. I'm thinking about using chroot, and a bunch of mount -binds and hard links to get the needed binaries in place. For security purposes, all mounts would be done -ro, and only hard links to files which couldn't be editable would be allowed. Also, no suid executables would be allowed and the client would su to nobody and cd into the new /, since otherwise the application could break out of jail. Eventually, I'd like to set it up so that standard utilities could be requested based on some ID.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;A task would consist of a template filesystem (which chroot would set / to), a set of utility package requests (later version, probably), an command to run (in the new chrooted pathspace, of course), and a path to tar up and return as the result. A server for this system would, in effect, turn tasks into results, pushing the actual cpu grunt work to the client machines. The clients would probably have to be run through nice, since it will likely eat up the CPU, and if this is to be run to sop up extra CPU cycles it should be done politely.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I'll probably get started on this within a few weeks, any suggestions before I start?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6982205-108457049075536925?l=codemill.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codemill.blogspot.com/feeds/108457049075536925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6982205&amp;postID=108457049075536925' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6982205/posts/default/108457049075536925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6982205/posts/default/108457049075536925'/><link rel='alternate' type='text/html' href='http://codemill.blogspot.com/2004/05/clusterfuck.html' title='Clusterfuck'/><author><name>aducore</name><uri>http://www.blogger.com/profile/06953267202765734340</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://www.wam.umd.edu/~aducore/me.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6982205.post-108447846282996932</id><published>2004-05-13T12:58:00.000-07:00</published><updated>2004-05-13T13:01:36.306-07:00</updated><title type='text'>I know!</title><content type='html'>How about an operating system where the kernel just acts as a big switch board and there are kernel modules that register what they do. Each service (filesystem, process communication, etc.) could have a type, and perhaps subtype, and modules could communicate with eachother by ID, so it wouldn't matter what version of a module you have as long as it supports the published API for that module type and subtype. What a Piece Of S#!t idea...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6982205-108447846282996932?l=codemill.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codemill.blogspot.com/feeds/108447846282996932/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6982205&amp;postID=108447846282996932' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6982205/posts/default/108447846282996932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6982205/posts/default/108447846282996932'/><link rel='alternate' type='text/html' href='http://codemill.blogspot.com/2004/05/i-know.html' title='I know!'/><author><name>aducore</name><uri>http://www.blogger.com/profile/06953267202765734340</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://www.wam.umd.edu/~aducore/me.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6982205.post-108447738403833589</id><published>2004-05-13T12:42:00.000-07:00</published><updated>2004-05-13T12:43:04.036-07:00</updated><title type='text'>I'm For It</title><content type='html'>Look, ma!  No hands!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6982205-108447738403833589?l=codemill.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codemill.blogspot.com/feeds/108447738403833589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6982205&amp;postID=108447738403833589' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6982205/posts/default/108447738403833589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6982205/posts/default/108447738403833589'/><link rel='alternate' type='text/html' href='http://codemill.blogspot.com/2004/05/im-for-it.html' title='I&apos;m For It'/><author><name>Ben</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6982205.post-108447685314736287</id><published>2004-05-13T12:33:00.000-07:00</published><updated>2004-05-13T12:58:02.573-07:00</updated><title type='text'>Frist Post</title><content type='html'>Perhaps we could squat on some blogspot subdomains. I can't imagine that would piss anybody off.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6982205-108447685314736287?l=codemill.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codemill.blogspot.com/feeds/108447685314736287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6982205&amp;postID=108447685314736287' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6982205/posts/default/108447685314736287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6982205/posts/default/108447685314736287'/><link rel='alternate' type='text/html' href='http://codemill.blogspot.com/2004/05/frist-post.html' title='Frist Post'/><author><name>aducore</name><uri>http://www.blogger.com/profile/06953267202765734340</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://www.wam.umd.edu/~aducore/me.jpg'/></author><thr:total>5</thr:total></entry></feed>
