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
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
Symmetric multiprocessing: here all the processors are treated as equals and I/O operations can be
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
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
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 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.
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 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.
4. Applications where various of machines can be doled out for each to do a task e.g every processing a single file
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).
Multiprocessing is a mode of operation in which two or more processors in a computer simultaneously process two or more different portions of the same program or set of instructions. Multiprocessing refers to a computer system’s ability to support more than one process or program at the same time. Multiprocessing operating systems enable several programs to run parallel (Hosch). It is typically carried out by two or more microprocessors, each of which is in a central processing unit (CPU) on a single tiny chip. Supercomputers typically combine thousands of such microprocessors to interpret and execute instructions. UNIX is one of the most broadly used multiprocessing systems used today; others include OS/2
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.
Concurrency: The ability of software to service multiple requests to the same resources at the same time.
In the computer world, multiprocessing is currently the fastest and most reliable way to create faster computing computers. This will remain so in the future and will only allow computers to become faster and more reliable.
In a multiprogramming system, in directive to share the CPU, a quantity of progressions must be kept in memory.