mobile_hypervisor

Challenges in Mobile (Smart Phone) Virtualization

We have virtualization on servers, desktops, laptops and what’s next? Naturally, the “smart phone”. Today’s mobile phones have become quite powerful that one can easily virtualize them and run multiple operating systems. But,

Why do you need smart phone virtualization?

Similar to desktop virtualization, the use-case is not that clear, but there are some benefits that can be gained.

  1. Reducing vendor lock-in. Can you run iPhone applications on an Android phone? Currently, no, but with virtualization this might be possible. There are issues with Apple (or other vendors)’s mobile OS licensing that make it illegal to do so, right now. You can only run iOS on Apple approved devices, but this may change in the future. Many old phones have legacy applications and libraries that can be run in virtualized sandboxes as well.
  2. Mobile cloud computing. You can clearly access the so-called “cloud” from a smart phone, but if smart phones are virtualized, mobile applications can be migrated to a cloud and back seamlessly. This is still a pipe-dream and a few research platforms (MAUI and CloneCloud) are proposed to make this a reality. The benefits of doing this are enormous: one can potentially access infinite compute and storage resources on the smart phone.
  3. Security. This is probably the strongest argument for mobile virtualization. The popularity of smart phones is making them a prime target for malicious hackers. Malware, Viruses and other nasty stuff are making their way into smart phones, which currently don’t have much protection against them. It’s not easy to run Anti-virus software on a mobile phone, as the current AV software is very resource hungry making it unsuitable for smart phones.
  4. Isolation. This is related to security. It will be possible to have different user profiles with different levels of access (say work and home) with mobile virtualization. VMware recently demonstrated, how multiple user profiles can co-exist in the same phone at Mobile Congress 2011.
  5. Ease of development. This is an indirect benefit for mobile phone developers. Virtualization can make the development of mobile applications easier by removing the need for maintaining multiple versions of the same application for different operating systems.

Challenges

Before you start seeing virtualized mobile phones, there are still plenty of challenges that need to be solved.

  1. Limited resources. Though, the CPUs on mobile phones are getting more and more powerful, they still have limited battery and storage space. Virtualization usually adds more burden to the resources and is not necessarily energy-aware.
  2. Poor connectivity . Mobile cloud computing sounds like a great idea, but mobile phones often experience variable connectivity. It’s not easy to implement disconnected operations for storage and for seamlessly migrating computation.
  3. Poor performance. Virtualization adds performance overheads, which are still being researched in server virtualization environments. It’s not clear whether the overheads are worth the effort on a mobile phone.

These challenges can be overcome and it’s only a matter of time before smart phones are virtualized. Some current players in the market are: VMware’s mobile virtualizaiton platform (MVP) and OKL4 MicroVisor. OKL4 claims to be the first open source mobile hypervisor, which is an exciting development that can lead to advances in mobile virtualization.

Share

How to Access Your Web Server within Your Local Network

If you are hosting a web server at home and using your router’s port forwarding to redirect requests from WAN port to WebServerHost:80, there’s an annoying problem in some routers: you cannot access the web server from inside the network. There are multiple reasons why this might happen.

  1. The router assumes that all traffic from internal hosts to port 80 are for the router admin interface. This is annoying, as you just get to the router’s web admin page. Solution: you can port forward from another port (say 8000) to your WebServer’s port 80. Now, you can access the website with http://my.site.net:8000. You are out of luck, if your router does’t allow port forwarding to a different port (say WAN:8000->WebServerHost80 instead of WAN:80->WebServerHost80).
  2. You have two or more routers with different subnets and the routing is messed up. This is a difficult problem to diagnose and often the router’s admin interfaces are not that amenable to debugging routing problems. I suggest changing your firmware to DD-WRT, if you can.
  3. Port forwarding doesn’t work for incoming traffic from local ports on the router. I think this is probably the most common reason. Without DD-WRT, there’s no easy way to fix this. Solution: One simple way to solve this is to set a hard-coded DNS entry in /etc/hosts (Linux) or c:\WINDOWS\system32\drivers\etc (Windows) as follows.
    192.168.x.x        my.site.net
    

    192.168.x.x is the internal IP address of the WebServerHost

Share

Computer Science Conferences – Statistics and Acceptance Rates

There are a bunch of sites with statistics on computer science conferences, but it always bothered me that there was no central place to search for conference statistics like acceptance rates. I also wanted to have a visual display of statistics similar to Google Finance. In this age of AJAX and Web 2.0, the web page should also be very fluid.

My first attempt to build such a web page is here. Right now, it scrapes the data from Kevin Almeroth’s excellent stats page and presents it in a visual form. The scraping is still a bit rough, so there might be some errors. I would like to add more features like comparing conferences, searching and adding more conferences.

Leave your comments and suggestions below.

Share

Best Resources to Learn about Linux Kernel Internals

The Source

The best resource is the kernel source.

Books

Obviously, it’s not that easy to dive into thousands of lines of code. I suggest starting with reading the books explaining Linux kernel in general.

  • Understanding Linux Kernel. This is one of the first books to provide in-depth explanations. Vastly improved over multiple editions, the current one is a very good read.
  • Robert Loves’ book. Love is a core developer, who implemented pre-emptive kernel and other features. I haven’t personally read this, but I have seen good reviews of this.
  • If you are specifically looking for networking aspects, this is an excellent book on understanding linux networking internals.
  • For device drivers, similarly, this book is very useful.

Other resources

  • LWN’s kernel page has lots of great articles explaining kernel internals
  • TLDP’s TLK. Somewhat outdated, but useful.
  • Linux Journal’s KernelKorner has some excellent articles, most of which are freely available online.
  • The Linux Kernel Hackers’ Guide, compiled by Michael K. Johnson of Red Hat fame. Includes among other
    documents selected Q/A’s from the linux-kernel mailing list.

HOWTOs

Lists of links

Share
img5

How to Convert PowerPoint Images to PDF

I am doing this a lot more often these days, want to convert the pretty images I created with PowerPoint into PDF, so that they are more amenable to Latex/PdfLatex. For fun, I prepared an illustrated HOWTO. Here you go, should be easy to follow.

Let’s say you have a slide with following picture.

Presentation slide with an image

First, you want to save the slide as PDF.

Don’t save it yet. Choose options to make sure that you are selecting only one slide.

As soon as you save it, Adobe Acrobat will open it. You may want to remove all the extra white space around it. To crop the image, you will need the Acrobat Writer (Reader is not enough to do the following task). Choose the crop tool, as shown below.

Choose the region you want to crop, and double click inside the region. You will see a dialog similar to the one shown below.

Press ok, and you are done.

Have fun!

P.S. On Mac, you don’t have any hassle. Just select the region you want to put in image. Right click and save as picture (choose PDF as the file format).

Share

How to Build Custom Xen Kernel Based on CentOS/RHEL Xen Kernel

The HOWTO on compiling CentOS kernel based on RHEL code base (currently 2.6.18) is overly complicated. Follow the following steps to build a custom Xen kernel, maybe with different kernel configuration.

  • Setup the rpmbuild directory, and install prerequisite packages.
    mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
    sudo yum -y install rpm-build redhat-rpm-config unifdef kernel-devel kernel-xen-devel
    
  • Grab the kernel source RPM, you want to modify and compile, and install it.
    wget -c http://mirrors.kernel.org/centos/5/updates/SRPMS/kernel-`uname -r`.src.rpm
    rpm -i kernel-`uname -r`.src.rpm
    
  • Create the spec file for the downloaded kernel
     cd ~/rpmbuild/SPECS
     rpmbuild -bp --target=`uname -m` kernel-2.6.spec
    
  • Modify the config to your needs. The config file are stored in ~/rpmbuild/SOURCES.
  • Modify the buildid. This is a good practice, if you are making extensive changes.
     cd ~/rpmbuild/SPECS
     sed -ibak -e 's/#% define buildid/%define buildid .ppadala/' kernel-2.6.spec
    
  • Build the kernel
     cd ~/rpmbuild/SPECS
     sudo rpmbuild -bb --with xenonly --without debug --without debuginfo --target=`uname -m` kernel-2.6.spec
    
  • This will generate a RPM that you can install on other machines as well.
Share