MP Assignment 1
MP Assignment 1
Microprocessor systems
Assignment #1
Submitted to :
Submitted by:
Momina Javed
Fatima Sheikh
(BETE 55D)
Dated:4/6/2020
Architecture
1-1. Discuss the difference between thread and process
THREAD:
A thread computer science is short for a thread of execution. Threads are a way for
a program to divide (termed "split") itself into two or more simultaneously (or pseudo-
simultaneously) running tasks.
PROCESS:
DIFFERENCE:
THREAD PROCESS
1. A thread cannot live on its own. It There must be one thread in a process.
must live within a process.
2. It has direct access to the data It has its own copy of the data segment
segment of its process. of the parent process.
3. Threads are controlled by Process is controlled by the operating
programmer in a program. system
4. Threads run in shared memory Processes run in separate memory
spaces. spaces.
5. Threads are dependent. Processes are independent.
MULTITHREADING:
A technique by which a single set of code can be used by several processors at different
stages of execution.
HYPERTHREADING:
ANS:
LIMITATIONS:
1)Multiple threads can interfere with each other when sharing hardware resources such
as caches or translation lookaside buffers(TLBs). As a result, execution times of a single
thread are not improved and can be degraded, even when only one thread is executing,
due to lower frequencies or additional pipeline stages that are necessary to
accommodate thread-switching hardware.
2) Multithreading can only be achieved if the code of the running program has been
optimized for it.
3) It will be unable to process multiple threads simultaneously if they require the same
functional part of the processor.
.
DIFFERENCE:
2-1. List the aspects of microprocessor which have been improved along with
technological advancements.
The following aspects of microprocessor have been increased along with technological
advancements:-
Clock speed
Transistors
Data width
Million Instructions Per Second (MIPS) / Kilo instructions per second (KIPS)
Instructions set (multiplication, division, complex instructions such as roots,
logic gates included in instructions)
Main memory.
2-2. Which microprocessor introduced the concept of cache? Explain the purpose
of cache.
Intel (80486), introduced in 1989 introduced the concept of cache L1. L1 cache (also
called primary cache) is built directly into the microprocessor, a location referred to as
“on-die”.
An 8 KB on-chip (level 1) SRAMcache stores the most recently used instructions and
data.
Purpose of cache:-
The purpose of cache memory is to store program instructions and data that are used
repeatedly in the operation of programs or information that the CPU is likely to need
next. The computer processor can access this information quickly from the cache rather
than having to get it from computer's main memory.
The basic purpose of cache memory is to store program instructions that are frequently
re-referenced by software during operation.
The relationship between processor word size and number of supportable instructions is
linear. If the processor word size is 16 bits, then number of supportable instructions will
also be 16 bits.
2-4. The Pentium Pro, Pentium II, Pentium III, Pentium 4, and Core2 processors
all are based on P6 core architecture of intel processors but they have different
performance. Explain the reason for each.
The reason for different performance is clock speed which is the speed at which a
microprocessor executes instructions.
3-1 You are given a task to design a new processor. The clock of the processor runs
at 200 MHz. The following table gives instruction frequencies for Pearl
microprocessor, as well as how many cycles the instructions take, for the different
classes of instructions. Assume that (unlike many of today's computers) the
processor only executes one instruction at a time. (8)
c. The hardware expert says that if you double the number of registers, the
cycle time must be increased by 20%. What would the new clock speed be
(in MHz)?
d. The compiler expert says that if you double the number of registers, then
the compiler will generate code that requires only half the number of
Loads & Stores. What would the new CPI be on the Pearl?
Solution :
a) CPI=30x6+50x4+20x3
100
=4.4
d) CPI=(15x6+50x4+20x3)/85
=4.12
3-4. Show status of all conditional flags (also called status flags) for addition of
these two unsigned 16-bit numbers: 10011101110101 and 100101011010101.
Zero Flag : 0
Parity Flag : 0
Overflow Flag : 0
3-5. Show status of all conditional flags (also called status flags) for addition of
these two signed 16-bit numbers: 10011101110101 and 100101011010101 .