Linux with Operating System Concepts



Download 5,65 Mb.
Pdf ko'rish
bet10/254
Sana22.07.2022
Hajmi5,65 Mb.
#840170
1   ...   6   7   8   9   10   11   12   13   ...   254
Bog'liq
Linux-with-Operating-System-Concepts-Fox-Richard-CRC-Press-2014

fetch-execute cycle
. This cycle requires that the next program instruc-
tion be fetched from where it is stored (some form of memory), decoded from machine 
language into operational code (often called microcode) and executed.
During the course of the fetch–execute cycle, the CPU signals various devices to perform 
operations. These include memory to perform a read operation (to obtain the instruction), 
movement between storage devices in the CPU called registers, and movement between 
arithmetic and logic circuits to perform computations. The CPU contains a control unit 
which is responsible for handling the fetch–execute cycle and sending out control signals.
The CPU also contains an arithmetic-logic unit. This component contains digital cir-
cuits, each of which is responsible for handling one form of arithmetic or logic operation 
Input from user
informs computer
(program) what
to do
Information
output so
user can see
results
Input
Output
Results can
be stored
for permanent
record
Storage
Processing
Processing
converts
data to
information
FIGURE 1.17 
The IPOS cycle. (From Richard Fox, 2013, 
Information Technology: An Introduction 
for Today’s Digital World
.)


Introduction to Linux

27
such as an adder, a multiplier, a shifter, and a comparator. The CPU also contains data reg-
isters. These are temporary storage locations used in the CPU to store partial computations 
as the CPU executes program code.
As a simple example, if the current program requires performing the operation 

=
B * (C 
+
D), then C and D are loaded from memory into registers. They are then added 
together and the result stored in a register. B is loaded from memory and stored in a reg-
ister. The values of B and C 
+
D are then multiplied and the result is stored in a register. 
Finally, the result is moved from register to memory. This instruction requires the use of 
the adder, multiplier, and some registers.
Aside from the data registers, the CPU has control registers. These are used by the con-
trol unit portion of the CPU to handle the fetch-execute cycle. There are several important 
control registers to note. The program counter register (PC) stores the location in memory 
of the next instruction to fetch. The instruction register (IR) stores the instruction cur-
rently being executed. The status flags (SF) are individual bits stored in a single register to 
store information about the last operation such as whether it resulted in a positive, nega-
tive, or zero value, whether it produced a carry, and whether it caused an interrupt. The 
stack pointer (SP) points to the location in memory corresponding to the top of the run-
time stack. Different processors may have other control registers.
Every computer also has one or more forms of memory. Types of memory include regis-
ters, cache, main memory, and secondary storage. Registers are built into the CPU. Cache is 
fast memory that allows the CPU to access data and program code without delay. However, 
cache is expensive and so a limited amount is made available. Often today, computers have 
several caches, some on the CPU and some separated off the CPU (known as on-chip and 
off-chip cache, respectively). The on-chip caches provide faster access than off-chip caches 
because of their location, but must be smaller in size because of the limited space available 
on the CPU.
Main memory, often called DRAM, is a good deal slower than cache but is far cheaper. 
While a computer might have 8 GB of DRAM, it will probably only have 1–2 MB of cache 
(if you are unfamiliar with storage capacity terminology, see the appendix).
You might ask why we need main memory when cache is so much faster. Think of 
DRAM as an extension to cache. That is, we prefer to keep as much of our running pro-
grams and data in cache memories, but because of their limited size, we extend memory by 
placing the rest in DRAM. Alternatively, you can think of cache as being a special area to 
place the items that are most useful so that the CPU can look there first in hopes of avoid-
ing access to DRAM.
Even with the large DRAM sizes of our modern computers, DRAM cannot usually store 
all of the program code that users are executing. For instance, some GUI programs are 
dozens of GBytes in size by themselves whereas DRAM might be limited to just 8 GByte. 
So we need a back-up to DRAM. For this, we use the hard disk in two forms. First, tem-
porary hard disk storage that backs up DRAM is called 

Download 5,65 Mb.

Do'stlaringiz bilan baham:
1   ...   6   7   8   9   10   11   12   13   ...   254




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish