Memory Model (Programming)
Audry Nava 于 20 小时前 修改了此页面

reference.com
In computing, a memory model describes the interactions of threads via memory and their shared use of the information. A memory model permits a compiler to carry out many essential optimizations. Compiler optimizations like loop fusion transfer statements in the program, which might influence the order of read and write operations of probably shared variables. Adjustments in the ordering of reads and writes can cause race situations. And not using a memory mannequin, a compiler could not apply such optimizations to multi-threaded applications in any respect, or it might apply optimizations which are incompatible with multi-threading, resulting in bugs. Fashionable programming languages like Java due to this fact implement a memory model. The memory model specifies synchronization boundaries which might be established via particular, well-outlined synchronization operations resembling buying a lock by entering a synchronized block or method. The memory model stipulates that adjustments to the values of shared variables only have to be made seen to different threads when such a synchronization barrier is reached. Furthermore, your complete notion of a race situation is outlined over the order of operations with respect to these memory limitations.


These semantics then give optimizing compilers the next diploma of freedom when making use of optimizations: the compiler needs to make sure only that the values of (potentially shared) variables at synchronization limitations are assured to be the same in each the optimized and unoptimized code. Specifically, reordering statements in a block of code that contains no synchronization barrier is assumed to be safe by the compiler. Designing a memory mannequin that enables a maximal degree of freedom for compiler optimizations whereas still giving ample ensures about race-free and (perhaps more importantly) race-containing programs. Proving program optimizations which are right with respect to such a memory mannequin. The Java memory mannequin was the primary attempt to supply a complete threading memory mannequin for a well-liked programming language. C Committee on board with their efforts. October 2007 assembly in Kona. Jeremy Manson and Brian Goetz (February 2004). “JSR 133 (Java Memory Mannequin) FAQ”. Retrieved 2010-10-18. The Java Memory Model describes what behaviors are legal in multithreaded code, and how threads may interact by way of memory. It describes the connection between variables in a program and the low-stage particulars of storing and retrieving them to and from memory or registers in a real pc system. It does this in a manner that can be implemented appropriately using a large number of hardware and a large variety of compiler optimizations. Goetz, Brian (2004-02-24). “Fixing the Java Memory Mannequin, Part 1”. IBM. Buhr, Peter A. (September 11, 1995). “Are Safe Concurrency Libraries Possible?” (PDF). Communications of the ACM. Boehm, Hans-J. (November 12, 2004). “Threads Can’t be Applied as a Library” (PDF). APIs the place those are currently lacking. This laptop-programming-associated article is a stub. You can help Wikipedia by increasing it.


When the BlackBerry debuted in 1999, carrying one was a hallmark of highly effective executives and savvy technophiles. Individuals who bought one either wanted or wanted constant entry to e-mail, a calendar and a telephone. The BlackBerry’s manufacturer, Analysis in Motion (RIM), reported only 25,000 subscribers in that first year. But since then, its popularity has skyrocketed. In September 2005, RIM reported 3.65 million subscribers, and users describe being addicted to the gadgets. The BlackBerry has even introduced new slang to the English language. There are phrases for flirting via BlackBerry (blirting), repetitive movement accidents from too much BlackBerry use (BlackBerry thumb) and unwisely using one’s BlackBerry while intoxicated (drunk-Berrying). Whereas some individuals credit the BlackBerry with letting them get out of the office and neural entrainment audio spend time with associates and household, others accuse them of permitting work to infiltrate each moment of free time. We’ll also discover BlackBerry hardware and software. PDA. This may very well be time-consuming and inconvenient.


It may additionally lead to precisely the conflicts that having a PDA is supposed to prevent. For instance, a supervisor may schedule a meeting on the PDA, not figuring out that an assistant had just scheduled a meeting for the same time on a networked calendar. A BlackBerry, however, does all the pieces a PDA can do, and it syncs itself continually through push technology. First, the software program senses that a new message has arrived or the info has modified. Then, it compresses, packages and redirects the data to the handheld unit. The server uses hypertext switch protocol (HTTP) and transmission control protocol (TCP) to communicate with the handhelds. It also encrypts the info with triple knowledge encryption standard (DES) or superior encryption normal (AES). The software program determines the capabilities of the BlackBerry and lets people establish standards for the data they need to have delivered. The criteria can include message kind and size, particular senders and updates to particular programs or databases.


As soon as all of the parameters have been set, the software waits for updated content material. When a new message or other data arrives, the software formats the information for transmission to and show on the BlackBerry. It packages e-mail messages into a kind of digital envelope so the consumer can resolve whether or not to open or retrieve the rest of the message. The BlackBerry listens for new info and notifies the consumer when it arrives by vibrating, altering an icon on the display or turning on a gentle. The BlackBerry doesn’t poll the server to search for updates. It merely waits for the replace to arrive and notifies the consumer when it does. With e-mail, a copy of each message additionally goes to the consumer’s inbox on the computer, but the e-mail client can mark the message as learn as soon as the consumer reads it on the BlackBerry. Folks describe BlackBerry use as an addiction, and this is why.