1. Problem 1 (20 points): Why is the execution environment of a Java class called a virtual machine? How does this virtual machine compare to a real machine running code written in C? Answer: Java files are executed on Java Virtual Machine which is not a real machine. This is a software application which acts like a real machine and make a complete environment like heap, memory, stack, CPU etc virtually. Basically it is layer of software between the OS and the application program. That's why it is called a Virtual Machine. Virtual Machine will see the resources which administrator sets in settings e.g. if we set 1 GB for virtual machine, code will use only this memory even if real machine have more free memory. When code runs in virtual …show more content…
5. Problem 5. (20 points) What is the difference between multiprogramming and multiprocessing? Multiprogramming and multithreading? Answer: Difference between multiprogramming and multiprocessing: Multiprogramming is the ability of an operating system to run multiple processes on a single processor machine. E.g. we are running MS Word, notepad and media player on a single CPU machine and all the running simultaneously. Multiprocessing is the ability of operating system to run multiple processes on multiple processors (CPUs). Processes are divided and assigned to different CPUs to perform the task. So basic difference is that if OS run multiple processes on single processor, this is multiprogramming and if multiple processes are running on multiple CPUs is called multiprocessing. Difference between multiprogramming and multithreading: Multiprogramming is the ability of an operating system to run multiple processes on a single processor machine. E.g. we are running MS Word, notepad and media player on a single CPU machine and all the running simultaneously. Multithreading is the ability of operating system to run divide and run different parts of a process on a single CPU to obtain the same but fast result. Different parts of the code which run simultaneously are called
Processor: A computer processer, otherwise known as the CPU (Central Processing Unit) is a part of the computer that receives input and decides that the output will be. Many modern CPUs are capable of processing trillions of calculations per second. The speed of a processor measured by how many operations a CPU can do in one second; this is done in MHz or GHz (Megahertz or Gigahertz). A processer with the speed of 1 MHz does 1,000,000 operations per second, and a 1GHz processer does 1,000,000,000 operations per second. This is known as the clock speed.
Symmetric multiprocessing: here all the processors are treated as equals and I/O operations can be
Symmetric multiprocessing treats all processors similarly. I/O can be processed on any processor. The processors interconnect with each other as needed. It allows many processes to be run at once without corrupting performance. Symmetric multiprocessing treats all processors similarly. I/O can be processed on any processor. The processors interconnect with each other as needed. It allows many processes to be run at once without corrupting performance. Three advantages of multiprocessing are: Increased throughput - with more processors, more work can be accomplished in less time; Economy of scale - peripheral devices may be shared amongst multi-processor systems; increased reliability - if one processor crashes, then the others may continue to operate. One disadvantage of a multi-processing system is the added difficulty in operating system and possibly application software. Another limitation of SMP is that as microprocessors are added, the shared bus get overloaded and becomes a performance bottleneck. Symmetric Multiprocessor Master-slave multiprocessor is not reliable as if the master processor fails the whole system goes down.
Generally processes can be described as I/O bound or CPU bound. I/O bound spends more time in doing I/O operations rather than other computations. CPU bound is contrast to I/O bound, which spends time doing all other
A multicore CPU has various execution centers on one CPU. Presently, this can mean distinctive things relying upon the precise construction modeling, however it fundamentally implies that a sure subset of the CPU's segments is copied, so that various "centers" can work in parallel on partitioned operations. This is Chip-level Multprocessing (CMP).
In spite of the fact that multiprocessors have numerous favorable position it additionally have some detriment like complex in structure when contrasted with uni-processor framework.
The program by its self is just instructions writing in code where a process is an active program which has been executed. The CPU executes one instruction at a time until the process completes.
In contrast, the parallelism is a condition that comes when at least two threads are executing at the same time''. It is possible for two threads to make progress, though not at the same
The processor (otherwise known as CPU) is the very soul and performance core of the computer system; it is what allows the operating system and other software applications to-run. Every program demands dedication from the processor to decode commands that are then actionedinside the CPU to make them work.When a program is running, the CPU has to make every command work consistently one after the other. However, modern processors have the power to process commands side by side. This means that the quicker the commands are executed, the quicker the program responds to the user. Central Processing Units (CPUs) play an important role when it comes to maintaining
In Symmetric Multiprocessor systems performance is high since each processor will have its own CPU, registers and cache. The processes will be allocated to each processor separately and each process runs on its own. So, if there are 3 processes then there will be 3 CPU’s which runs simultaneously and hence all the 3 processes will be completed at the same time. But in Asymmetric Multiprocessor systems performance is not high as symmetric because the operating system can process only one request at a time. Only after the process allocated
4. Applications where various of machines can be doled out for each to do a task e.g every processing a single file
Special hardware can differentiate the multiple processors, or the software can be written to allow only one boss and multiple workers. For instance,
As technology advances, the processes that we use to manage that technology become more demanding, creating the need for new software and efficient processors. “The central processing unit or (CPU) is the heart of your computer and is used to run the operating system as well as all the programs.” (Chris Hoffman, CPU Basics: multiple CPU’s, cores and hyper threading explained.) With so much power in a single chip, we have created a powerful piece of technology that can be placed virtually anywhere.
Concurrency: The ability of software to service multiple requests to the same resources at the same time.
To support our hypothesis we also argue that the challenge of future multicore hardware is best met by embracing the networked nature of the machine, rethinking OS architecture using ideas from distributed systems. We investigate a new OS structure, the multikernel, that treats the machine as a network of independent cores, assumes no inter-core sharing at the lowest level, and moves traditional OS functionality to a distributed system of processes that communicate via message-passing.