Advanced Topics in Programming Languages: The Java Memory...

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ส.ค. 2024
  • Google Tech Talks
    March 21, 2007
    ABSTRACT
    This talk describes the Java Memory Model and how it affects the ways concurrent software should be written. Recent changes to the memory model, which were incorporated into JDK 5, redefined the semantics of threads, synchronization, volatile variables, and final fields. The new memory model provides efficient and provably correct techniques for safely and correctly implementing concurrent operations. These techniques are compatible with existing good programming practice, although care needs to be taken in a couple of corner cases.
    Most programmers can avoid depending on low-level details and instead just use the high-level concurrency abstractions...
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 9

  • @nalllar
    @nalllar 11 ปีที่แล้ว

    Yes, however in 1.4 final did not offer the same guarantees as it does now, so the default value of that field type (in this case 0) could be seen.

  • @tarungupta19may
    @tarungupta19may 12 ปีที่แล้ว

    Hi James,
    One question regarding slide - Ordering(Why that slide was wrong)
    There is a line that- Reentrant lock is no-op
    Assuming that a JVM does nothing in no-op, but my understating is that(Correct me if I am wrong) it must be increasing lock counter some where, and this counter is checked to reach 0 while exiting the synchronize block/method to release the lock, if it does not reach zero,lock wont be released.
    Thanks,
    Tarun

  • @TheMinorFallTheMajorLift
    @TheMinorFallTheMajorLift 13 ปีที่แล้ว

    interesting point about volatile increments at 38:50

  • @getalifein
    @getalifein 13 ปีที่แล้ว

    @ae6rt - At 47:00 , I could not get the "/tmp/usr" substring attack. Even Java 1.4 String was final. ??

  • @GuruprasadGV
    @GuruprasadGV 16 ปีที่แล้ว

    good

  • @chennaimobileteam
    @chennaimobileteam 12 ปีที่แล้ว

    no synchronization is always a Bug????? I don't agree

  • @BringerOfTheTruth
    @BringerOfTheTruth 14 ปีที่แล้ว

    First I thought he was wearing a white mask.

  • @callmewa1
    @callmewa1 14 ปีที่แล้ว

    not advanced...