حاسوب 2
حاسوب 2
The system unit is a fundamental and crucial part of any computer sys-
tem. It serves as the central hub where the key components responsible for
processing data, executing tasks, and managing overall system functionality
are housed. Often referred to as the computer’s case or chassis, the system
unit is the physical enclosure that organizes, connects, and protects these
components, ensuring the computer functions properly.
10
Computer Science Dr. Humam M. Abdulsahib Page 11
1. In desktop computers, the system unit typically takes the form of a box
(often called a tower) that contains components like the motherboard,
central processing unit (CPU), power supply, hard drive, and memory
(RAM). This enclosure is designed to keep these components secure,
cool, and efficiently connected.
2. For laptops and other portable devices, the system unit is integrated
directly into the device’s body. While compact, it retains the same
essential functions as a desktop system unit, housing the critical parts
responsible for data processing, information storage, and connectivity,
but in a more efficient, space-saving design. Whether in a desktop,
laptop, or even a compact smartphone, the system unit remains vital
to ensuring that a computer operates e↵ectively.
(c) Photonic Chips: Photonic microchips use light, rather than elec-
trical signals, to transmit data through photons. Because light
travels faster and generates less heat than electricity, photonic
chips could drastically improve speed and efficiency, especially
in fields requiring high-speed data processing and long-distance
communications. This technology is expected to play a criti-
cal role in future data centers, enabling faster and more energy-
efficient data transmission, and also in applications like opti-
cal computing and telecommunications. Example: Companies
like Lightmatter are already developing photonic processors, with
chips designed to accelerate AI and machine learning workloads
by using light to process data.
the computer to ensure smooth operation. The CPU consists of several key
components that work together seamlessly to perform these tasks:
1. The Control Unit (CU) acts as the manager of the CPU, orchestrat-
ing all its operations. It is responsible for directing the flow of data
between the CPU, memory, and input/output devices. The CU re-
trieves instructions from memory, decodes them, and determines what
actions need to be taken. It then coordinates the execution of these
actions, ensuring that the various components of the CPU, such as the
Arithmetic Logic Unit (ALU) and Registers, work together in sync.
In essence, the CU ensures that the CPU executes instructions in the
correct sequence and that data flows to the appropriate components,
making sure that operations are carried out efficiently and accurately.
3. Registers are small, ultra-fast storage locations within the CPU. They
temporarily hold data and instructions that the CPU is actively work-
ing on, such as intermediate results of calculations or memory ad-
dresses. Registers enable the CPU to access and manipulate data
quickly, without needing to retrieve it from slower main memory (RAM).
These registers significantly boost the CPU’s performance by ensur-
ing that frequently used data is immediately available for processing.
Since registers are located within the CPU itself, they o↵er the fastest
Computer Science Dr. Humam M. Abdulsahib Page 19
possible access speeds, which helps the CPU execute instructions more
efficiently.
1. The fetch phase begins when the CPU retrieves an instruction from
the computer’s memory (RAM). Instructions are written in machine
code, a binary language that the CPU can understand directly. These
instructions could represent tasks such as calculations, data manip-
ulation, or system commands. The CPU uses the Program Counter
(PC), a special register, to keep track of the address in memory where
the next instruction is located. Once the instruction is fetched, the
Program Counter is updated to point to the next instruction in the se-
quence. Example: If a program is adding two numbers, the fetch step
might retrieve the instruction that tells the CPU to ”add the numbers
located at memory addresses X and Y.”
2. Decode: After fetching the instruction, the CPU moves to the decode
phase, where the Control Unit (CU) interprets the instruction to deter-
mine what action needs to be taken. The CU decodes the binary code
of the instruction and breaks it down into commands for the CPU’s
various components. This step is crucial because it enables the CPU to
understand the task at hand, whether it’s performing an arithmetic op-
eration, moving data, or interacting with hardware components. The
Computer Science Dr. Humam M. Abdulsahib Page 20
4. Store: The final step of the cycle is the store phase. After executing
the instruction, the CPU may need to store the result of the operation.
This could involve saving the result to a register for immediate use or
writing it back to memory (RAM) for future access. Storing results
ensures that the CPU has access to them when needed for subsequent
instructions.
The CPU also updates the Status Register at this stage to reflect any
changes in the system, such as carry-over from an arithmetic operation
or flags indicating errors. Example: After adding the values from the
previous step, the CPU might store the result in a memory location
or register for later use.
Computer Science Dr. Humam M. Abdulsahib Page 21
2. 1 GHz (gigahertz) means the CPU completes 1 billion cycles per sec-
ond.
Today, most modern CPUs are multicore, meaning they contain multiple
cores that can handle di↵erent tasks simultaneously. The number of cores
in a processor directly impacts its ability to perform multitasking and
parallel processing.
3. Hexa-core and octa-core processors, with six and eight cores, respec-
tively, provide even more multitasking power.
The power of multicore processors lies in how these cores work together to
improve performance, especially for demanding applications that can use
parallel processing and load balancing.
all the tasks sequentially (laying bricks, painting, roofing), the work is
divided among specialists who perform their tasks at the same time.
This leads to a much faster completion time. Similarly, in 3D render-
ing, an animation can be split into frames, with each core rendering
a portion of the animation. This dramatically accelerates the process
compared to a single-core system.
2. Load balancing ensures that tasks are distributed evenly among the
CPU’s cores. If one core is overloaded while others are idle, the system
becomes inefficient. Load balancing dynamically assigns tasks to pre-
vent any core from sitting idle and optimizes performance by keeping
all cores active. Example: Imagine you are baking multiple cakes,
and you have four ovens (representing the cores). Instead of putting
all the cakes in one oven and leaving the others empty, you distribute
the cakes evenly so that each oven works on one cake at a time. This
ensures all cakes are baked faster. In computing, if you are running
several applications (e.g., a browser, a music player, and a file down-
load), a multicore processor can assign each task to separate cores,
ensuring smooth performance across all applications.
Now, let’s break down the performance for two types of applications:
(a) Processor A (1 core, 4 GHz): Since the application uses only one
core, the processor will operate at 4 GHz.
Computer Science Dr. Humam M. Abdulsahib Page 26
(b) Processor B (4 cores, 2 GHz): Even though there are 4 cores, the
application can only utilize 1 core. Therefore, it will e↵ectively
be running at 2 GHz (the clock speed of a single core).
i.
Total processing power: 4 cores ⇥ 2 GHz = 8 GHz
2. In what way does the system unit di↵er between desktop computers
and laptops?
4. Can the system unit be considered the main body of a computer? Why
or why not?
5. How does the Control Unit manage the flow of data between the CPU,
memory, and input/output devices?
11. In what way do registers di↵er from other types of memory in the
computer system?
12. What is the relationship between the components of the CPU in exe-
cuting instructions?
13. How does the CPU retrieve an instruction from the system’s RAM?
15. What types of actions can the CPU perform during the execute phase?
Computer Science Dr. Humam M. Abdulsahib Page 28
17. How is clock speed measured, and what does it indicate about the
processor’s performance?
18. What does a higher clock speed imply about a CPU’s capabilities?
19. How are modern processors typically measured in terms of clock speed?
24. What happens when one core is busy processing a heavy task in a
multicore processor?
25. What are the advantages of multicore processors over single-core pro-
cessors?
26. What are the di↵erent levels of cache memory, and how do they di↵er?
27. Where is the L1 cache located, and what are its characteristics?
29. What process does the CPU follow to fetch data from the main mem-
ory?
30. What is the First In, First Out (FIFO) replacement policy?
31. How does the 32-bit architecture limit the amount of RAM that can
be addressed?
Computer Science Dr. Humam M. Abdulsahib Page 29
32. What advantages does 64-bit architecture provide over 32-bit archi-
tecture?
34. Explain why the CPU is referred to as the ”brain” of the computer.
35. Describe the roles of the Control Unit (CU) and Arithmetic Logic Unit
(ALU) in the CPU.
37. Why is the coordination between the Control Unit, Arithmetic Logic
Unit, and Registers critical for the CPU’s performance?
39. Why is the Decode phase essential for proper CPU functioning?
40. Discuss how the Program Counter (PC) contributes to the Fetch phase.
41. Compare and contrast the roles of the Arithmetic Logic Unit (ALU)
and the Memory Management Unit (MMU) in the Execute phase.
44. Why is load balancing necessary for optimal multicore processor per-
formance?
45. Why might a processor with a higher clock speed outperform a multi-
core processor in single-threaded applications?
Computer Science Dr. Humam M. Abdulsahib Page 30
46. What types of tasks or applications benefit most from multicore pro-
cessors?
48. Discuss the trade-o↵s between clock speed and core count in modern
CPUs. How do they impact overall performance?
49. If you were building a PC for gaming, which typically requires high
single-thread performance, would you prioritize clock speed or core
count? Why?
51. Why is the system unit considered the most crucial part of a computer
system?
52. Why is the system unit sometimes referred to as the computer’s ”case”?
53. How does the system unit’s design di↵er between desktop computers
and portable devices like laptops?
54. What role do microchips play in enhancing the performance and effi-
ciency of modern computers?
55. In what ways does integrating the system unit into the body of portable
devices a↵ect their design and functionality?
57. What is typically contained within the system unit of a desktop com-
puter? A) Monitor and keyboard. B) Printer and scanner. C) Moth-
erboard, CPU, and RAM. D) Mouse and speakers
58. In portable devices like laptops, the system unit: A) Is separated from
the main body of the device. B) Is integrated directly into the device’s
body. C) Requires an external power source to function. D) Contains
only the hard drive.
59. Which component serves as the fundamental building block for modern
computing?A) Power supply. B) Monitor. C) Microchips. D) Hard
drive.
60. The Apple M2 chip and Intel Core i9 are examples of: A) External
storage devices. B) Microprocessors. C) Cooling systems. D) Display
technologies
62. Which microchip is manufactured using a 3nm process and powers the
latest iPhones?A) Intel Core i9. B) Apple A17 Pro. C) Qualcomm
Snapdragon 8 Gen 3. D) NVIDIA H100 Tensor Core
(h) Modern GPUs like the NVIDIA H100 are used only for graphical
rendering, not for AI computations.
(k) Registers are slower than main memory (RAM) in terms of access
speed.
(n) The Program Counter (PC) keeps track of the memory address
of the next instruction.
(o) The Decode phase involves performing the calculations specified
in the instruction.
(p) The Arithmetic Logic Unit (ALU) is used during the Store phase.
(q) A CPU with a clock speed of 3 GHz can perform 3 billion cycles
per second.
(r) The clock speed is the only factor determining a CPU’s perfor-
mance.
(s) Multicore processors allow parallel processing, improving efficiency
and performance.
(t) Threading allows a single program to split its tasks into multiple
threads.
(a) ......... are tiny silicon-based integrated circuits that perform bil-
lions of calculations per second.
(b) In portable devices like laptops, the system unit is..... into the
device’s body.
(c) The process used to manufacture microchips, where patterns are
etched onto a silicon wafer, is called .......
(d) Devices like smartphones use ........ chips to enable wireless con-
nectivity, such as Wi-Fi and Bluetooth.
(e) The CPU is often referred to as the ....... of the computer.
(f) The ........ retrieves instructions from memory, decodes them, and
determines the actions required.
(g) The component of the CPU that performs calculations and logical
operations is called the ...... .
Computer Science Dr. Humam M. Abdulsahib Page 34
(h) .........are small, ultra-fast storage locations within the CPU that
temporarily hold data.
68. Describe one advantage and one disadvantage of integrating the system
unit into portable devices.
72. Processor X has 1 core with a clock speed of 3.5 GHz. Processor Y
has 6 cores with a clock speed of 2 GHz. A single-core dependent
application is being used. Question: Which processor will perform
better for this application, and why?
74. Processor M has 4 cores at 3 GHz each, and Processor N has 1 core
at 5 GHz. Questions: Which processor performs better for a single-
threaded application? Which processor performs better for a multi-
threaded application?