Professional Documents
Culture Documents
NJOHURI KOMPJUTERI
I. Funksioni i nj kompjuteri (PC)
Kompjuteri sht nj sistem q mbledh, proceson, nxjerr dhe ruan
informacione t ndryshme. Katr funksionet baz t nj kompjuteri jan:
!
Njohuri Kompjuteri
CPU kryen
t gjitha
llogaritjet
Disqet ruajn
n mnyr
prfundimtare
informacionin
T dhnat kalojn
nga kujtesa
kryesore tek CPU
dhe anasjelltas
Disqet magnetike
C
P
U
Kujtesa
kryesore
Njohuri Kompjuteri
Njohuri Kompjuteri
Njohuri Kompjuteri
Lab 1:
T prcaktohen pjest e kompjuterit n figurn e mposhtme:
(A)
Power supply
(B)
CPU/Heatsink
(C)
Video Card
(D)
(E)
PCI Slot
(F)
Chipset
(G)
SATA Cable
(H)
Hard Drive
(I)
IDE Cable
(J)
Optical Drive
(K)
RAM
Lab 2:
T prcaktohen portat fizike t listuara m posht:
(A)
(B)
(C)
USB Port
(D)
(E)
(F)
(G)
(H)
Speakers/Microphone Ports
(I)
Njohuri Kompjuteri
Intel
Intel
Intel
Intel
Intel
Celeron processors
Atom processors
Xeon and Itanium processors
Pentium processors (si psh. Pentium Pro, III, IV)
Core processors (si psh. Core i7, Core2 Duo, Core2Quad)
AMD
AMD
AMD
AMD
Duron processors
Sempron processors
Phenom processors
Athlon processors (si psh. Athlon II, Athlon X2 Dual-Core)
Socket LGA775
Socket PGA370
Njohuri Kompjuteri
Njohuri Kompjuteri
T = Cikl Clock-u
Njohuri Kompjuteri
Njohuri Kompjuteri
10
Njohuri Kompjuteri
Frekuenca
e FSB-s
Procesort INTEL
Pentium Pro
60
Pentium II
66
Pentium III
100
Pentium IV
100
Itanium
100
Atom
133
Celeron
66
Xeon
100
Core Duo
133
Core 2 Duo
133
Core 2 Quad
266
Procesort AMD
Athlon
100
Duron
100
Sempron
166
66 MHz
100 MHz
133 MHz
133 MHz
133 MHz
166 MHz
266 MHz
400 MHz
166 MHz
333 MHz
333 MHz
133 MHz
133 MHz
200 MHz
Numri i Gjersia
Cikleve e bus-it
Shpejtsia e
Transferimit
1
1
1
4
1
4
1-4
4
4
4
4
64-bit
64-bit
64-bit
64-bit
64-bit
64-bit
64-bit
64-bit
64-bit
64-bit
64-bit
2
2
2
64-bit
64-bit
64-bit
11
Njohuri Kompjuteri
N
figur
sht
treguar lidhja e CPUs
me
memorien
Cache dhe RAM-in.
12
Njohuri Kompjuteri
L2 cache vjen midis L1 cache dhe RAM. Mbi t aplikohen cikle refresh
disa her n sekond pr t ruajtur informacionin. L2 cache sht m e
madhe se cache kryesore, jo aq e shpejt sa ajo, dhe nuk mund t
aksesohet gjat rifreskimit t t dhnave.
Lab 4:
Shpejtsia e procesorit matet n MHz. Sipas prkufizimit procesori me
shpejtsi 1 MHz kryen nj milion cikle/s. A do t thot kjo q procesori me
shpejtsi 2 MHz sht dyfish m i shpejt se i pari?
Shpejtsia e ors prcakton kufirin maksimal t shpejtsis s procesorit, dhe
jo shpejtsin reale me t ciln ai punon. Kshtu procesori me shpejtsi 2 MHz
sht m i shpejt se procesori me shpejtsi 1 MHz, por jo domosdoshmrisht
dyfish m i shpejt se ai, pasi shpejtsia aktuale e procesorit nuk varet vetm
nga numri i cikleve t ors q ai kryen n nj sekond, por edhe nga sasia e
informacionit q ai prpunon n do cikl. Kjo e fundit varet nga disa faktor
t tjer, sepse pr t kryer operacionet e ndryshme CPU ka nevoj t
shkmbej t dhna me kujtesn kryesore RAM.
Sa m e shpejt t jet RAM aq m pak
kto t dhna. Gjithashtu komunikimi
FSB-s, q do t thot sa m e madhe
dhnave dmth. shpejtsia e FSB-s, aq
CPU-s.
13
Njohuri Kompjuteri
14
Njohuri Kompjuteri
15
Njohuri Kompjuteri
i
0
0
1
1
0
0
1
1
i
i
0
1
0
1
0
1
0
1
=
=
=
=
=
=
=
=
m
r
0
0
1
1
r
0=
1=
0=
1=
special
AX
or
BX
and
CX
cmp
DX
sub
add
mov reg, mem/reg/const
mov mem, reg
16-bit
mmm
0 0 0 = AX
0 0 1 = BX
0 1 0 = CX
0 1 1 = DX
1 0 0 = [BX]
1 0 1 = [xxxx+BX]
1 1 0 = [xxxx]
1 1 1 = constant
16
Njohuri Kompjuteri
i
0
1
0
1
0
=
=
=
=
16-bit
mmm
0 0 0 = AX
0 0 1 = BX
0 1 0 = CX
0 1 1 = DX
1 0 0 = [BX]
1 0 1 = [xxxx+BX]
1 1 0 = [xxxx]
1 1 1 = constant
i
0
0
0
0
1
1
1
1
i
0
0
1
1
0
0
1
1
i
0
1
0
1
0
1
0
1
=
=
=
=
=
=
=
=
illegal
illegal
illegal
brk
iret
halt
get
put
16-bit
mmm
0 0 0 = je
(jump if equal)
0 0 1 = jne
(jump if not equal)
0 1 0 = jb
(jump if below)
0 1 1 = jbe
(jump if below or equal)
1 0 0 = ja
(jump if above)
1 0 1 = jae
(jump if above or equal)
1 1 0 = jmp
1 1 1 = illegal
Instruksionet ngarkohen n fjal t njpasnjshme kujtese. Kur ekzekutohet
nj program, njsia e kontrollit e procesorit akseson secilin nga
instruksionet prbrse t tij, i dekodon ato dhe sipas krkess s
operacionit prdor ALU pr t kryer veprimet.
17
Njohuri Kompjuteri
Lab 5:
Duke prdorur kodimin e dhn t paraqiten n binar instruksionet e
mposhtme. T gjendet se far realizon ky program dhe t shprehet ai n
nj gjuh programimi.
Opcode binar
a:
mov cx, 0
get
Hex Operand
put
add ax, ax
put
0 0 0 0 0 1 1 1
add ax, ax
put
0 0 0 0 1 1 1
add ax, ax
put
0 0 0 0 0 1 1 1
add cx, 1
0 0 0 0 0 1
cmp cx, 4
jb a
halt
18
Njohuri Kompjuteri
get
mov bx, ax
get
mov cx, ax
or cx, bx
not ax
not bx
or ax, bx
and ax, cx
put
halt
19
Njohuri Kompjuteri
Shpejtsia e ors: sht masa q tregon sesa shpejt sht duke punuar
procesori, dmth. sa cikle ore ai ka kryer n nj periudh kohe t caktuar.
20
Njohuri Kompjuteri
Strukturat Pipeline
Strukturat Superskalare
Strukturat Paralele dhe
HyperThreading
21
Njohuri Kompjuteri
I
i vogl
i madh
C
i madh
i vogl
T
e madhe
e vogl
22
Njohuri Kompjuteri
ID
EX
MEM
IF
ID
IF
EX
ID
IF
WB
MEM WB
EX
MEM WB
ID
EX
MEM WB
IF
ID
EX
MEM
WB
23
Njohuri Kompjuteri
ID
ID
IF
IF
EX
EX
ID
ID
IF
IF
MEM WB
MEM WB
EX
MEM WB
EX
MEM WB
EX
MEM WB
ID
ID
EX
MEM WB
IF
ID
EX
MEM WB
IF
ID
EX
MEM WB
IF
ID
EX
MEM
IF
ID
EX
MEM
WB
WB
1. IF(A) IF(B)
2. ID(A) ID(B) IF(C) IF(D)
3. EX(A) EX(B) ID(C) ID(D) IF(E) IF(F)
4. MEM(A) MEM(B) EX(C) EX(D) ID(E) ID(F) IF(G) IF(H)
5. WB(A) WB(B) MEM(C) MEM(D) EX(E) EX(F) ID(G) ID(H) IF(I) IF(J)
6. WB(C) WB(D) MEM(E) MEM(F) EX(G) EX(H) ID(I) ID(J)
7. WB(E) EB(F) MEM(G) MEM(H) EX(I) EX(J)
8. WB(G) WB(H) MEM(I) MEM(J)
9. WB(I) WB(J)
Pra duke kombinuar kto dy struktura mund t ekzekutohen 10
instruksione n 9 cikle ore, pr t cilt n nj arkitektur skalare t thjesht
me 5 cikle pr instruksion, do t na duheshin 10*5= 50 cikle ore.
24
Njohuri Kompjuteri
25