Sunday, February 28, 2010

Microkernels vs. Monolitic kernels - What's The Difference?

I was recently asked to explain the differences between a monolithic kernel and a microkernel. Here I will discuss the pros and cons of both. I neither advocate one or the other, so those of you who are looking for support in your holy war (yes, that means you, Andrew Tanenbaum).

To start things off, let's discuss monolithic kernels.

A monolithic kernel is the traditional kernel of the days of ole. All the drivers and system services exist in one big binary blob, sharing code and data.

Now, the pros and cons of this are:
  • Pros: Code runs much faster. Most, if not all, system services run in kernel mode, so there is no need to perform costly context switches between user mode and kernel mode. Only two context switches are needed for most syscalls, one from user to kernel on invocation of the syscall, and another context switch from kernel mode back to user mode on syscall return.
  • Cons: Bugs in the kernel have a high chance of bringing the entire system down. Also, some kernels must be recompiled to add or remove drivers.
Common systems with a monolithic kernel would be Linux and FreeBSD. Note, however, that more specifically, these systems have a modular kernel, that is, a monolithic kernel that supports having parts of it loaded sometime after kernel boot, and possibly also removed as well. Also note that it is also possible to configure the Linux and FreeBSD kernels to be fully monolithic, without module support.

Microkernels, on the other hand, only have a very small portion of their code that runs in kernel mode, that is, has unfettered access to the full system hardware. For the most part, the portion that runs in kernel mode is a mere message marshalling system. All other system services, such as the filesystem, network stack, tty driver, etc., all run as user mode daemons known as "servers".

The pros and cons of this approach is this:
  • Pros: If a bug crops up in a system service, and crashes that service, it is very unlikely that the system will crash with it. Usually, the system will merely restart the service. Depending on the system, there might be slight side effects from the service crash. For example, if the network stack crashes, applications might find all of a sudden that their socket handles are all now invalid. Sometimes, this can be made transparent to the applications, e.g. if the filesystem driver crashes, the libc could transparently detect this and reopen all file handles that were made invalid in the crash. Also, adding new drivers and system services to the system is as simple as starting the respective servers for them.
  • Cons: Your system runs terribly slower than a monolithic kernel. A write() syscall to a tty, for example, will go to the filesystem driver first (as /dev/tty is filesystem), and then the file system driver would then call upon the teletype driver, and so on and so forth. It may take hundreds, if not thousands of messages to complete one traditional syscall, each message requiring two context switches each, one to kernel mode and one back, and each context switch may take thousands of CPU cycles to complete.
Common examples of microkernel-based operating systems include QNX and Minix. Note that QNX's microkernel architecture is advanced enough to allow network-transparent message passing - allowing you to, for example, directly access hardware in another machine as if the hardware was in your own, much akin to Plan 9.

In short, each type of kernel has it's advantages and drawbacks. I am not trying to say that one is better than the other, or anything like that, but each one has it's merits, and I leave it up to the reader to determine which is better for any given situation.

Friday, February 05, 2010

FreeBASIC on FreeBSD

A few days ago, I built a full installable package of FreeBASIC, for FreeBSD 8.x. The pacakge includes a FreeBSD-tailored install.sh, modified from the Linux one.

It seems to work good, except I forgot to add in the graphics library!

Either way, you can read about it, and find download link at http://www.freebasic.net/forum/viewtopic.php?t=15046

Friday, January 29, 2010

PsyMP3 1.2-RELEASE is, well… released!

I am proud to announce that I have finally gotten the PsyMP3 codebase to a point where I am proud to announce a new stable release that is suitable for mass consumption.

You can get it at the PsyMP3 project page, always at http://code.google.com/p/psymp3/.

Also, I’ve decided to use a new high-color icon. While the classic Windows 3.1-esque icon is nice and familiar, it’s not in modern style and I’ve decided to upgrade to a new icon.

Here’s what the new icon looks like:

 

Kudos to Agamemnus of Freenode’s ##freebasic for making the icon

Wednesday, January 27, 2010

Devices in Review: Augen Eclipse 2GB

Today, I was given a new mp3 player made by a company right here in Florida, called Augen. This device is called the Eclipse, and it is rather much a simple, cheap ho-hum Chinese-build player with Chinese-coded firmware.

 This is an cheap Chinese knock-off of the iPod Nano with a video camera, circa 2009.

The first thing I did when I first got the Eclipse is tried out it’s FM radio. After a few minutes figuring out the controls, I managed to get it to work. The control set is rather annoying, and leave a lot to be desired, and can be at times be difficult to use.

As for the FM radio, it’s piss-poor. I was only able to pick up 4 stations which I could understand the sound being broadcast, and only one station out of all those being broadcast in my area was even coming in clear as day. I get better reception with a cheap 50¢ micro FM radio.

The device does support displaying text files stored in it’s memory, but the feature is an utter joke. It does not understand newlines, nor does it know how to intelligently wrap text. Also, the text display is a monospaced, bitmap font that is very similar to the classic Courier font. Worse yet, it only has a text display that is 15 characters wide. If you are imagining this in your head, this must look rather hideous.

Picture 120 A close-up of the screen, giving you an idea of how the interface looks. That spectrum analyzer display is fake as fuck.

The Eclipse has the capability of playing back your common audio formats, such as Windows WAVE format, ISO/MPEG Layer-III Audio (commonly known as MP3) and Windows Media Audio.

But what’s this? Look closer at this icon.

augen-eclipse-ogg-icon 

No, you’re not misreading that, that plainly does say “OGG”. In the cheapest and utter shittiest of mp3 players, the Augen Eclipse boasts support for the patent-free Ogg Vorbis format.

For video, this device supports the wholly shitty AMV video format. AMV is a cheap and overly simple audio/video format, designed to be decoded by firmware for S1 MP3 players, which are powered by an 8-bit Zilog Z80-compatible processor.

AMV is basically 12 or 16 FPS Motion JPEG video with a fixed quantitizer and a crappy IMA ADPCM variant for audio.

Well, that it. If you want to find more information on this device, I can’t help you. The company that makes this thing doesn’t even have an email address.

My rating: 4.1 / 10 (and 2.5 of that is purely because it supports Ogg Vorbis)

The Porn Of PETA

It’s time again for PETA’s “State Of The Union Undress”! That’s right, our female narrator will strip down to nothing, leaving both the hoo-hoo and the ta-tas exposed bare for all to see, all in the name of animal rights!

Check out the video at http://www.peta.org/feat/stateoftheunion10/

And the embedded version below:


PETA's 2010 State of the Union Undress

Thursday, January 21, 2010

Of Window Managers…

I have always been a nomad, going from window manager to window manager, across systems and networks, from the classics, such as twm, fvwm, mwm, to more modern and contemporary WMs such as Enlightenment, KWin, Metacity, IceWM, Fluxbox, BlackBox, Openbox, AfterStep, Ion (and Ion 2 and Ion 3), etc., and I have not found a WM that works quite like what I want without all the extras that I didn’t.

Until matwm.

I know this Belgian guy names Mattis that wrote a window manager named matwm. Originally, it was a fork of evilwm/yeahwm, but that didn’t last. Only one release was ever made, matwm-0.0.1. Enter matwm2. A from-scratch, brand new window manger that is EWMH-compatible and ICCCM-compatible.

For several months now, Mattis has been working hard now, refining matwm2 to a wonderful state. Only recently has he declared a 0.1, after almost 100 0.0.x releases, and even the 0.1 prereleases feel like a stable 1.0 release!

UPDATE! Screw what I said about prereleases, 0.1.0 stable has been cut out, and you can get the code from http://www.squidjam.com/matwm/.

It is known to work on the following OSes, and should work on far earlier releases than tested:

Linux 2.4 / glibc 2.3 or later on x86

Linux 2.6.27 / glibc 2.8 on PowerPC

FreeBSD 6.2 and later

NetBSD 5.0 and later

OpenBSD 3.6 and later

Microsoft Windows Subsystem for Unix-based Application version 5.2, 6.0, and later. Should work on earlier Interix 3.5. Unsure about 3.0 and earlier.

Minix 3.1.3

Solaris 10 (from the Solaris Express Developer Edition 09/07 DVD)

Since I took too much of your time with useless details above, here’s a video of a fat boy running into a fence and knocking it down:

Friday, December 11, 2009

MySpace purchases IMEEM

On Tuesday, 8 December 2009, MySpace announced that it has completed a deal to buy off certain assets of online music service imeem, in an attempt to bolster the music offerings of the struggling social network site.

 
Former imeem logo, courtesy of Wikipedia

The deal was disappointingly valued at less than $1 million USD, according to someone close to the deal.

“MySpace Music and Imeem share a common vision and commitment to further enabling the socialization of content across the Web,” MySpace CEO Owen Van Natta said in a statement. “This deal will allow us to leverage Imeem’s industry leading technology and over time, meaningfully integrate their products into the MySpace Music experience.”

MySpace is owned by News Corp., which also owns The Wall Street Journal, as well as Fox “News”.

MySpace is trying to change direction from longtime rival Facebook, by remaking itself into a destination for people to connect with friends over entertainment content, such as movies, music, and video games.

imeem was founded in 2003 by Dalton Caldwell (of VA Linux, currently Geeknet, Inc.) and Jan Jannink (fomerly of Napster), and many of the company’s core engineering team came from the original Napster file-sharing service.

In 2007, imeem became the first-ever online music site to secure licenses from all 4 U.S. major music labels to offer their music catalogues for free streaming and sharing on the web.

Sources:
Wall Street Journal – MySpace Buys Imeem Music Service
Wikpedia – imeem

Saturday, December 05, 2009

Windows Update Has Too Many Updates

Well, I decided to take a look at just how many different updates have been installed on my Acer Aspire One netbook since I first got it on January 7th. So, I went and checked the “Update History” on the Windows Update site, and I notice that I have installed, in just 11 months, 152 updates.

If Microsoft had actually gotten their shit straight the first time, maybe all these updates wouldn’t have been needed.

Saturday, October 31, 2009

Introducing Google's New Music Search

On October 29, 2009, Google rolled out a new feature to their current web search technology - music search.

To take advantage of this new feature, all you have to do is type in the name of a song; this sometimes is not enough if the song title is a common word or set of words; in this case, add the name of the artist.

For example, let's say you want to hear the song Ironic by Alanis Morissette.

First, go to Google. Since the name of the song is a dictionary word, the title by itself will not be treated as a song: You need to include the name of the artist as well.

Search for "Alanis Morissette - Ironic". (For the truly lazy, this link will do the search for you)


Do you see the little blue play button? Good! Click it and the song will play!

But after the first play of the song, you only get 30-second previews after that. iLike, Google's partner in this music search has this to say:

How come when I play music from Google search it doesn't always play the full song?

For most songs, the first time you play the song, it will play in full, but if you play the same song again, it will subsequently play it as a 0:30 second sample clip. If you want to hear the full song many times, we encourage you to purchase the MP3 using the convenient "Buy" link. 

For some songs, due to our contracts with record labels, we can only play them as 0:30 second clips for now. 

Well, now you have it. But there is a way around this: Use imeem! If you see a little iMeem link available, you can hear the full-length song as many times as you want - the only catch is that you need a (free) imeem account.

Tuesday, October 20, 2009

SCO Finally Gives McBride The Boot

After many years of raping and pillaging so many companies, under their laughably false claims that Linux contained code stolen from SCO UNIX and given by IBM, SCO has finally seen the light and fired their shit-spewing leader, Darl McBride, before the county water department starting billing them extra for the high volume of McBride's total bullshit that kept clogging the county sewers.

Darl McBride, as seen here in this 2004 edition of Fortune, has cursed the Linux kernel and community for years, claiming up and down that Linux contains stolen code from his company's UNIX operating system, to the point he was forcing corporations to buy IP indemnity licenses - basically an agreement that SCO won't assrape them which wasn't even worth the paper it was printed on - or he would sue - which is what he did to IBM and DaimlerChrysler.

Well, SCO bit off more than they could chew, and McBride drove the company into the depths of a Chapter 11 bankruptcy. However, the other employees could only take so much of his utter bullshit, so they hired this guy to have him terminated:

I hope that criminal charges come up against Darl McBride, and that he ends up being put in prison, where he'll do good as Bubba's "McBride".

Tuesday, September 15, 2009

Microsoft Fucks Over XP Users

Well, no surprise this time, but Microsoft has managed to fuck over a significant portion of the userbase for their Windows operating system. Three vulnerabilities in Windows Vista and Windows 2008 were fixed in a patch released by Microsoft on September 8th, but no such fix was provided for users of Windows XP or 2000.

While only two of the three holes affect XP and 2000 (and go to show just how much swiss cheese Vista really is), Microsoft has stated that they can't be fucked to plug the holes.

In a webcast release September 9th, which is probably edited to include 10% more lies, Microsoft insecurity program manager Adrian Stone, and his fellow ass pirate and program manager Jerry Bryant, stated that the code that they blatantly ripped off from BSD is around 15 years old, and that they were too lazy to bother fixing the code, thus users of Windows XP and 2000 were shit out of luck. (Webcast transcript here)

Microsoft's pitifully lame excuse as to why they weren't patching Windows XP was this: "By default, Windows XP SP2, Windows XP SP3 and Windows XP Professional x64 Edition SP2 do not have a listening service configured in the client firewall and are therefore not affected by this vulnerability," the bastards said. "Windows XP SP2 and later operating systems include a stateful host firewall that provides protection for computers against incoming traffic from the Internet or from neighboring network devices on a private network."

To make matters worse, Microsoft even tried to downplay the impact of their swiss cheese security. Their claim is that the attack would just cause a machine to stop responding because the network stack would suck RAM like there's no tomorrow, and that the attack would require that someone send specially crafted TCP packets (probably with a payload of Viagra spam) in a sustained mass flood, much akin to the the flood of shit that spews from Steve Ballmer's mouth every time it opens, and that the machine would return to normal once the attack stopped.

Ironically, Microsoft tried to pull the same shit back on 2003 in regards to Windows NT 4.0. They argued that they fucked up the code for Windows 2000 and later too badly for any fix to be backported to Windows NT 4.0.

Monday, August 31, 2009

How To Call Landlines With VoIP... And Not Pay For It

Update: 2009-11-13
Yesterday (2009-11-12), Google acquired Gizmo5. Downsides: The bit about configuring a Google Voice number below is no longer possible (this configuration part is completely gone), and more importantly, Google has closed Gizmo5 account sign-ups for now.

Read more at Google's Gizmo5 page at http://www.google.com/gizmo5/, and you can read the official Google Voice blog post at http://googlevoiceblog.blogspot.com/2009/11/google-welcomes-gizmo5.html.

Original blog post, unmodified, is as follows:

Well, I hate paying for phone service, as does everyone else. For the longest time, my only phone was a shitty TracFone, and for $20/month, I'd get a whopping 60 minutes of talk time.

How fucking impressive.

The worst part was that SMS is also expensive, costing 0.3 minutes of talk time per message sent or received, coming to about 3 minutes of talk time for every 10 messages in and out.

Until I found Google Voice.

Google Voice was originally something I used to replace the SMS on my phone, as you get unlimited and free SMS to any phone in the US and Canada. However, this did not solve the phone issue, as Google Voice requires a real phone to use the service.

Well, one day, I got bored, and decided to see if I could use my Gizmo SIP number with Google Voice. To my utter amazement, it works, and since then, I have had nothing but free, FREE, unlimited calling from and to any landline in the US and Canada, using a simple VoIP app.

You want to do this? You want to tell your phone company to take a hike?


There's one thing that's not mentioned in that article. Read that article before you continue below.

Read the article? Good. Now, you may notice that it says that to PLACE calls, you have to use the Google Voice web page, and have Google Voice call your Gizmo.

Not anymore. Gizmo5 now supports calling though Google Voice in the same free manner, directly from Gizmo5. You place a call from within Gizmo5 as if you had paid for Gizmo5 call-out credit.

But to do this, you need to change some account settings.

Login to your Gizmo account via the Gizmo website, and pull up your account settings.

There should be a new option there, labeled "Google Voice", and should look like this:



Click the "ON" radio button, type in your Google Voice number, and that's it! You no longer need to go to the Google Voice site to call out using Google Voice.

Wednesday, June 24, 2009

The idiocy of YouTube

When I saw this video, I fucking lul'd so hard.

This kid is retarded, and yet another example why sex education needs to emphasize on "not fucking your brothers and sisters" cause this kid is obviously the result of incest.

Monday, June 08, 2009

Death To Cloud Computing, And Why Gmail's IMAP Access Sucks

NOTE: I did not finish this post, I decided to post it as-is two months later.

First of all, let me start this off with a very clear message: FUCK CLOUD COMPUTING.

While, yes, I'll admit I really have no idea what this so-called "cloud computing" is, it sounds like a load of useless shit to me.

A good friend of mine pointed me at a cloud computing project called Eucalyptus (http://eucalyptus.com/), which is an open-source cloud computing implementation, which supports the Amazon S3 and EC2 APIs. They also have a public-access cloud setup for people to demo the software in action (presumably for users like me that lack the infrastructure to host my own cloud). So I go and setup a new account, download Amazon's EC2 API tools, and the X.509 certificates I need for the cloud.

OK, let do this thing... not so fast!

They give you an automagical shell script to setup your environment variables (aside from EC2_HOME; this is for the EC2 tools themselves, pointing the directory they are installed in, and this is an aesthetic choice, left for the user to decide when she installs). However, (and this is my fault for using Micro$hit WinDOS) the script is only of use to UNIX users, so you have to manually set your environment variables (although having the script on hand will prove useful). Now, I setup all the environment variables, following the UNIX shell script as a guide.

The shell script looks something like this:
EUCA_KEY_DIR=$(dirname $(readlink -f ${BASH_SOURCE}))
export S3_URL=http://128.111.45.118:8773/services/Walrus
export EC2_URL=http://128.111.45.118:8773/services/Eucalyptus
export EC2_PRIVATE_KEY=${EUCA_KEY_DIR}/euca2-segin-xxxxxxxx-pk.pem
export EC2_CERT=${EUCA_KEY_DIR}/euca2-segin-xxxxxxxx-cert.pem
export EUCALYPTUS_CERT=${EUCA_KEY_DIR}/cloud-cert.pem
export EC2_ACCESS_KEY='2UC-AbUnChOfRaNdOmNeSs-A'
export EC2_SECRET_KEY='SoMeMoRe_RaNdOmChArAcTeRs_FoRaCrYpToChAlLeNgE'
alias ec2-bundle-image="ec2-bundle-image --cert ${EC2_CERT} --privatekey ${EC2_P
RIVATE_KEY} --user 000XXXXXXXXX --ec2cert ${EUCALYPTUS_CERT}"
alias ec2-upload-bundle="ec2-upload-bundle -a ${EC2_ACCESS_KEY} -s ${EC2_SECRET_
KEY} --url ${S3_URL} --ec2cert ${EUCALYPTUS_CERT}"

Roughly translated into NT cmd.exe syntax, you get this (computing the top line by hand)

set EUCA_KEY_DIR=C:\Documents and Settings\Segin\.ec2
set S3_URL=http://128.111.45.118:8773/services/Walrus
set EC2_URL=http://128.111.45.118:8773/services/Eucalyptus
set EC2_PRIVATE_KEY=%EUCA_KEY_DIR%\euca2-segin-xxxxxxxx-pk.pem
set EC2_CERT=%EUCA_KEY_DIR%\euca2-segin-xxxxxxxx-cert.pm
set EUCALYPTUS_CERT=%EUCA_KEY_DIR%\cloud-cert.pem
set EC2_ACCESS_KEY=2UC-AbUnChOfRaNdOmNeSs-A
set EC2_SECRET_KEY=SoMeMoRe_RaNdOmChArAcTeRs_FoRaCrYpToChAlLeNgE

All right! So you should be set. Notice that in the above blocks, all cryptographic keys and IDs were removed, so if you try to copy and paste from the code abone, it will not work as-is. Fill in your own (real) details.

Now, let it be known that, yes, I did RTFM. I made sure I had both the Amazon and Eucalyptus documentation open in Chrome throughout the experience.

So, I finally get the the magical bit, where they tell me to me

Intel's Laptop Gaming SDK Sucks

Well, fuck me.

I have an Acer Aspire One, and I decide I want to play Guitar Hero III: Legends of Rock on it. A quick search of Google tells me that, before I get started, I am going to need to use 3DAnalyze. It also reveals YouTube video of it working on this very laptop.

Well, fuck, it doesn't seem that hard. All I have to do is set "Emulate Hardware TnL", and set a VendorID and ProductID to that of a nVidia card (and the 3DAnalyse window gives some ID values for nVidia cards to use, making that non-trivial).

Sure, whatever, should work. It works for other people, should work for me. Do exactly what they do, it should work.

Right, nothing in life is ever that simple.

So I go start up 3DAnalyse, I set the options, and start the game. But, when you go to actually

But why? It's a pretty random crash, and there seems to be no documented cases of this bug. Worse off, most gamers that have computer expertise, that expertise is usually in hardware, and some basic Windows troubleshooting. Sadly, the only way I was even able to pinpoint the problem is because I know the inner workings of software.

I can start the game, get to the main menu, set settings, etc., but anything that tries to show shiny 3D graphics causes a crash in the Intel Laptop Gaming SDK DLL (IntelLaptopGaming.dll), which sucks ass. Particularly, go to Quickplay, select a difficulty (any will do), select a song (any will do), and wait on the "Loading" screen. When it's done loading, say "Hello, desktop!" as the game crashes and dies.

I have the GNU debugger setup as my system debugger. GDB shows that the crash happens in the Intel DLL, about 2-3 functions deep from GH3.exe. What is going on, I can't tell, due to the black-box nature of commercial software.

To date, I have no idea what's wrong.

If it matters, I am running Windows XP Home Edition, Service Pack 3.

Saturday, March 21, 2009

Morality Subverted

I obviously have no idea how to title a blog post, but, whatever. I start here by typing away unimaginativly on my keyboard, listing to the like of Avenged Sevenfold and 30 Seconds To Mars. I feel pathetic, useless, and stupid. I look around me, there is a friend of mine, 20 or 21 or so, just opening and closing his clamshell mobile. There's a fat woman in the lounge chair that could be the cryptkeeper, and is utterly and totally blind to how the real world works (or rather, how it has worked since the 1980s). There is an old guy sitting next to me, in his mid 50s. These three people talk, nearly oblivious to my presence. On top of that, the woman is the mother of the 50-something man sitting next to me, and he is the father of my friend, who is sitting by the window.

I am bored. I want to leave, go somewhere, and shoot myself. My laptop's battery is almost dead, the TV is set to the TV Guide Channel, with an never-ending scrolling TV guide rolling along the bottom of the screen.

Monday, September 22, 2008

Friday Night Lock-In

Free Image Hosting at www.ImageShack.us

This image is from a school event held Friday September 19, 2008.
My school's theater department held a little party in the school auditorium after school
where we sat around for 6 hours and played Rock Band (you see me there in the red striped polo shirt with the RB guitar controller). I have to say it, but I am addicted to this game as if it were crack cocaine. Yes, it is that addicting.

Note: However, they had me do the vocals to "This Ain't A Scene, It's An Arms Race". Please, pity me.

Friday, January 18, 2008

Frets on Fire and OpenGH...

I have recently had the itch to get an open-source Guitar Hero clone for the PC. However, as I had no Internet connection at the time, I had no idea that Frets on Fire existed, so I decided to create my own open source clone, called OpenGH. As it sits, OpenGH is a pre-alpha-non-working technical demo, however, the interface is there and such as displaying song info and getting joystick input all works. It is written in FreeBASIC and uses the built-in graphics library so that the Linux framebuffer is supported at no expense :)

Post unfinished, more to come...


Powered by ScribeFire.

Thursday, November 15, 2007

Elightenment for speed? Not really!

I have, in the past, used KDE 3.5 on a AMD K6-2 machine at 420MHz. The system has 256MB of RAM and was my DVR. It had an original ATI All-In-Wonder for video and TV, and a 20GB HD. KDE would start in less time with more features enabled than on most modern machines. This was usually around... 20 seconds.

It should be noted that I used NetBSD as my core OS, though I don't think that the difference should make a difference. If Linux is too slow or the GNU libc is too slow to facilitate starting KDE from "startx" to fully loaded in 20 seconds, then we got a serious problem.


Powered by ScribeFire.