This HTML5 document contains 44 embedded RDF statements represented using HTML+Microdata notation.

The embedded RDF content will be recognized by any processor of HTML5 Microdata.

Namespace Prefixes

PrefixIRI
dctermshttp://purl.org/dc/terms/
dbohttp://dbpedia.org/ontology/
foafhttp://xmlns.com/foaf/0.1/
n9https://global.dbpedia.org/id/
dbthttp://dbpedia.org/resource/Template:
rdfshttp://www.w3.org/2000/01/rdf-schema#
freebasehttp://rdf.freebase.com/ns/
rdfhttp://www.w3.org/1999/02/22-rdf-syntax-ns#
owlhttp://www.w3.org/2002/07/owl#
wikipedia-enhttp://en.wikipedia.org/wiki/
dbchttp://dbpedia.org/resource/Category:
dbphttp://dbpedia.org/property/
provhttp://www.w3.org/ns/prov#
xsdhhttp://www.w3.org/2001/XMLSchema#
wikidatahttp://www.wikidata.org/entity/
dbrhttp://dbpedia.org/resource/

Statements

Subject Item
dbr:Fetch-and-add
dbo:wikiPageWikiLink
dbr:Test_and_test-and-set
Subject Item
dbr:Test_and_Test-and-set
dbo:wikiPageWikiLink
dbr:Test_and_test-and-set
dbo:wikiPageRedirects
dbr:Test_and_test-and-set
Subject Item
dbr:Test-and-set
dbo:wikiPageWikiLink
dbr:Test_and_test-and-set
Subject Item
dbr:Test_and_test-and-set
rdfs:label
Test and test-and-set
rdfs:comment
In computer science, the test-and-set CPU instruction is used to implement mutual exclusion in multiprocessor environments. Although a correct lock can be implemented with test-and-set, it can lead to resource contention in busy lock (caused by bus locking and cache invalidation when test-and-set operation needs to access memory atomically). To lower the overhead a more elaborate locking protocol test and test-and-set is used. Given a lock: boolean locked := false // shared lock variable Entry protocol is: Exit protocol is: procedure ExitCritical { locked := false}
dcterms:subject
dbc:Concurrency_control dbc:Computer_arithmetic
dbo:wikiPageID
2084574
dbo:wikiPageRevisionID
1034277433
dbo:wikiPageWikiLink
dbr:Fetch-and-add dbr:Computer_science dbr:Programming_language dbr:Resource_contention dbr:Concurrent_programming dbr:Mutual_exclusion dbc:Concurrency_control dbr:Parallel_processor dbr:Programming_idiom dbr:System_programming dbr:Anti-pattern dbr:Double-checked_locking dbr:Lock_(computer_science) dbr:Test-and-set dbr:Short-circuit_evaluation dbr:Optimization_(computer_science) dbr:Multiprocessor dbr:Parallel_programming dbc:Computer_arithmetic dbr:Instruction_(computer_science) dbr:Busy_waiting dbr:Atomic_(computer_science)
owl:sameAs
freebase:m.06l3ny n9:4w2Lo wikidata:Q7705745
dbp:wikiPageUsesTemplate
dbt:Reflist dbt:ISBN
dbo:abstract
In computer science, the test-and-set CPU instruction is used to implement mutual exclusion in multiprocessor environments. Although a correct lock can be implemented with test-and-set, it can lead to resource contention in busy lock (caused by bus locking and cache invalidation when test-and-set operation needs to access memory atomically). To lower the overhead a more elaborate locking protocol test and test-and-set is used. Given a lock: boolean locked := false // shared lock variable Entry protocol is: procedure EnterCritical { do { while ( locked == true ) skip // spin until the lock seems free } while ( TestAndSet(locked) == true ) // attempt actual atomic locking using the test-and-set instruction} Exit protocol is: procedure ExitCritical { locked := false} The entry protocol uses normal memory reads to wait for the lock to become free. Test-and-set is only used to try to get the lock when normal memory read says it's free. Thus the expensive atomic memory operations happen less often than in a simple spin around test-and-set. If the programming language used supports short-circuit evaluation, the entry protocol could be implemented as: procedure EnterCritical { while ( locked == true or TestAndSet(locked) == true ) skip // spin until locked }
prov:wasDerivedFrom
wikipedia-en:Test_and_test-and-set?oldid=1034277433&ns=0
dbo:wikiPageLength
2527
foaf:isPrimaryTopicOf
wikipedia-en:Test_and_test-and-set
Subject Item
dbr:Test_and_test_and_set
dbo:wikiPageWikiLink
dbr:Test_and_test-and-set
dbo:wikiPageRedirects
dbr:Test_and_test-and-set
Subject Item
wikipedia-en:Test_and_test-and-set
foaf:primaryTopic
dbr:Test_and_test-and-set