Bagus' OS202 Page!

Logo

Join my adventure in exploring Operating Systems!

View the Project on GitHub baguspr/os202

HOME


TOP 10 LIST WEEK 01

1. Operating-System Debugging
Debugging is the activity of finding and fixing errorsin a system, both in hardware and in software. Performance problems are considered bugs, so debugging can also include performance tuning, which seeks to improve performance by removing processing bottlenecks. Debugging user-level process code is a challenge. Operating-system kernel debugging is even more complex because of the size and complexity of the kernel, its control of the hardware, and the lack of user-level debugging tools. A failure in the kernel is called a crash. When a crash occurs, error information is saved to a log file, and the memory state is saved to a crash dump. Operating-system debugging and process debugging frequently use different tools and techniques due to the very different nature of these two tasks.

2. Benefits and Features of Virtual Machine
One important advantage of virtualization is that the host system is protected from the virtual machines, just as the virtual machines are protected from each other. A virus inside a guest operating system might damage that operating system but is unlikely to affect the host or the other guests. One feature common to most virtualization implementations is the ability to freeze, or suspend, a running virtual machine. Many operating systems provide that basic feature for processes, but VMMs go one step further and allow copies and snapshots to be made of the guest. The copy can be used to create a new VM or to move a VM from one machine to another with its current state intact. The guest can then resume where it was, as if on its original machine, creating a clone. Another advantage of virtual machines for developers is that multiple operating systems can run concurrently on the developer’s workstation. This virtualized workstation allows for rapid porting and testing of programs invarying environments. In addition, multiple versions of a program can run, each in its own isolated operating system, within one system.

3. Hardware Assistance
Without some level of hardware support, virtualization would be impossible.The more hardware support available within a system, the more feature-rich and stable the virtual machines can be and the better they can perform. All major general-purpose CPUs now provide extended hardwaresupport for virtualization. I/O is another area improved by hardware assistance. Consider that thestandard direct-memory-access (DMA) controller accepts a target memoryaddress and a source I/O device and transfers data between the two without operating-system action. Without hardware assistance, a guest might try to set up a DMA transfer that affects the memory of the VMM or other guests. Similarly, interrupts must be delivered to the appropriate guest and must not be visible to other guests. By providing an interrupt remapping feature, CPUs with virtualization hardware assistance automatically deliver an interrupt destined for a guest to a core that is currently running a thread of thatguest.

4. Types of Traditional Virtual Machines
Type 0 Hypervisor: A hardware feature, and that brings itsown positives and negatives. Operating systems need do nothing special totake advantage of their features. Type 1 Hypervisor: A special-purpose operating systems that run natively on the hardware, but rather than providing system calls and other interfaces for running programs, they create, run, and manage guest operating systems. Type 2 Hypervisor: Less interesting, another process run and managed by the host, and even the host does not know that virtualization is happening within the VMM.

5. Programming-Environment Virtualization
Another kind of virtualization, a programming language is designed to run within a custom-built virtualized environment.If we define virtualization as including only duplication of hardware, this is not really virtualization at all. We can define a virtual environment, based on APIs, that provides a set of features we want to have available for a particular language and programs written in that language.Java programs run within the JVM environment, andthe JVM is compiled to be a native program on systems on which it runs.

6. Memory Management in Virtual Machine
In virtualized environments, there are more users of memory, leading to more pressure on memory use. Further adding to this pressure is the fact that VMMs typically overcommit memory, so that the total memory allocated to guests exceeds the amount that physically exists in the system. Before memory optimization can occur, the VMM must establish how much real memory each guest should use. To do that, the VMM first evaluates each guest’s maximum memory size. General-purpose operating systems do notexpect the amount of memory in the system to change, so VMMs must maintain the illusion that the guest has that amount of memory. Next, the VMM computes a target real-memory allocation for each guest based on the configured memory for that guest and other factors, such as overcommitment and system load.

7. Emulation
Emulation is used when a host system has one architecture and the guest was compiled for a different architecture. Every instruction the guest wants to execute must be translated from its instruction set to that ofthe native hardware. Although this method involves some performance penalty, it is balanced by the usefulness of being able to run old programs on newer, incompatible hardware or run games designed for old consoles on modern hardware.

8. VMWare
VMware Workstation is a popular commercial application that abstracts Intel x86 and compatible hardware into isolated virtual machines.VMware Workstation is a prime example of a Type 2 hypervisor. It runs as an application on a host operating system such as Windows or Linux and allows this host system to run several different guest operating systems concurrently as independent virtual machines.

9. The Java Virtual Machine
The JVM is a specification for an abstract computer. It consists of a class loader and a Java interpreter that executes the architecture-neutral bytecodes. The class loader loads the compiled .class files from both the Java program and the Java API for execution by the Java interpreter. After a class is loaded, the verifier checks that the .class file is valid Java bytecode and that it does not overflow or underflow the stack. TheJVM may be implemented in software on top of a host operating system, such as Windows, Linux, or macOS, or as part of a web browser.Alternatively, theJVMmay be implemented in hardware on a chip specificallydesigned to run Java programs. If theJVMis implemented in software, theJava interpreter interprets the bytecode operations one at a time.

10. Application Containment
The goal of virtualization in some instances is to provide a method to segregateapplications, manage their performance and resource use, and create an easyway to start, stop, move, and manage them. In such cases, perhaps full-fledgedvirtualization is not needed. If the applications are all compiled for the sameoperating system, then we do not need complete virtualization to provide thesefeatures. We can instead use application containment. Containers are much lighter weight than other virtualization methods.That is, they use fewer system resources and are faster to instantiate anddestroy, more similar to processes than virtual machines. For this reason, theyare becoming more commonly used, especially in cloud computing. Containers are also easy to automate and manage, leading to orchestration tools like docker and Kubernetes. Orchestration tools are means of automating and coordinating systems and services. Their aim is to make it simple torun entire suites of distributed applications, just as operating systems makeit simple to run a single program.