Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

주니어 개발자도 이해 할 수 있는 아름다운 JVM 세상

7,471 views

Published on

Bueatiful JVM World

Published in: Software

주니어 개발자도 이해 할 수 있는 아름다운 JVM 세상

  1. 1. ჎ఁ࿌ ੭෧ၴ౅ ၦጄ ዾ ༘ ၰ௴ ྤ൑ఋဪ JVM ໞື 2014. 11 Darion Kim
  2. 2. ୾௴ ௛ૐ? Darion Kim (଀጑ૺ) ಀ࿝༺ඊቔൟ ࿨ૐ໴ ༘໐ พ ၴᆼ ቛཅ(ቛጁၡ ཅ, God of Integration) hnki0104@me.com https://www.facebook.com/ groups/serverside (၌ၦྤ๢)
  3. 3. ၦ බ໏൐ ක౷ Freshman࿝઎ ෡ᆺఁఋ. (for YMS, JHJ)
  4. 4. ၦු JVM࿝ ఝጄ໏ ྤ གྷ੿୾ གྷఁ࿌ ੭෧ၴ ึ౹ၔ ࿥ૺଆხൢ …
  5. 5. ྾໵౵൝ఁఋ. ႗ఝ ࿌ഒ઎ ࿈ૺዻ ხ ྨઔཀఁఋ.
  6. 6. ྤ൑ఋဪ JVM ໞື ၕ ൢ୾ ย ა๗ਜ਼ ౗ ໮ཀఁଆ?
  7. 7. ຫ೥౹ၔ JVMၕ ශ ೡધ ࿈ૺዾଆဠ?
  8. 8. JVM = Java Virtual Machine
  9. 9. ૯ ఋၗิሽ௴ ඳჰ ၿ ࿌ഒ઎ ࿈ૺዻధ ೡૐဠ. ΢΢
  10. 10. ႔௴ ࿌಩઎ ࿈ૺዾ ଆဠ?
  11. 11. ጮགྷ ይച૯ೱ (Program) ၔ ྤໞဠ?
  12. 12. ይച૯ೱၕ ཇጌዻඓ ይചໞ༺(Process)ਜ਼ ແໜ౛ఁఋ.
  13. 13. Ⴓధ ၴໞᎁ ໕඗ዻඓ? ಀ༺ሙ(Disk)࿝ ၰ௴ ይച૯ೱ ኒၩ (File)ၕ ཇጌዽఋ. ይച૯ೱ ኒၩၦ ඈක൘(Memory) ႕ ႁ౗ඓ໏ ይചໞ༺ጷ ౗࿌ ይചໞ໏ (CPU)൐ ຫဧዽఋ.
  14. 14. ૯൜ၒച౅ ૯഍ยଆ ဠ? Disk Program.exe Loading CPU Process Memory
  15. 15. Process௴ Disk, File, Memory, CPUဉ શഏ౗࿌ ၰ஫ဠ. ૺ࿍ጄ౞ໞဠ.
  16. 16. JVM = Process ၦೡધ ਜ਼ႜዽఋඓ
  17. 17. JVM౅ Process ᅧ೿ ཇጌዾ༘ ၰઔ஫ဠ.
  18. 18. ࿝ၦ~ ఋ౹ ྤགྷඓ ໏… ^^
  19. 19. java -cp ೡၦ๐೻൘ ඈၨሜ೭༺
  20. 20. Ⴓధ ၴໞᎁ ໕඗ዻඓ? ಀ༺ሙ࿝ ၰ௴ java ይച૯ೱ࿝ ඈၨ ሜ೭༺൐ ხႜዻ࿥ ཇጌዽఋ. -cp စ໩ၕ ჎࿌ ೡၦ๐೻൘౅ ხႜዻ ࿥ ཇጌዽఋ. ೡၦ๐೻൘௴ ಀആቔ൘, *.jar, *.zip ኒ ၩ ႗ఝઠചၦఋ.
  21. 21. ૯൜ၒച౅ ૯഍ยଆ Disk ဠ? java Loading CPU JVM Memory Main.class Main Library Library
  22. 22. JVM౅ Process ൬஫ ဠ.
  23. 23. ୵ଆხ ྤఁೡધ ዻ གྷ௴ ึ౹ၔ ࿥ૺଆ ხൢ …
  24. 24. ၴ~ ૯೻ඓ Ⴓధ ཉ౅ ၰ઎ ౹࿌ਜ਼ ยଆဠ?
  25. 25. JVM ྦᄠ࿝໏௴ ࿌ ಠၩ౹ၦ ข࿌ჲଆ ဠ?
  26. 26. ૯೿ ဨ໓ Creatorဉ Class ဉ Object, Instanceၡ ᅍ ၦ൐ ྩྤ྽ ጁఁఋ.
  27. 27. Ⴓధ ၴໞᎁ ໕඗ዻඓ? Creator = Ⴎම჎, ෡ച ࿥೻ึ ၮఁఋ. Class(*.class)௴ Ⴎම჎ਜ਼ ൢ౷ ຄఝၮఁ ఋ. Class௴ Objectጷ ౛ఁఋ. = Instance ૯൥ၔ ຄఝ࿝ ແ඗എၕ ุ࿌பၒඓ ੮ ᅰਜ਼ ౛ఁఋ.
  28. 28. ૯൜ၒച౅ ૯഍ยଆ ဠ? Instance Class Object Creator
  29. 29. ၴ~ ఋགྷ Class, Object ൐ ૺ࿍ጄ჎ໞဠ.
  30. 30. ၦ႞ ႜ൥ച ྤ൑ఋ ဪ JVM ໞືၒച ౹ ࿌੣ఁఋ. ^^
  31. 31. ྤ൑ఋဪ JVM ໞື ၕ ᆓື႕ၒച ૯഍ ฤఁఋ.
  32. 32. თဠዽ ઇၔ ༱઎ ૯൝ఁఋ.
  33. 33. ႜጸዽ ૺ༜ ༺ኳၦ พધ ཌྷၔ ึ౹ၔ ࿥ ૺଆხൢ …
  34. 34. ྤ൑ఋဪ JVM ໞື Beautiful JVM World
  35. 35. ࿌ೡ! ྤඳઇ౅ ࿖ ஫ဠ.
  36. 36. ྤఇఁఋ. ༝ၔ લཅ౹ၦ ၰཀ ఁఋ.
  37. 37. JVM ໞື࿝௴ ੜၴ ધ၉ ၡ ࿦ዾ(Role)ၕ ਜ਼ხધ ၰ௴ ੮ᅰਜ਼ ၰཀఁఋ.
  38. 38. ఋགྷ ዽ฀… ੮ᅰ௴ ੜၴ ધ၉ၡ ࿦ ዾ(Role)ၦ ၰཀఁఋ.
  39. 39. “ᅖႮ჎”ചཡ ຫ೥ၕ ൢ౹഍ધ ጋఋඓ ຫ೥ ఖ઎ ൢ౹࿌྽ ዻઔ჊.
  40. 40. Ⴓధ ၴໞᎁ ໕඗ዻඓ? ຫ೥ၕ ൢ౹഍ඓ ൽ൘, චቛ, ኖ, ఋ൘ ၡ ႜጸዽ ࿦ዾၕ ႜၡዽఋ. ൽ൘ဉ චቛၦ ዻ୾ਜ਼ ྤఁඓ ຫ೥ၦ ྤఁఋ. ኖ઴ ఋ൘ਜ਼ ౞੭ਜ਼ ྤఁඓ ຫ೥ၦ ྤ ఁఋ.
  41. 41. ૯൜ၒച౅ ໕඗ዻඓ? ຫ೥ ૃම
  42. 42. ฀ဘ: ဨ൘௴ OOP࿝໏ ຫ೥(੮ᅰ)ၕ ຫ೥ఖხ ྨ઎ ແໜጁఁఋ. ྦ૯೻ཊఁଆ?
  43. 43. ఋགྷ ༝ၔ લཅၕ ໴੭ጁఁఋ.
  44. 44. ሜ೭༺ചధ(Classloader) Beautiful JVM World Classloader
  45. 45. Ⴓధ ၴໞᎁ ໕඗ዻඓ? ሜ೭༺ചధ(Classloader) ࿦ዾ : JVM ၮૐ࿝໏ ሜ೭༺౹ၕ ചಉ ዽఋ. JVM ໞືၡ ༘බၿ ࿦ዾ
  46. 46. ૯൜ၒച౅ ໕඗ዻඓ? Beautiful JVM World Class Classloader Class Class Class Class
  47. 47. ചಉౘ ሜ೭༺௴ ੮ ᅰጷ ౙ༘ ၰཀఁఋ.
  48. 48. Ⴓధ ၴໞᎁ ໕඗ዻඓ? Car a = new Car(); Car : ሜ೭༺ a : ੮ᅰ
  49. 49. ૯൜ၒച౅ ໕඗ዻඓ? Beautiful JVM World Class Classloader Car Class Class Class a
  50. 50. ੮ᅰ൐ ࿥೻੭ ແໜ ዻඓ
  51. 51. Ⴓధ ၴໞᎁ ໕඗ዻඓ? Car a = new Car(); Car b = new Car(); House c = new House(); Food d = new Food();
  52. 52. ૯൜ၒച౅ ໕඗ዻඓ Beautiful JVM World Class Classloader Car Class Food House a b c d
  53. 53. ੮ᅰਜ਼ ඳዽఝച ൣ ၦ ແໜ౗ඓ ࿌಩઎ ౙଆဠ?
  54. 54. ૯൜ၒച౅ ໕඗ዻඓ Beautiful JVM World Class Classloader Car Object Class Object Food House a b c d Object Object Object Object Object Object Object Object Object Object Object Object Object Object Object
  55. 55. JVM ໞືၡ ੮ᅰ ෘ ౅ਜ਼ ႙႙ ைྤჵఁ ఋ.
  56. 56. ૯೻ఋਜ਼ …
  57. 57. ၦഄ઎ ౗ఋਜ਼ …
  58. 58. OOME(OutOf MemoryError)
  59. 59. ዻხൢ ႜື႕ၨ ື ጼ࿝໏௴ OOMEਜ਼ ෧ ແዻხ ྨཀఁఋ.
  60. 60. ဒ ૯೾ଆဠ?
  61. 61. ವ ዻ୾ၡ ༝ၔ લ ཅၕ ໴੭ጁఁఋ.
  62. 62. Garbage Collector Beautiful JVM World Class Classloader Car Object Class Object Food House a b c d Object Object Object Object Object Object Object Object Object Object finalize Object Object Object finalize finalize finalize finalize finalize finalize finalize
  63. 63. Ⴓధ ၴໞᎁ ໕඗ዻඓ? Garbage Collection : ੮ᅰਜ਼ ధ ၦື ᅒ Ⴎਜ਼ ࿖ఋધ ንถ(finalize)ౘ ઠဨ Garbage Collector࿝ ၡጄ ጭᆖ౛ఁఋ. ყ ੮ᅰ൐ JVM ໞື࿝໏ ໴ඔ གྷሥఁ ఋ.
  64. 64. ૯൜ၒച౅ ໕඗ዻඓ? Beautiful JVM World Class Classloader Object Class Food House d Object Object Object Object Object Object Object Object Object Car finalized
  65. 65. WAS(Web Application Server) = JVM ၦೣ ແੜၔ ጄพ໮୾ဠ?
  66. 66. ൬ཀఁఋ. WAS౅J2EE ༺ኳၕ ა ༘ዽ JVMၮఁఋ.
  67. 67. ૯൜ၒച౅ ໕඗ዻඓ? Beautiful JVM World AServlet Classloader FoodServlet House.jsp Car.jsp a b c d BServlet
  68. 68. JVM ໞືၔ ጃື ྤ൑ఖૺൢ ዾଆဠ?
  69. 69. ႗ఝ ྤఇఁఋ.
  70. 70. Ⴎම჎ဉ Ⴎම჎ၡ ᆵ ૐึ౹ၔ ุ໷ዽ ሜ೭ ༺൐ ൢ౹༘ၰཀఁఋ.
  71. 71. ළ౅ ක്ધ ൢ౷ ሜ ೭༺ਜ਼ ᆊધၡ ุ໷ ዽ ሜ೭༺ၮఁఋ.
  72. 72. ุ໷ዽ ሜ೭༺ၡ ၡጄ ແໜ ౘ ੮ᅰ౹ၦ JVM ໞືၕ ෥౵གྷ ࿌ხഀ઎ ጁఁఋ.
  73. 73. ࿌಩઎ ጄછጄ྽ ዻ ୾ဠ?
  74. 74. ይചኒၩൟ(Profiling) ၕ ጄ྽ጁఁఋ.
  75. 75. ይചኒၩൟၕ ዻ഍ඓ ሜ೭༺ചధဉ ᆵጄႦ ྽ ጁఁఋ.
  76. 76. Ⴓధ ၴໞᎁ ໕඗ዻඓ? ဨ൘௴ ሜ೭༺ചధၡ ࿦ዾၕ ྩધ ၰཀఁఋ. ሜ೭༺ചధ࿝ Hook Class൐ ႕ဧጁఁఋ. ይചኒၩൟ ఝື ሜ೭༺ਜ਼ ചಉౙ ಕ ஀ྤᅘ࿌ ᆬႜ ചჯၕ ཉ࿌௉ཀఁఋ. ይചኒၩ ᆬႜၕ ༘ጌጁఁఋ. (ex:ඈ໴౵ ༘ጌགྷ੝ ᆬ ႜ) ይചኒၩൟ ఝື ሜ೭༺௴ ၴཅ࿝ ච໵࿝ ཉ࿌௉ၔ ചჯၕ ၨხዻხ ජዻધ ዀ໴ဉ ౏ၩዻ઎ ጺ౏ጁఁఋ.
  77. 77. Hooking Class
  78. 78. ૯൜ၒച౅ ໕඗ዻඓ? Beautiful JVM World AServlet Classloader FoodServlet House.jsp Crazy.jsp maddest-a maddest-b c d BServlet hook Profiler
  79. 79. ุ໷ዽ ሜ೭༺࿝໏ ແ ໜౘ ੮ᅰ௴ ጭጹ, ႖ႉ, ൠൠพఋ౅ ඳ໙ཀఁఋ.
  80. 80. ၦ ྤ൑ఋဪ JVM ໞື࿝ Memory Leak, Infinite Loop ၡ ྭໞዅ൐ ጸຮགྷሥఁఋ.
  81. 81. છ૑࿟ ྤ൑ఋဪ JVM ໞື ࿝ OutOfMemoryError, Process of Hanging઴ ੪ၔ Ⴖ ൥ၕ ਜ਼Ⴆఋ ვఁఋ.
  82. 82. JVM Ⴖ൥…
  83. 83. ૯೭໏ ይചኒၩൟၒച ဴ ၨ ሜ೭༺ ෟ ੮ᅰ൐ ᅗྤ ႞੿ጄ྽ ዻ௴ ઇၮఁఋ.
  84. 84. ᅗྤ໏ ෥౵གྷ ႞੿ዻೡ~!
  85. 85. ይചኒၩൟၦ ࿌഍ ါઇ ੪ၒགྷ჊?
  86. 86. APM (Application Performance Management) ໸ള໩ၕ ૐ൯ዻ࿥ ຫဧዻ གྷඓ ੝ఎጁఁఋ.
  87. 87. ඳഭച ዻཇ഍ඓ JDK࿝ ዅ ጀౘ JConsoleၦ୾ VisualVM ၕ ຫဧዻགྷඓ ౛ఁఋ.
  88. 88. Ⴓధ ችጷౘ ይചኒၩൟၕ ဴዻགྷඓ Java Instrumentation ૺฅၕ ຫဧ ዻ࿥ ૐጢዻགྷඓ ౛ఁఋ.
  89. 89. ྤ൑ఋဪ JVMໞືၔ ဨ൘ਜ਼ ෥౵གྷ ᆓૐጄ ྽ ౗௴ ໞືၮఁఋ.
  90. 90. ၦື ၌ၦྤ๢࿰ཀఁఋ.

×