Tuesday, June 14, 2005

Keeping busy

Many people have asked me about what I'm doing this summer. I usually give a short explanation that doesn't really do it justice. If you're interested, I'd like to take some time to explain in a bit more detail about what I'll be working on this summer.

I'm working for a company in Austin, TX, called National Instruments. The program that I'm a part of is called the Engineering Leadership Program, or ELP. The purpose of ELP is to give new hires and interns a chance to sort of sample the company and determine how they want to shape their career at NI, while continuing to gain experience with NI products. Basically, this means that ELPs work in the Applications Engineering department for 1-3 years and sort of alternate between doing things like phone support or teaching classes, and working on projects with other departments in the company.

As a 3-month intern in the program, basically what this means is that my internship has three parts: two weeks of LabVIEW training, a week of phone support on LabVIEW, and then a little more training and I move off to a sweet project in the consulting department. Oh look, a topic sentence.

My first two weeks at NI were spent in various orientation activities and an 8-day crash-course in LabVIEW. What is LabVIEW, you say? I'm glad you asked.

For that matter, what is National Instruments? NI creates "innovative computer-based products that improve everyday life. We give our customers a better solution for measuring and automating the world around them." So, the key words there are "computer-based," "measuring," and "automating." Traditionally, tests and measurements are done by large, dedicated pieces of hardware. If you need to measure voltage, you use a big voltmeter. If you need to monitor a signal, you get a big oscilloscope (fig. 1). These instruments are expensive, proprietary, largely non-interoperable, and have fixed functionality. By contrast, NI has pioneered the concept of the virtual instrument. In this approach, you just buy a data aquisition (DAQ) card (fig. 2) that goes in a PC or in one of our chassis. You can then control all of your hardware easily and intuitively using our graphical programming environment called, you guessed it, LabVIEW. It's cheap, it's small, it's customizeable, it's flexible, it's powerful, and our world-class support (provided by well-trained, knowledgeable engineers like myself) will be glad to help all along the way.

Fig. 1 Fig. 2
After two weeks of training, I then went on the phones for a week, which was definitely an interesting experience. Suddenly, after two weeks of training, I'm supposed to be the expert on a piece of software that many of our customers have been using for 15 years. I did better than I expected, though, and you would amaze yourself at how much you can learn while rambling away on the phone and clicking frantically around the LabVIEW help files (the fact that the user could have done this himself is beside the point). My favorite call was definitely the guy who called in and had some trouble running some software off of one of our training CD's. After restraining myself from saying "maybe you should just give up now," I proceeded to help him solve his problem. As I was wrapping up the call, he said "oh, by the way, you might want to know that there's a tech support phone number printed on this CD which goes to a phone sex service." Apparently we printed "800" instead of our area code. I thought about explaining to the customer that he had actually just reached our new customer satisfaction department which we were now directing customers to before routing them to our tech support department.

Now, I'm taking a few more classes on DAQ and some of our specialty products (LabVIEW real-time, LabVIEW FPGA, and motion-control). In another week or so, I'll move over to the NI Consulting Services group and begin working on a project to improve a demo that we use at trade shows and such. The demo consists of a scaled-down aircraft wing undergoing a deflection test. We use a motor with a lead screw to deflect the end of the wing and monitor the strain experience by the wing via 15 strain guages on the surface. The data is processed and displayed in pretty pictures and graphs.

Currently, the entire demo is run off of a single Windows-based machine. This includes all of the motion control, data aquisition (from 15 strain guages and a load cell), data processing, and visualization. The problem is that the processing demands get extremely high and even with an impressive computer the user interface starts to slow down and a lot of the visualization gets laggy.

My job is to redesign the system to use a separate, real-time system to do the motion control to administer the test. This will accomplish three things. First it will lighten the load on the PC so that it can focus on fancy analysis and display. Second, it will allow more precise control of the test itself (I'll be using a closed-loop architechture with a PID feed-back loop, in case you care). Finally, it will allow us to show off another really cool piece of NI hardware. The system I design will run on a box called compact Reconfigurable Input-Output, or cRIO. This is basically a little computer-in-a-box designed for time-critical (i.e. real-time) applications in extreme environments. It's rated for -40°F to 158°F and can take up to 50 gees of shock. This page describes some of the fun things you can do with cRIO (like launch it in a rocket or throw it off a building) and has a link to a great video. I heard they also ran over it with a Hummer.

The company is really cool, too. Everybody is really laid back and friendly. A few weekends ago my entire department (about 80 people) went tubing down the Guadalupe River, complete with a raft full of beer coolers. They also like to have "deck parties" whenever they can find an excuse (such as a new product release, or being rated one of the fortune-500 top 100 places to work for the 6th year in a row), where all the employees go hang out for a while at the end of the day (on the clock, for the interns) and eat and drink and such. My department is particularly fond of shooting rubber bands at each other whenever the opportunity presents itself. The guys right around me often play soccer in our cube.

So basically I'm getting paid to hang out with really cool people, learn lots of cool stuff, and play with some cool toys. Pretty sweet.

Tuesday, June 07, 2005

Sunday, June 05, 2005

The Cellular Revolution

Okay, time for my first "real" post.

In recent years, cell phones have revolutionized the way we communicate, and indeed our society itself. I recently realized the extent to which I have personally become dependent on this relatively new technology when I went to Europe for about two weeks, and between not having consistent internet access and my cell phone not working, I had this continual, uncomfortable feeling of being totally disconnected. My point is that not all that long ago, cellular phones were a novelty (I still remember my dad's 20 lb. carphone that worked slightly more often than Michael Jackson's plastic surgeries), and that today, most people, even if they don't own one, can't imagine going to back to the days of pagers, fax machines, and homing pigeons.

But this post isn't about cell phones. It's about another "cell" technology that I believe will have an even greater impact on society than the cell phone. Sony, Toshiba, and IBM (STI) have spent the last few years developing a new type of processor called the Cell Processor. STI has been pretty tight-lipped about the new architechture and there's a lot disagreement and speculation about the details and implications, but what is agreed upon is this: the cell processor will be powerful, flexible, and amazingly, rediculously, absurdly FAST. I've been reading quite a bit about this new technology (mostly here and here), and I'm convinced that it has the potential to displace the traditional "Wintel"-based PCs that now dominate the market. Of course, the first place you'll see these new processors is in the PS3, maybe as soon as early next year (manufacturing of the cell processor should begin at the end of this year).

Here's the idea. A traditional computer architechture has a CPU which is connected to main memory (a.k.a. RAM) and various I/O devices (such as disk drives, monitors, keyboards, mice, etc.). The CPU is where the action is, and they have gotten pretty darn fast in recent years (3+ GHz for a high-end desktop). As we approach the boundaries of silicon, though, it's getting harder and harder to get more transistors on a chip, which means that its getting harder and harder and more and more expensive to make faster processors. However, even though this is a significant problem, the real issue that is holding back processing speeds is that main memory and other I/O devices are by far the bottleneck in any system anyway. It doesn't matter how many operations the CPU can do per second if it can't get the instructions it needs to know what to do and the data it needs to do it on.

This problem has led to all kinds of fancy tricks in modern computer architechtures. Perhaps most noteable is the addition of "cache memory". The idea with a cache is that we put a small buffer of expensive but super-fast memory on chip, right next to the CPU and we try really hard to make sure that whenever the CPU needs new data or instructions, it can find them in the cache (where they can be obtained in a cycle or two), instead of having to go out to main memory (where access times are maybe 10 times that). Of course, to do this, we have to "guess" at what information the CPU is going to request next, so we use all kinds of techniques such as time locality ("we used this recently, maybe we'll need it again soon"), spacial locality ("we used this byte of data, so we'll probably use the next one, too"), frequency of use ("we've used this a lot, so we'll probably use it again"), branch predition ("last time we did X after doing Y, so maybe we'll do that again this time"), and all kinds of others.

Another trick that chip designers and operating system designers use is called Virtual Memory or "Paging". In this system, the computer divides a program up into sections called "pages". Since most of the code in most programs is never actually used (they say that roughly 90% of a program's time is spent in 10% of the code), the computer can then load only those pages into memory which the program actually needs. The proglem is that if the program suddenly needs some pages that aren't in memory, it has to go get them from the hard drive, which, in terms of processor speeds, take FOREVVVER. That's usually what's happening when you hear your hard drive clicking loudly all of a sudden and your computer starts going really slow.

As you can imagine, these things (and LOTS of other strange tricks) add a TON of complexity to a microprocessor. So much so that most of the real estate on a microprocessor chip is now going to things like cache (which usually has 2 "levels" now) and the logic to controll all of the complex (convoluted?) tricks.

All of this stuff also makes it difficult to run a multi-processor computer. To get an idea of why this is, imagine if two microprocessors are working on a set of data, and one of them wants to read the value of a variable from memory. What if the other processor is currently working on that variable and has a newer version in cache? Similarly, if we want to write a piece of data to memory, we must first see if the other processor is using that data, and if so, we need to let it know that there's a new version available.

The cell processor abandons all of this. No cache, no virtual memory, no branch prediction, a shallow pipeline, little multitasking, no user management, just bare-bones processing power. To a traditional microprocessor designer, this sounds like madness. I mean, after all, caching and paging and pipelining and all that really do speed things up... a lot, usually. That's why they've been developed. The answer is by using a cell-based architechture, which I will explain now.

A cell processor is actually 9 processors in one. The first processor is basically an IBM PowerPC microprocessor. It's job is mostly to distribute smaller jobs (called software "cells") to the other 8 processing units, which STI has given the very stupid name of "Synergistic Processing Units" (SPUs). These SPUs are where the real power lies. Each one has its own memory and they are all connected by a super-high-bandwidth bus, which means that they can talk to each other really fast. The whole thing will run at something like 4.6 GHz, which is pretty impressive itself, but the real shocker comes when you look at a different statistic, called floating-point operations per second (FLOPS). A traditional CPU can handle about 6 million floating-point operations per second (GigaFLOPS). Some high-end graphics processors can do around 50 GigaFLOPS, but these are very specialized for handling 3D graphics. A single cell processor can handle 250 GigaFlops! One writer compared a single cell processor to 5 overclocked dual-core Opterons (the Opteron is a top-end processor by AMD).

Now here's the kicker:

The PS3 will have 4(!) cell processors.

Because that's the amazing thing about cell processors. They're alreadly designed to be massively parallel, so if you want to increase performance, just add another one. The operating system will then take care of dividing your program up into software cells which can then be distributed to the hardware cells, which then process the data indepently and return the results. Connect the various cells on a high speed bus, or even accross a high-speed network connection (wireless?) and suddenly they can start cooperating. Picture the cell processors in your HDTV and PS3 helping out you desktop computer when you're not playing Final Fantasy XII.

Some applications will be more benifitted by the cell architechture than others. Things like graphics and sound, signal processing, and certain scientific applications will be especially (rediculously) helped. Some things (like servers, for example) won't be helped as much, because their programs are not easily vectorizeable (I'm not entirely sure what that means myself).

If it's not obvious already, this kind of computing power will be hard or impossible to match in the near future with a traditional-style computer architechture. In fact, the cell processor will be so much more powerful, that it will likely be easy to emulate, say, a Pentium 4 and run all of your favorite Microsoft-based applications (or operating systems). It is possible that in a few years, everyone will own a cell-based computer running Linux (or even OS X??). At the very least it will be interesting to see how companies like Intel, AMD, Mac, NVidia, and Microsoft deal with this new threat.

It'll be better than a picture-phone.

I can't wait.

Saturday, June 04, 2005

Say what?

So one thing you may have noticed about this blog is that I have a few strange words scattered around here and there. Why is this blog called "Lumos"? What's with that strange word that I sign my posts with and that I use as URL for this site? Why does it say "Don't Panic" over in the sidebar? In this post, I will answer all of these and hopefully reveal a little more about myself in the process.

Basically, it boils down to the fact that I'm a dork and I like to make references to things I find cool. Sometime's they're pretty overt (if you know the source); occasionally they're more obscure. Often I prefer not to explain them or draw attention to them, and just leave them for people to either enjoy or wonder about.

Since the ones I mentioned above are all posted prominently on the site, however, I feel a certain obligation to explain them. The first two are blatant references, and would make sense to anyone familiar with the original works. "Don't Panic" is a reference to Douglas Adams' series The Hitchhiker's Guide to the Galaxy. The quote appears "in large, friendly letters" on the front of The Guide. I thought it was an apt phrase to appear in at least small friendly letters on the front of my blog.

The title of this blog, "Lumos," is of course an unabashed reference to another of my favorite works, Harry Potter (by J.K. Rowling). The word is the incantation for a very simple but practical spell, which, if spoken when holding a wand, causes the wand to emit a beam of light. Take what meaning you will from this. Perhaps my blog will shed some light for you on an unfamiliar topic. Maybe my blog, light a ray of light in the darkness, is a beacon of hope in a lonely world. Maybe that's why all the colors on my page are so bright.

The reference in "Fëamacar" is much more subtle. In fact, it's more of a riddle than a reference, and as such, I've decided to leave the mystery for now and see if anyone can figure it out. Feel free to post your guesses or vent your frustration in the comments. Let me first just say that it has nothing to do with this guy, who is an even bigger dork than I.

Thursday, June 02, 2005

Statement of Purpose

Disclaimer: This is a working document and may be subject to chang without notice.

It is my goal to produce a worthwhile blog which will benefit anyone who chooses to read it. I will refrain from publishing entries which simply ramble, rant, preach, or otherwise waste the reader's time. That said, this is just a blog by a bored college student, so I can't promise that every entry will be totally enthralling and engaging. ;-)

Recognizing that the material of this blog is published for the world to read, I will not spread gossip, will not post confidential information, and will seek to make my posts edifying both to the reader and to those who may never read this blog. Likewise, I will not accept comments which violate these principles and I reserve to right to delete such posts.

What you may expect to see.

I will primarily use this blog for the following purposes:

  • To inform the reader about things that I find interesting. More specifically, I will try especially to focus on those things which I think many people may not already know about. Everyone has a unique set of interests, talents, and experiences, and I enjoy hearing about other people's, so I figure maybe others will like to hear about mine.
  • To keep friends and family (and strangers, if they care to knonw) informed about cool things going on in my life. Possible topics include, school, work, projects, trips, recreation, etc. These posts have the most potential to become mundane and uninspiring, but I think my life is pretty interesting, so maybe you will, too. I'll do my best.
  • To ask questions or prompt discussion. I'm always interested in hearing back from readers via comments, but I may from time to time post articles specifically to prompt discussion or to get opinions from readers.
  • To have fun. Don't expect it to be totally (or even mostly?) serious.
  • To experiment. Blogger provides a lot of cool features for web developers. I want to try some syndication stuff using their atom feeds. I'm going to try to post pictures using Picasa and Hello (two more excellent Google products). I'll probably experiment with email posting and voice posting. I may even try putting ads on here to see if I can make any money. Don't be surprised if the whole site changes looks spontaneously, either.

What you will not see

  • What I did today.
  • "OMG! I [love/hate] [person/place/thing]!"
  • "I'm so [happy/depressed/bored/etc.]!"
  • "Poll: would you rather have no tongue and no fingers, or two noses and three eyebrows?"
Also, now that I have a blog, some people may expect me to read and comment on their own blogs. I will take the same approach to other blogs as I hope others will take to my own: if I find it interesting, I'll read it; if I have something to say, I'll comment.

Alright! Now that all that's done, let's get to it! Read on!

Starting off on the right foot

Welcome to my blog!

After much time and peer pressure, I've finally gotten around to starting a blog. I had sort of intended to for a long time, but I haven't until now for two main reasons:

  1. Time. I didn't want to have a really lame blog where all I talked about were the stupid things going on in my life and I knew that's what it would be if I tried to start one during the school year.
  2. The whole idea seemed a bit... childish. I refused to be associated with a service that included blogs like this one and anything called "e-props."
Blogging has always had a certain appeal, though. Blogging is a great way to talk about all those random things that I find interesting, and to do so in a forum where others can read it if they so desire, or ignore it if they don't. It's also an easy way to keep people informed of what I'm currently up to. And now, (as you can see) I think I have overcome both of the obstacles I listed above.

The first issue was easy to solve: Now that school is out, I should have at least some spare time on my hands (although my internship and other demands of daily living still take up a lot of time), so I can't use that excuse any more.

The second issue took a little more for me to overcome. Basically, I decided that, like so many things in life, blogging can be whatever you make of it. Just because other people have stupid blogs, doesn't mean that I have to. So, in this spirit, I have written up a Statement of Purpose to guide this blog and to give the reader some idea of what to expect (and not to expect) from it.