Ebooks, Audobooks and Classical Music from Liber Liber
a b c d e f g h i j k l m n o p q r s t u v w x y z





Web - Amazon

We provide Linux to the World


We support WINRAR [What is this] - [Download .exe file(s) for Windows]

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
SITEMAP
Audiobooks by Valerio Di Stefano: Single Download - Complete Download [TAR] [WIM] [ZIP] [RAR] - Alphabetical Download  [TAR] [WIM] [ZIP] [RAR] - Download Instructions

Make a donation: IBAN: IT36M0708677020000000008016 - BIC/SWIFT:  ICRAITRRU60 - VALERIO DI STEFANO or
Privacy Policy Cookie Policy Terms and Conditions
Multithreading - Wikipedia

Multithreading

Fra Wikipedia, den frie encyklopædi

Multithreading er en måde at distribuere opgaver i programmer mellem flere, alenestående men samarbejdende tråde i programmet, og adskiller sig fra multiproces-programmer ved, at der ikke anvendes flere instanser af samme program samtidig, med dertil hørende interproceskommunikation, men at al håndtering af koordination og kommunikation foregår inde i selve programmet, samt at programmerne nemt og elegant kan anvende samtlige globale variable.

Indholdsfortegnelse

[redigér] Anvendelse af multithreading

Da tråde elegant kan distribueres over flere processorer, kan maksimal ydeevne for multiprocessor-systemer nåes ved enkel og effektiv anvendelse af multithreading, uden det store overhead multiproces-programmer skaber hos operativsystemet.

[redigér] Eksempel

Et enkelt eksempel på multithreading, skrevet i Cocoa:

multithread.m

 #import <Cocoa/Cocoa.h>
 @interface Multithread : NSObject {
 }
 - (void) sigHejToGange;
 - (void) hejThread;
 @end
 
@implementation Multithread
 - (void) sigHejToGange {
    NSLog(@"Hej, verden");
    [NSThread detachThreadSelector: @selector( hejThread) toTarget: self withObject: NIL];
 }
 
 - (void) hejThread {
   NSLog(@"Hej, verden");
 }
 @end
 
 int main() {
   Multithread * test = [[Multithread alloc] init];
   [test sigHejToGange];
   [test release]
 }

Programmet udskriver "Hej, verden" to gange - i to forskellige threads.

[redigér] Synkronisering mellem tråde

Synkronisering kan ske med mutexes og spinlocks, eller ved hjælp af primitive kontrolvariable, og et simpelt if-udsagn.

[redigér] Programmeringssprog, som understøtter tråde

[redigér] Operativsystemer, som understøtter tråde

Our "Network":

Project Gutenberg
https://gutenberg.classicistranieri.com

Encyclopaedia Britannica 1911
https://encyclopaediabritannica.classicistranieri.com

Librivox Audiobooks
https://librivox.classicistranieri.com

Linux Distributions
https://old.classicistranieri.com

Magnatune (MP3 Music)
https://magnatune.classicistranieri.com

Static Wikipedia (June 2008)
https://wikipedia.classicistranieri.com

Static Wikipedia (March 2008)
https://wikipedia2007.classicistranieri.com/mar2008/

Static Wikipedia (2007)
https://wikipedia2007.classicistranieri.com

Static Wikipedia (2006)
https://wikipedia2006.classicistranieri.com

Liber Liber
https://liberliber.classicistranieri.com

ZIM Files for Kiwix
https://zim.classicistranieri.com


Other Websites:

Bach - Goldberg Variations
https://www.goldbergvariations.org

Lazarillo de Tormes
https://www.lazarillodetormes.org

Madame Bovary
https://www.madamebovary.org

Il Fu Mattia Pascal
https://www.mattiapascal.it

The Voice in the Desert
https://www.thevoiceinthedesert.org

Confessione d'un amore fascista
https://www.amorefascista.it

Malinverno
https://www.malinverno.org

Debito formativo
https://www.debitoformativo.it

Adina Spire
https://www.adinaspire.com