OPS145 Lab 1 Newversion
By the end of this lab you'll have a Linux machine with a graphical inerface set up. You will use this for the rest of the course.
Virtualization
Normally all the software on your computer will ask the operating system kernel to do things, and the operating system will pass on those requests to the hardware. The kernel has exclusive control of the hardware. That's why you can only have one operating system running at one time.
If you have more than one operating system installed on your computer (e.g. Windows and Linux): you'll have to choose which one you want to use when you boot your computer.
That's fine for workstations: you own your computer, you use it when you want to, and noone else gets to touch it. When your computer gets old enough to be annoying: you look to upgrade it or buy a new one. For servers that's very wasteful. A computer, whether it's used or not:
- Costs money to buy, and it loses its value just because time passes. Computer technology becomes obsolete in just a few years. That's called depreciation, and it means the cost per day of owning a computer is the same whether it's serving customers or gathering dust in a closet.
- Costs money to run. Even when idle (not serving any requests): the CPU, RAM, and other components use electricity. That cost is small enough to ignore for a personal computer, but in a business with hundreds or thousands of servers that adds up to a meaningful expense.
- Costs money to have connected to the internet, either directly or via a local network. Internet connections aren't free, and local networks don't build nor maintan themselves.
Given these realities: it's always been clear in a business environment that computer resources need to be shared. But sharing a computer between people who have different interests presents security concerns. You don't want your competitors to have access to your files, and I don't want you to see what applications I'm running, but if we're both using a computer from a third party provider: those security concerns are difficult to address as long as we're using the same operating system.
To get complete separation between clients A and B: the clients need to use separate operating systems, with the kernel from client A having exlusive access to the hardware allocated to client A, and the kernelf from client B having exlusive access to the hardware allocated to client B.
A relatively new (couple of decades old) development in computers is cheap and efficient virtualization. A virtualized operating system (the guest) mostly doesn't have access to the real hardware of the computer. It only has access to the kernel of the host operating system. So as long as the kernel of the host operating system is secure: none of the guests will have any access to each others' resources.
In other words: the host operating system is acting like the hardware for the guest. As far as the guest operating system knows: it's running on real hardware.
This sort of setup used to be very slow, because every instruction which the guests needs to sent to the CPU had to be sent to the host kernel first, the host sent it to the CPU, and then send it back to the guest. These days this performance bottleneck has been solved with some extra instructions in modern CPUs called hardware virtualization.
Today virtual machines are still slower than real machines, but their performance is comparable. And you can run several virtual machines on one computer, making the setup more cost-efficient overall.
Your workstation setup
The software which manages virtualization is called a hypervisor. The host operating system runs the hypervisor. We're going to use VirtualBox as the hypervisor for this course.