1. What is the difference between multiprogramming and multiprocessing? Multipro
ID: 3863418 • Letter: 1
Question
1. What is the difference between multiprogramming and multiprocessing? Multiprogramming and multithreading?
2. Why should assembly language be avoided for general application development? Under what circumstances is assembly language preferred or required?
3. Under what circumstances would you argue in favor of using assembly language code for developing an application program?
4. What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you choose to use an interpreted language?
5. A RISC processor has 152 total registers, with 12 designated as global registers. The 10 register windows each have 6 input registers and 6 output registers. How many local registers are in each register window set?
6. Indicate whether each of the following applies to CISC or RISC by placing either a C (for CISC) or an R (for RISC) in the blank.
_____ Simple instructions averaging one clock cycle to execute.
_____ Single register set.
_____ Complexity is in the compiler.
_____ Highly pipelined.
_____ Any instruction can reference memory.
_____ Instructions are interpreted by the microprogram.
_____ Fixed length, easily decoded instruction format.
_____ Highly specialized, infrequently used instructions.
_____ Use of overlapping register windows.
_____ Relatively few addressing modes.
For problems 7 through 9, consider a CPU that implements two parallel fetch-execute pipelines for superscalar processing. Show the performance improvement over scalar pipeline processing and no-pipeline processing, assuming an instruction cycle similar to figure 4.1 in the Section I B of “Advanced Systems Concepts”, i.e.:
· a one clock cycle fetch
· a two clock cycle decode
· a three clock cycle execute
and a 50 instruction sequence:
Show your work.
7. No pipelining would require _____ clock cycles:
8. A scalar pipeline would require _____ clock cycles:
9. A superscalar pipeline with two parallel units would require ______ clock cycles:
10.a. What is the essential characteristic of the superscalar approach to processor design?
b. What is the difference between the superscalar and superpipelined approaches?
Explanation / Answer
1.
2. Assembly level langauge is a low level language and is difficult to understand. So, debugging becomes extremenly tedious. Assembly also does not support OOP concepts. Hence, a well abstracted application cannot be built and it becomes difficult in developing software applications. In general, its avoided because assembly language is not writable. If you working with hardware development, integration, then you can use assembly for hardware programming.
3. I would choose Assembly language over others when I want to utilise the advanced features of my cpu. Like for example it's unlikely a compiler will recognize you're doing AES encryption and automatically it emits instructions from the AES set of instruction .
This is implemented as a function which contains inline assembly code and also provides an interface to the rest of the high level application program. Assembly language can also be used always for for hardware level programming.
4.In compiled languages, original program is translated to native machine instructions. These instructions are executed directly by the hardware and hence the speed of execution is high. Compiled code is usually more compact in nature. Most of the syntax errors and illegal reference errors are already eliminated.
Use interpreted languages when
Mutliprogramming Multiprocessing The CPU can execute only a single program at a particular time. Execution of more than 1 process simultaneously on a multi processor machine. Think of this as a single processor which runs multiple programs on a computer. Execution of multiple processes on different CPU's is possible. Example is a computer running both Microsoft word and Chrome on a single CPU. UNIX, Windows, Solaris are examples of Multiprocessing systems.Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.