Software Transactional Memory > 자유게시판

후기게시판

유품정리, 빈집정리, 이사정리, 방문견적은 유빈이방에서

후기게시판

Software Transactional Memory

페이지 정보

Julio Caley  0 Comments  47 Views  25-08-14 19:03 

본문

In computer science, software transactional memory (STM) is a concurrency management mechanism analogous to database transactions for Memory Wave App controlling access to shared memory in concurrent computing. It is an alternate to lock-based synchronization. STM is a strategy carried out in software program, moderately than as a hardware component. A transaction on this context occurs when a bit of code executes a collection of reads and writes to shared Memory Wave App. These reads and writes logically occur at a single instantaneous in time; intermediate states should not visible to different (profitable) transactions. The idea of providing hardware help for transactions originated in a 1986 paper by Tom Knight. The concept was popularized by Maurice Herlihy and J. Eliot B. Moss. In 1995, Nir Shavit and Dan Touitou prolonged this idea to software program-only transactional memory (STM). In contrast to the locking techniques utilized in most fashionable multithreaded functions, STM is commonly very optimistic: a thread completes modifications to shared memory with out regard for what different threads may be doing, recording each read and write that it is performing in a log.



As an alternative of inserting the onus on the writer to make sure it does not adversely have an effect on other operations in progress, it is positioned on the reader, who after completing a complete transaction verifies that different threads haven't concurrently made adjustments to memory that it accessed prior to now. This ultimate operation, in which the adjustments of a transaction are validated and, if validation is profitable, made everlasting, Memory Wave is named a commit. A transaction may also abort at any time, causing all of its prior changes to be rolled back or undone. If a transaction cannot be committed resulting from conflicting modifications, it is usually aborted and re-executed from the start until it succeeds. The advantage of this optimistic strategy is increased concurrency: no thread needs to wait for entry to a resource, and totally different threads can safely and concurrently modify disjoint parts of an information structure that might normally be protected beneath the same lock.



Nevertheless, in apply, STM programs also suffer a efficiency hit in comparison with nice-grained lock-based mostly programs on small numbers of processors (1 to 4 relying on the applying). That is due primarily to the overhead related to maintaining the log and the time spent committing transactions. Even in this case efficiency is often no worse than twice as sluggish. Advocates of STM consider this penalty is justified by the conceptual advantages of STM. Theoretically, the worst case space and time complexity of n concurrent transactions is O(n). Precise wants rely on implementation details (one could make transactions fail early enough to keep away from overhead), however there'll also be instances, albeit uncommon, the place lock-based algorithms have better time complexity than software transactional memory. STM greatly simplifies conceptual understanding of multithreaded programs and helps make packages extra maintainable by working in harmony with current excessive-stage abstractions resembling objects and modules. Locking requires occupied with overlapping operations and partial operations in distantly separated and seemingly unrelated sections of code, a task which is very tough and error-prone.



B-3.pngLocking requires programmers to undertake a locking coverage to stop deadlock, livelock, and different failures to make progress. Such insurance policies are sometimes informally enforced and fallible, and when these points come up they're insidiously troublesome to reproduce and debug. Locking can lead to priority inversion, a phenomenon where a excessive-precedence thread is compelled to wait for a low-priority thread holding unique access to a useful resource that it needs. In distinction, the idea of a memory transaction is far less complicated, as a result of every transaction can be seen in isolation as a single-threaded computation. Deadlock and livelock are either prevented entirely or dealt with by an external transaction manager; the programmer want hardly worry about it. Priority inversion can nonetheless be a problem, but high-priority transactions can abort conflicting lower precedence transactions that haven't already committed. Nevertheless, the necessity to retry and abort transactions limits their habits. Any operation performed inside a transaction must be idempotent since a transaction may be retried. Additionally, if an operation has unwanted side effects that should be undone if the transaction is aborted, then a corresponding rollback operation should be included.



This makes many input/output (I/O) operations tough or impossible to perform within transactions. Such limits are sometimes overcome in observe by creating buffers that queue up the irreversible operations and carry out them after the transaction succeeds. In Haskell, this limit is enforced at compile time by the type system. In 2005, Tim Harris, Simon Marlow, Simon Peyton Jones, and Maurice Herlihy described an STM system constructed on Concurrent Haskell that allows arbitrary atomic operations to be composed into bigger atomic operations, a useful idea inconceivable with lock-based mostly programming. For instance, consider a hash desk with thread-safe insert and delete operations. Now suppose that we wish to delete one merchandise A from table t1, and insert it into desk t2; however the intermediate state (through which neither table accommodates the item) should not be visible to different threads. Except the implementor of the hash desk anticipates this need, there is solely no approach to fulfill this requirement. Briefly, operations which might be individually correct (insert, delete) cannot be composed into larger correct operations.

PH-14.jpg

댓글목록

등록된 댓글이 없습니다.

X

회사(이하 '회사')는 별도의 회원가입 절차 없이 대부분의 신청관련 컨텐츠에 자유롭게 접근할 수 있습니다. 회사는 서비스 이용을 위하여 아래와 같은 개인정보를 수집하고 있습니다.

1) 수집하는 개인정보의 범위
■ 필수항목
- 이름, 연락처

2) 개인정보의 수집목적 및 이용목적
① 회사는 서비스를 제공하기 위하여 다음과 같은 목적으로 개인정보를 수집하고 있습니다.

이름, 연락처는 기본 필수 요소입니다.
연락처 : 공지사항 전달, 본인 의사 확인, 불만 처리 등 원활한 의사소통 경로의 확보, 새로운 서비스의 안내
그 외 선택항목 : 개인맞춤 서비스를 제공하기 위한 자료
② 단, 이용자의 기본적 인권 침해의 우려가 있는 민감한 개인정보는 수집하지 않습니다.

3) 개인정보의 보유기간 및 이용기간
① 귀하의 개인정보는 다음과 같이 개인정보의 수집목적 또는 제공받은 목적이 달성되면 파기됩니다.
단, 관련법령의 규정에 의하여 다음과 같이 권리 의무 관계의 확인 등을 이유로 일정기간 보유하여야 할 필요가 있을 경우에는 일정기간 보유합니다. 기록 : 1년
② 귀하의 동의를 받아 보유하고 있는 거래정보 등을 귀하께서 열람을 요구하는 경우 은 지체 없이 그 열람, 확인 할 수 있도록 조치합니다.

4) 개인정보 파기절차 및 방법
이용자의 개인정보는 원칙적으로 개인정보의 수집 및 이용목적이 달성되면 지체 없이 파기합니다.
회사의 개인정보 파기절차 및 방법은 다음과 같습니다.
개인정보는 법률에 의한 경우가 아니고서는 보유되는 이외의 다른 목적으로 이용되지 않습니다.
종이에 출력된 개인정보는 분쇄기로 분쇄하거나 소각을 통하여 파기합니다.
전자적 파일 형태로 저장된 개인정보는 기록을 재생할 수 없는 기술적 방법을 사용하여 삭제합니다.

개인정보관리
개인정보관리 책임자 : 이기태
연락처 : 010 - 4555 - 2776
이메일 : ttzzl@nate.com
회사소개 개인정보보호정책 이메일추출방지정책
상호 : 한솔자원 (유빈이방) 사업자등록번호 : 511-42-01095
주소 : 대구 달서구 월배로28길 8, 102호(진천동)
집하장(창고) : 대구시 달성군 설화리 553-61
H.P : 010 - 4717 - 4441

Copyright(c) 한솔자원 All right reserved.
상담문의 : 010 - 4717 - 4441