This print for content only-size & color not accurate 7" X 9-1/4" / casebound / malloy


■ P R O C E S S E S, A P P D O M A I N S, A N D   O B J E C T C O N T E X T S 562



Download 21,46 Mb.
Pdf ko'rish
bet1085/1830
Sana28.09.2021
Hajmi21,46 Mb.
#188411
1   ...   1081   1082   1083   1084   1085   1086   1087   1088   ...   1830
Bog'liq
[book] [en] Pro C# 2008 and the NET 3.5 Platform Fourth Edition

P R O C E S S E S, A P P D O M A I N S, A N D   O B J E C T C O N T E X T S



562

8849CH17.qxd  10/9/07  4:29 PM  Page 562




As this secondary thread is churning away, the main thread is still responsive to user input, which

gives the entire process the potential of delivering greater performance. However, this may not

actually be the case: using too many threads in a single process can actually 

degrade performance,

as the CPU must switch between the active threads in the process (which takes time).

In reality, it is always worth keeping in mind that multithreading is most commonly an illusion

provided by the OS. Machines that host a single (nonhyperthreaded) CPU do not have the ability to

literally handle multiple threads at the same exact time. Rather, a single CPU will execute one

thread for a unit of time (called a 



time slice) based in part on the thread’s priority level. When a

thread’s time slice is up, the existing thread is suspended to allow another thread to perform its

business. For a thread to remember what was happening before it was kicked out of the way, each

thread is given the ability to write to Thread Local Storage (TLS) and is provided with a separate

call stack, as illustrated in Figure 17-2.

Figure 17-2.

The Win32 process/thread relationship

If the subject of threads is new to you, don’t sweat the details. At this point, just remember that

a thread is a unique path of execution within a Win32 process. Every process has a primary thread

(created via the executable’s entry point) and may contain additional threads that have been pro-

grammatically created.


Download 21,46 Mb.

Do'stlaringiz bilan baham:
1   ...   1081   1082   1083   1084   1085   1086   1087   1088   ...   1830




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