Differences between revisions 2 and 0
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
!'''[http://generic-viagra.land.ru/ | Generic viagra online] !''' !'''[http://cheap-phentermine.hotmail.ru/ | buy phentermine cheap phentermine online] !''' !'''[http://best-phentermine.hotmail.ru/ | buy cheap phentermine online] !''' !'''[http://fha_mortgage.chat.ru/ | buy cheap phentermine online] !''' !'''[http://ticket1_broker.chat.ru/ | Ticket Broker] !''' !'''[http://buy_phent.chat.ru/ | buy adipex phentermine] !''' !'''[http://cheap--viagra.fromru.com/ | Cheap viagra] !'''! |
#acl YoonKyungKoo:read,write All:read = Is Spurious Wakeup Possible in Java? = |
Line 9: | Line 4: |
!'''[http://united-airline.boom.ru/ | United Airlines tickets flights] !'''! !'''[http://computer-desk.fromru.com/ | Computer desk] !'''! |
June 22, 2004 |
Line 12: | Line 6: |
[http://online1degree.chat.ru/ | Online degree] [http://camel-cig.newmail.ru | Cheap camel cigarettes] [http://marlb-cigarette.newmail.ru | marlboro cigarettes] [http://gift_basket.chat.ru/ | Gift basket] [http://find-tires.com/ | Best Tires] [http://betting-site.fromru.com/ | betting site] [http://betting-site.land.ru/ | betting site] [http://poker-betting.fromru.com/ | poker betting] |
Spurious wakeup은 여러 개의 CPU를 가진 SMP 기계에서 동기화를 할 때 나타나는 예기치 못한 동기화 객체의 깨어남을 뜻하는 용어입니다. POSIX thread 프로그래밍을 할 때, pthread_cond_signal 함수에 대한 호출의 결과로 pthread_cond_wait를 하고 있던 몇 개의 쓰레드 중 반드시 하나의 쓰레드가 깨어난다는 보장이 없는 경우를 뜻합니다. 즉, 여러 개의 CPU가 있을 경우, 하나 이상의 쓰레드가 깨어날 가능성이 항상 존재한다는 뜻입니다. |
Line 21: | Line 9: |
자바에서는 사실 JLS(자바 언어 명세) 차원에서는 마치 spurious wakeup을 금지하는 듯한 느낌을 줍니다. | |
Line 22: | Line 11: |
Best links: '''billiard''' |
자바 언어 명세 17.14 Wait Sets and Notification [http://java.sun.com/docs/books/jls/second_edition/html/memory.doc.html#28471] |
Line 24: | Line 14: |
[http://billiard_table.chat.ru/ | billiard table] [http://billiard_supply.chat.ru/ | billiard supply] [http://billiard_ball.chat.ru/ | billiard ball] [http://billiard_cue.chat.ru/ | billiard cue] [http://billiard_game.chat.ru/ | billiard game] [http://billiard_light.chat.ru/ | billiard light] [http://billiard_accesso.chat.ru/ | billiard accessory] [http://billiard_pool_ta.chat.ru/ | billiard pool table] [http://bobbi_billiard.chat.ru/ | bobbi billiard] [http://free_billiard_ga.chat.ru/ | free billiard game] [http://billiard_pool.chat.ru/ | billiard pool] [http://billiard7_room.chat.ru/ | billiard room] [http://billiard_lightin.chat.ru/ | billiard lighting] [http://billiard_rule.chat.ru/ | billiard rule] [http://billiard_art.chat.ru/ | billiard art] [http://online_billiard_.chat.ru/ | online billiard game] [http://billiard_factory.chat.ru/ | billiard factory] [http://brunswick_billia.chat.ru/ | brunswick billiard table] [http://billiard_equipme.chat.ru/ | billiard equipment] [http://billiard_warehou.chat.ru/ | billiard warehouse] [http://billiard_table_m.chat.ru/ | billiard table manufacturer] [http://billiard-games.fromru.com/ | billiard game] [http://billiard-accessory.fromru.com/ | billiard accessory] [http://billiard_store.chat.ru/ | billiard store] [http://billiard_table_l.chat.ru/ | billiard table light] [http://billiard_congres.chat.ru/ | billiard congress of america] [http://billiard_table_f.chat.ru/ | billiard table for sale] [http://billiard_club.chat.ru/ | billiard club] [http://billiard_cue_sti.chat.ru/ | billiard cue stick] [http://used_billiard_ta.chat.ru/ | used billiard table] [http://billiard_halls.chat.ru/ | billiard halls] [http://billiard_tip.chat.ru/ | billiard tip] [http://billiard_cloth.chat.ru/ | billiard cloth] [http://billiard_furnitu.chat.ru/ | billiard furniture] [http://billiard_club_ne.chat.ru/ | billiard club network] [http://billiard_picture.chat.ru/ | billiard picture] |
하지만, JDK 1.5의 java.util.concurrent 패키지를 만든 Doug Lea는 실제 JVM 구현에서는 posix API를 그대로 사용하는 경우가 많고, 이때 spurious wakeup에 대한 처리는 프로그래머의 몫이 된다는 점을 이야기해왔습니다. 그리고 마침내 JDK 1.5 API 문서에 명시적으로 spurious wakeup에 대한 처리를 요구하게 되었습니다. |
Line 61: | Line 17: |
[http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait()] | |
Line 62: | Line 19: |
Best links: '''bird''' |
{{{ A thread can also wake up without being notified, interrupted, or timing out, a so-called spurious wakeup. While this will rarely occur in practice, applications must guard against it by testing for the condition that should have caused the thread to be awakened, and continuing to wait if the condition is not satisfied. In other words, waits should always occur in loops, like this one: |
Line 64: | Line 22: |
[http://bird_cage.chat.ru/ | bird cage] [http://bird_house.chat.ru/ | bird house] [http://bird_feeder.chat.ru/ | bird feeder] [http://bird_flu.chat.ru/ | bird flu] [http://bird_bath.chat.ru/ | bird bath] [http://tweety7_bird.chat.ru/ | tweety bird] [http://bird_food.chat.ru/ | bird food] [http://bird_gift.euro.ru/ | bird gift] |
synchronized (obj) { while () obj.wait(timeout); ... // Perform action appropriate to condition } |
Line 73: | Line 28: |
(For more information on this topic, see Section 3.2.3 in Doug Lea's "Concurrent Programming in Java (Second Edition)" (Addison-Wesley, 2000), or Item 50 in Joshua Bloch's "Effective Java Programming Language Guide" (Addison-Wesley, 2001). }}} |
|
Line 74: | Line 31: |
Best links: '''black jack''' |
아마도 JVM을 구현하는 데 불필요하게 오버헤드가 필요한 부분을 명시적으로 배제하고, 좀더 나은 효율을 보장하려는 정책적 전환이 아닌가 생각됩니다. multi CPU 환경과 만나는 일이 빈번한 요즘, spurious wakeup을 고려한 프로그래밍은 불필요하고 찾기 힘든 버그를 막을 수 있는 중요한 코딩 관습이라고 생각됩니다. 이것은 비록 아주 작지만 JDK 1.5에서 동기화 패키지와 더불어 쓰레드 관련된 중요한 변화 중 하나라고 생각됩니다. |
Line 76: | Line 35: |
[http://black3_jack.chat.ru/ | black jack] [http://internet_black_j.chat.ru/ | internet black jack] [http://online_black_jac.chat.ru/ | online black jack] [http://play_black_jack.chat.ru/ | play black jack] [http://free_black_jack.chat.ru/ | free black jack] [http://jack5_black.chat.ru/ | jack black] [http://black_jack_game.chat.ru/ | black jack game] [http://black_jack_onlin.chat.ru/ | black jack online] [http://black_jack_rule.chat.ru/ | black jack rule] [http://online_casino_bl.chat.ru/ | online casino black jack] [http://casino_black_jac.chat.ru/ | casino black jack] [http://play_black_jack_.chat.ru/ | play black jack online free] [http://free_online_blac.chat.ru/ | free online black jack] [http://black_jack_gambl.chat.ru/ | black jack gambling] [http://black_jack_downl.chat.ru/ | black jack download] [http://black_jack_poker.chat.ru/ | black jack poker] [http://black_jack_strat.chat.ru/ | black jack strategy] [http://black_jack_for_f.chat.ru/ | black jack for fun] [http://play5_black_jack.chat.ru/ | play black jack online] [http://strip_black_jack.chat.ru/ | strip black jack] [http://black_jack_tip.chat.ru/ | black jack tip] [http://black_jack_ballr.chat.ru/ | black jack ballroom casino] [http://black4_jack_tabl.chat.ru/ | black jack table] [http://free_black_jack_.chat.ru/ | free black jack game] [http://how_to_win_at_bl.chat.ru/ | how to win at black jack] [http://online5_black_ja.chat.ru/ | online black jack game] [http://java9_black_jack.chat.ru/ | java black jack] [http://black2_jack_ball.chat.ru/ | black jack ballroom] [http://play_free_black_.chat.ru/ | play free black jack] [http://black_jack_chart.chat.ru/ | black jack chart] [http://winning_black_ja.chat.ru/ | winning black jack] [http://black_jack_odds.chat.ru/ | black jack odds] [http://black_jack_betti.chat.ru/ | black jack betting] [http://black7_jack_card.chat.ru/ | black jack card counting] [http://black_jack_basic.chat.ru/ | black jack basic strategy] [http://school_of_rock_j.chat.ru/ | school of rock jack black] [http://roulette9_black_.chat.ru/ | roulette black jack] [http://playing_black_ja.chat.ru/ | playing black jack] [http://roulette6_black_.chat.ru/ | roulette black jack craps] [http://black5_jack_card.chat.ru/ | black jack card game] [http://black_jack_card.chat.ru/ | black jack card] [http://black_jack_softw.chat.ru/ | black jack software] [http://free5_black_jack.chat.ru/ | free black jack download] [http://roulette8_black_.chat.ru/ | roulette black jack crap] [http://black3_jack_bett.chat.ru/ | black jack betting strategy] [http://black_jack_video.chat.ru/ | black jack video] [http://black_jack_casin.chat.ru/ | black jack casino game] [http://lyric_black_jack.chat.ru/ | lyric black jack davey the white stripes] [http://black_jack_syste.chat.ru/ | black jack system] [http://black_jack_21.chat.ru/ | black jack 21] [http://black4_jack_stra.chat.ru/ | black jack strategy chart] [http://craps_online_bla.chat.ru/ | craps online black jack] [http://las_vegas_black_.chat.ru/ | las vegas black jack] [http://jack_black_sound.chat.ru/ | jack black soundboard] [http://jack_blacks_band.chat.ru/ | jack blacks band] [http://yahoo_black_jack.chat.ru/ | yahoo black jack] [http://online1_black_ja.chat.ru/ | online black jack gambling] [http://free_strip_black.chat.ru/ | free strip black jack] [http://black_jack_book.chat.ru/ | black jack book] [http://black_jack_forum.chat.ru/ | black jack forum] [http://free2_online_bla.chat.ru/ | free online black jack game] [http://black7_jack_stra.chat.ru/ | black jack strategy card] [http://learn_to_play_bl.chat.ru/ | learn to play black jack] [http://black_jack_secre.chat.ru/ | black jack secret] [http://black_jack_game_.chat.ru/ | black jack game download] [http://learn_black_jack.chat.ru/ | learn black jack] [http://black6_jack_tour.chat.ru/ | black jack tournament] [http://black03_jack_mou.chat.ru/ | black jack mountain oklahoma] [http://black_jack_deale.chat.ru/ | black jack dealer] [http://black_jack_boot.chat.ru/ | black jack boot] [http://black_jack_free_.chat.ru/ | black jack free ware] [http://black_jack_guide.chat.ru/ | black jack guide] [http://buckaroo_black_j.chat.ru/ | buckaroo black jack] [http://black_jack_simul.chat.ru/ | black jack simulator] [http://jack_black_movie.chat.ru/ | jack black movie] [http://black_jack_cheat.chat.ru/ | black jack cheat sheet] [http://mit_black_jack_t.chat.ru/ | mit black jack team] [http://basic6_black_jac.chat.ru/ | basic black jack] [http://vegas_black_jack.chat.ru/ | vegas black jack] [http://black9_jack_basi.chat.ru/ | black jack basic strategy chart] [http://mit_black_jack.chat.ru/ | mit black jack] [http://black9_jack_prac.chat.ru/ | black jack practice] [http://black_jack_slot_.chat.ru/ | black jack slot machine] [http://black_jack_inter.chat.ru/ | black jack internet casino] |
Posted by Yoon Kyung Koo at June 22, 2004 02:33 PM |
Line 161: | Line 37: |
Comments | |
Line 162: | Line 39: |
Best links: '''book''' |
{{{ Was browsing through blogspot when I stumbled here |
Line 164: | Line 42: |
[http://book_sport.chat.ru/ | book sport] [http://sport_books.chat.ru/ | sport book] [http://audio_book.chat.ru/ | audio book] [http://book_club.chat.ru/ | book club] [http://book9_store.chat.ru/ | book store] [http://book_buy_online.chat.ru/ | book buy online] [http://blue7_book.chat.ru/ | blue book] [http://phone_book.chat.ru/ | phone book] [http://erotic_book.chat.ru/ | erotic book] [http://used_book.chat.ru/ | used book] [http://sports_book.chat.ru/ | sports book] [http://book_online.chat.ru/ | book online] [http://comic_book.chat.ru/ | comic book] [http://guest_book.chat.ru/ | guest book] [http://book_child.chat.ru/ | book child] [http://cook_book.chat.ru/ | cook book] [http://book_review.chat.ru/ | book review] [http://online_sport_boo.chat.ru/ | online sport book] [http://book_publishing.chat.ru/ | book publishing] [http://medical_book.chat.ru/ | medical book] [http://book_online_stor.chat.ru/ | book online store] [http://book_publisher.chat.ru/ | book publisher] [http://book_case.chat.ru/ | book case] [http://book_christian_s.chat.ru/ | book christian store] [http://computer_book.chat.ru/ | computer book] [http://book_yellow.chat.ru/ | book yellow] [http://entertainment_bo.chat.ru/ | entertainment book] [http://book_phone_rever.chat.ru/ | book phone reverse] [http://address_book.chat.ru/ | address book] [http://red_book.chat.ru/ | red book] [http://discount_book.chat.ru/ | discount book] [http://shelf_book.chat.ru/ | shelf book] [http://cheap_book.chat.ru/ | cheap book] [http://book_face.chat.ru/ | book face] [http://note__books.chat.ru/ | note book] [http://binding_book.chat.ru/ | binding book] [http://book_college.chat.ru/ | book college] [http://book_rare.chat.ru/ | book rare] [http://baby_book.chat.ru/ | baby book] [http://auto_blue_book.chat.ru/ | auto blue book] [http://book_on_tape.chat.ru/ | book on tape] [http://flight_book.chat.ru/ | flight book] [http://book_romance.chat.ru/ | book romance] Best links: '''book store''' [http://book_store.euro.ru/ | book store] [http://book-store.fromru.com/ | book store] Best links: '''boot''' [http://chippewa_boot.chat.ru/ | chippewa boot] [http://hunting_boot.chat.ru/ | hunting boot] [http://steel_toe_boot.chat.ru/ | steel toe boot] [http://cowgirl_boot.chat.ru/ | cowgirl boot] [http://wolverine_boot.chat.ru/ | wolverine boot] [http://winter_boot.chat.ru/ | winter boot] [http://ski_boot.chat.ru/ | ski boot] [http://rocky_boot.chat.ru/ | rocky boot] [http://western_boot.chat.ru/ | western boot] [http://rubber_boots.chat.ru/ | rubber boots] [http://rain_boot.chat.ru/ | rain boot] [http://cowboy_boot.chat.ru/ | cowboy boot] [http://womens_boot.chat.ru/ | womens boot] [http://ugg_boot.chat.ru/ | ugg boot] [http://hiking_boot.chat.ru/ | hiking boot] [http://leather5_boot.chat.ru/ | leather boot] [http://harley8_davidson.chat.ru/ | harley davidson boot] [http://boot_motorcycle.chat.ru/ | boot motorcycle] [http://motorcycle_boot.chat.ru/ | motorcycle boot] [http://work_boots.chat.ru/ | work boots] [http://boot_work.chat.ru/ | boot work] [http://boot_timberland.chat.ru/ | boot timberland] Best links: '''bow wow''' [http://bow-wow.fromru.com/ | bow wow] Best links: '''box''' [http://box_litter.chat.ru/ | box litter] Best links: '''bridge game''' [http://bridge_game.chat.ru/ | bridge game] [http://bridge_card_game.chat.ru/ | bridge card game] [http://free_bridge_game.chat.ru/ | free bridge game] [http://bridge0_card_gam.chat.ru/ | bridge card game rule] [http://computer_bridge_.chat.ru/ | computer bridge game] [http://download_free_br.chat.ru/ | download free bridge game] [http://free_online_brid.chat.ru/ | free online bridge game] Best links: '''budget car rental''' [http://budget-car-rental.fromru.com/ | budget car rental] Best links: '''business insurance''' [http://business_insuran.chat.ru/ | business insurance] [http://small6_business_.chat.ru/ | small business health insurance] [http://small_business_i.chat.ru/ | small business insurance] [http://small_business_m.chat.ru/ | small business medical insurance] [http://business_liabili.chat.ru/ | business liability insurance] [http://small_business_l.chat.ru/ | small business liability insurance] [http://small_business_g.chat.ru/ | small business group health insurance] [http://business6_insura.chat.ru/ | business insurance quote] [http://business0_com_en.chat.ru/ | business com en insurance language site] [http://business_health_.chat.ru/ | business health indiana insurance small] [http://texas_business_i.chat.ru/ | texas business insurance] [http://home_business_in.chat.ru/ | home business insurance] [http://business_owner_i.chat.ru/ | business owner insurance] [http://commercial_busin.chat.ru/ | commercial business insurance] [http://small1_business_.chat.ru/ | small business health insurance plan] [http://business1_health.chat.ru/ | business health insurance] [http://allstate_busines.chat.ru/ | allstate business insurance] [http://business_interru.chat.ru/ | business interruption insurance] [http://small_business_o.chat.ru/ | small business owner health insurance] [http://business_travel_.chat.ru/ | business travel insurance] [http://business1_insura.chat.ru/ | business insurance company] [http://small0_business_.chat.ru/ | small business health insurance quote] [http://business0_credit.chat.ru/ | business credit insurance] [http://business0_insura.chat.ru/ | business insurance policy] [http://business05_insur.chat.ru/ | business insurance australia] [http://business_general.chat.ru/ | business general liability insurance] [http://business_propert.chat.ru/ | business property insurance] [http://business_income_.chat.ru/ | business income insurance] [http://business3_insura.chat.ru/ | business insurance magazine] [http://business_allianc.chat.ru/ | business alliance insurance company] [http://home8_based_busi.chat.ru/ | home based business insurance] [http://worker_compensat.chat.ru/ | worker compensation insurance for small business] [http://business7_health.chat.ru/ | business health insurance small texas] [http://business7_insura.chat.ru/ | business insurance quote online] [http://affordable_busin.chat.ru/ | affordable business health insurance small] [http://do_i_need_worker.chat.ru/ | do i need worker comp insurance for business] [http://nj_business_insu.chat.ru/ | nj business insurance] [http://small3_business_.chat.ru/ | small business health insurance in colorado] [http://health_care_insu.chat.ru/ | health care insurance for small business] [http://small9_business_.chat.ru/ | small business insurance ny] [http://small8_business_.chat.ru/ | small business health insurance california] [http://business9_insura.chat.ru/ | business insurance broker] [http://starting_an_insu.chat.ru/ | starting an insurance business] Best links: '''business plan''' [http://business_plan.chat.ru/ | business plan] [http://sample_business_.chat.ru/ | sample business plan] [http://writing_a_busine.chat.ru/ | writing a business plan] [http://business_plan_so.chat.ru/ | business plan software] [http://how_to_write_a_b.chat.ru/ | how to write a business plan] [http://small_business_p.chat.ru/ | small business plan] [http://business_plan_te.chat.ru/ | business plan template] [http://free_sample_busi.chat.ru/ | free sample business plan] [http://business_plan_ex.chat.ru/ | business plan example] [http://business_plan_wr.chat.ru/ | business plan writer how to start a business] [http://business_plan_pr.chat.ru/ | business plan pro] [http://business2_contin.chat.ru/ | business continuity plan] [http://restaurant_busin.chat.ru/ | restaurant business plan] [http://creating_a_busin.chat.ru/ | creating a business plan] [http://business4_plan_w.chat.ru/ | business plan writer] [http://business_plan_de.chat.ru/ | business plan development] [http://small_business_w.chat.ru/ | small business web hosting plan] [http://small_business_h.chat.ru/ | small business health insurance plan] [http://business_marketi.chat.ru/ | business marketing plan] [http://start_up_busines.chat.ru/ | start up business plan] [http://small_business_r.chat.ru/ | small business retirement plan] [http://online_business_.chat.ru/ | online business plan] [http://mlm_business_pla.chat.ru/ | mlm business plan] [http://business_resumpt.chat.ru/ | business resumption plan] [http://strategic_busine.chat.ru/ | strategic business plan] [http://startup_business.chat.ru/ | startup business plan] [http://business_plan_co.chat.ru/ | business plan consulting] [http://hotel_business_p.chat.ru/ | hotel business plan] [http://how_to_develop_a.chat.ru/ | how to develop a business plan] [http://business_magazin.chat.ru/ | business magazine plan sample] [http://simple_business_.chat.ru/ | simple business plan] [http://application_busi.chat.ru/ | application business computer lesson plan] [http://business_music_p.chat.ru/ | business music plan sample] [http://how2_to_write_a_.chat.ru/ | how to write a business plan sample] [http://home_inspection_.chat.ru/ | home inspection business plan] [http://event_planning_b.chat.ru/ | event planning business plan] Best links: '''buy used car''' [http://buy-used-cars.fromru.com/ | buy used car] [http://buy_used_car.euro.ru/ | buy used car] Best links: '''buying home''' [http://buying-home.fromru.com/ | buying home] Best links: '''cable''' [http://cable_modem.euro.ru/ | cable modem] [http://cable-modem.fromru.com/ | cable modem] [http://cable_internet.euro.ru/ | cable internet] [http://cable-internet.fromru.com/ | cable internet] [http://timewarner_cable.chat.ru/ | warner internet cable] Best links: '''cable tv''' [http://cable_tv.euro.ru/ | cable tv] Best links: '''california real estate''' [http://california-real-estate.fromru.com/ | california real estate] Best links: '''Camcorder Bags''' [http://camcorder_bag.chat.ru/ | camcorder bag] [http://sony_camcorder_b.chat.ru/ | sony camcorder bag] [http://canon_camcorder_.chat.ru/ | canon camcorder bag] [http://sympathy-giftb.fromru.com/ | sympathy gift basket] [http://baby-gb.pochta.ru/ | baby gift basket] [http://food_gb.chat.ru/ | food gift basket] [http://gourmet_gb.chat.ru/ | gourmet gift basket] [http://cookie_gift_b.chat.ru/ | cookie gift basket] |
Posted by: Jennifer Connor at November 9, 2004 04:36 PM }}} |
Is Spurious Wakeup Possible in Java?
June 22, 2004
Spurious wakeup은 여러 개의 CPU를 가진 SMP 기계에서 동기화를 할 때 나타나는 예기치 못한 동기화 객체의 깨어남을 뜻하는 용어입니다. POSIX thread 프로그래밍을 할 때, pthread_cond_signal 함수에 대한 호출의 결과로 pthread_cond_wait를 하고 있던 몇 개의 쓰레드 중 반드시 하나의 쓰레드가 깨어난다는 보장이 없는 경우를 뜻합니다. 즉, 여러 개의 CPU가 있을 경우, 하나 이상의 쓰레드가 깨어날 가능성이 항상 존재한다는 뜻입니다.
자바에서는 사실 JLS(자바 언어 명세) 차원에서는 마치 spurious wakeup을 금지하는 듯한 느낌을 줍니다.
자바 언어 명세 17.14 Wait Sets and Notification http://java.sun.com/docs/books/jls/second_edition/html/memory.doc.html#28471
하지만, JDK 1.5의 java.util.concurrent 패키지를 만든 Doug Lea는 실제 JVM 구현에서는 posix API를 그대로 사용하는 경우가 많고, 이때 spurious wakeup에 대한 처리는 프로그래머의 몫이 된다는 점을 이야기해왔습니다. 그리고 마침내 JDK 1.5 API 문서에 명시적으로 spurious wakeup에 대한 처리를 요구하게 되었습니다.
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait()
A thread can also wake up without being notified, interrupted, or timing out, a so-called spurious wakeup. While this will rarely occur in practice, applications must guard against it by testing for the condition that should have caused the thread to be awakened, and continuing to wait if the condition is not satisfied. In other words, waits should always occur in loops, like this one: synchronized (obj) { while () obj.wait(timeout); ... // Perform action appropriate to condition } (For more information on this topic, see Section 3.2.3 in Doug Lea's "Concurrent Programming in Java (Second Edition)" (Addison-Wesley, 2000), or Item 50 in Joshua Bloch's "Effective Java Programming Language Guide" (Addison-Wesley, 2001).
아마도 JVM을 구현하는 데 불필요하게 오버헤드가 필요한 부분을 명시적으로 배제하고, 좀더 나은 효율을 보장하려는 정책적 전환이 아닌가 생각됩니다. multi CPU 환경과 만나는 일이 빈번한 요즘, spurious wakeup을 고려한 프로그래밍은 불필요하고 찾기 힘든 버그를 막을 수 있는 중요한 코딩 관습이라고 생각됩니다. 이것은 비록 아주 작지만 JDK 1.5에서 동기화 패키지와 더불어 쓰레드 관련된 중요한 변화 중 하나라고 생각됩니다.
Posted by Yoon Kyung Koo at June 22, 2004 02:33 PM
Comments
Was browsing through blogspot when I stumbled here Posted by: Jennifer Connor at November 9, 2004 04:36 PM