자바 쓰레드 능숙하게 다루기
|
|
- 태현 명
- 5 years ago
- Views:
Transcription
1 (, )..,., (!) Timer.,., ,..
2 14.,. (http :/ / avaworld.com) ,... ThreadRunnable synchronized, wait (), notify (). Thread AWT,. C+ +, David FlanaganJ ava in a Nutshell C+ +. C+ +, Perter van der LindenJ ust J ava 2, 4th Edition.
3 15 http :/ / ( ). This program includes code from Allen Holub' s book Taming J ava Threads Allen I. Holub. All rights reserved. http :/ /
4 . GUI,..,...,. ( )
5 18 Chapte r 1.,.,.,.,.... (AWT) ( 1.1AWT + AWT ). AWT..., main (), AWT. (. ) AWT., AWT ( AWT., UI ).,. AWT ( )., (race condition). synchronized.
6 19 AWT.... AWT, ( ). [1.1]. Sleep Hello. Sleep 5 ( ). Hello Hello World. Sleep 5 Hello. Hello Hello World.,. 1.1 /text/books/threads/ch1/hang.java. 01: import javax.swing.*; 02: import java.awt.*; 03: import java.awt.event.*; 04: 05: class Hang extends JFrame 06: { 07: publi c Hang() 08: { JButton b1 = newjbutton( "Sleep" ); 09: JButton b2 = newjbutton( "Hello" ); 10: 11: b1.addact ionlistener 12: ( newact ionlistener () 13: { public void act ionperformed( Act ionevent event ) 14: { t ry 15: { Thread.currentThread().sleep(5000);
7 20 Chapte r 1 16: } 17: cat ch(except ion e){} 18: } 19: } 20: ); 21: 22: b2.addact ionlistener 23: ( newact ionlistener () 24: { public void act ionperformed( Act ionevent event ) 25: { System.out.print ln("hel lo wor ld"); 26: } 27: } 28: ); 29: 30: getcontentpane().setlayout ( new FlowLayout () ); 31: getcontentpane().add( b1 ); 32: getcontentpane().add( b2 ); 33: pack(); 34: show(); 35: } 36: 37: public stat ic void main( St ring[] args ) 38: { newhang(); 39: } 40: } GUI...,, (AWT )., UI. ( AWT )..
8 2 1.. ( % ).....,.,. (!).,...,..... (Doug SchmidtACE. http :/ / ~ schmidt/ ACE.html ( ACE J ACE. http :
9 22 Chapte r 1 / / ~ schmidt/ J ACE.html ).,..?.,. (, ) ( ).. (new ). (,.,. )....,..
10 23., ( ).. ( ).,.....,. ( )... (.,. )..,..,..
11 24 Chapte r 1. (semaphore).. ( )..... Dijkstra.. synchronized. synchronized.. J NI (J ava
12 25 Native Interface) OS.... synchronized,. [1.2].. [1.2]13 test (...) 1,000,000.. (200MHz P5, NT4/ SP3, J DK Hot Spot 1.0fcs, build E). %java -verbose:gc Synch Pass 0: Time lost : 234ms %increase Pass 1: Time lost : 139ms %increase Pass 2: Time lost : 156ms %increase Pass 3: Time lost : 157ms %increase Pass 4: Time lost : 157ms %increase Pass 5: Time lost : 155ms %increase Pass 6: Time lost : 156ms %increase Pass 7: Time lost : 3,891ms. 1, 484.7%increase Pass 8: Time lost : 4, 407ms. 1,668.33%increase test (). Pass 0.,. (Pass 6) Pass 7Pass 8.,
13 26 Chapte r 1. Pass ,. atomic-bit-test- and- set (.,, ).,.,. (0), (1).... (), ( [System call] ).. NT 600.,. Pass 7Pass8. Sun Alexander Garthwaite.
14 27. (.., monitorentermonitorexit ACC_SYNCHRONIZED. ). ( [release] )..,.,. (thin-lock)/ (fat-lock)., (16 ~ 64).., waitnotify...,. hashcode (). ( )...,.
15 28 Chapte r /text/books/threads/ch1/synch.java 01: import java.ut i l.*; 02: import java.t ext.numberformat ; 03: /**... <ht tp:/ / java.sun.com/ products/ hot spot/q+a.html.> */ 04: class Synch 05: { 06: private stat ic long[] locking_t ime = new long[100]; 07: private static long[] not_ locking_time = new long[100]; 08: private static final int ITERATIONS = ; 09: 10: synchronized long locking (long a, long b){ret urn a + b; } 11: long not_locking (long a, long b){return a + b; } 12: 13: private void test ( int id ) 14: { 15: long start = System.currentTimeMillis(); 16: 17: for (long i = ITERATIONS; -- i >= 0 ; ) 18: { locking(i, i ); 19: } 20: 21: locking_time[id] = System.currentTimeMillis() - start ; 22: start = System.currentTimeMillis (); 23: 24: for (long i = ITERATIONS; -- i >= 0 ; ) 25: { not_ locking(i, i); 26: } 27: 28: not_ locking_time[id] = System. currenttimemillis () - start ; 29: } 30: 31: stat ic void print_results( int id )
16 29 32: { 33: 34: NumberFormat compositor = NumberFormat.getInstance(); 35: compositor.setmaximumfract iondigits( 2 ); 36: 37: double t ime_in_synchronizat ion = locking_t ime[id] - not_ locking_t ime[ id]; 38: 39: System.out.pr int ln( "Pass " + id + ": Time lost : " 40: + compositor.format ( t ime_in_synchronizat ion ) 41: + " ms. " 42: + compositor.format ( ((double) locking_t ime[id]/ not_ locking_t ime[id])*100.0 ) 43: + "%increase" 44: ); 45: } 46: 47: stat ic public void main(string[] args) throws InterruptedExcept ion 48: { 49: / /. 50: 51: final Synch tester = newsynch(); 52: t ester. test (0); print_results (0); 53: t ester. test (1); print_results (1); 54: t ester. test (2); print_results (2); 55: t ester. test (3); print_results (3); 56: t ester. test (4); print_results (4); 57: t ester. test (5); print_results (5); 58: t ester. test (6); print_results (6); 59: 60: / /. 61: / / HotSpot 62: / /. 63: 64: final Object start_gate = newobject (); 65: 66: Thread t 1 = newthread() 67: { public void run() 68: { t ry{ synchronized(start_gate) { start_gate.wait (); } } 69: catch( InterruptedExcept ion e ){} 70: 71: t ester. test (7); 72: } 73: };
17 30 Chapte r 1 74: Thread t2 = newthread() 75: { public void run() 76: { t ry{ synchronized(start_gat e) { start_gat e.wait (); } } 77: cat ch( InterruptedExcept ion e ){} 78: 79: tester.test (8); 80: } 81: }; 82: 83: Thread.currentThread().setPriority( Thread.MIN_PRIORITY ); 84: 85: t 1.start (); 86: t2.start (); 87: 88: synchronized(st art_gate){ start_gate.not ifyal l (); } 89: 90: t 1. join(); 91: t2. join(); 92: 93: print_results( 7 ); 94: print_results( 8 ); 95: } 96: {,.,. (. ).. (, )...
18 3 1 :...,.. longdouble. ( ). class Unreliable { private long x; } public long get_x( ) { ret urn x; } public void set_x(long value ) { x = value; }, obj.set_x( 0 );, obj.set_x( 0x abcdef );. x = value; x.high_word = value. high_word; x. low_word = value. low_word;
19 32 Chapte r 1, ,. 64JVM( ). 32.,., x 0x abcdef, 0x , 0x abcdef 0x set_x ()get_x(). volatile volatile.,... volatile,. public volatile. public. volatile..,. 32 ( ).,, long double., xint.
20 33. x = + + y x + = y xy.,. synchronized. (Race Condition),.. synchronized, boolean. synchronized. (Immutability). (Immut able object),. String. String.. string1 + = string2 string1 string2..., (., ). final...,.
21 34 Chapte r 1 class I_am_immutable { private f i nal int MAX_VALUE = 10; pr ivate f i nal int blank_final; } public I_am_ immutable( int init ial_value ) { blank_final = init ial_value; },,.,.. (Synchronization Wrappers).. 2. J DK 1.1 ( ),.. ( ).. Gang-of-Four (Decorator Pattern, ) ( Gang-of-Four Erich Gamma, Richard Helm, Ralph J ohnson, J ohn Vlissides Design Patterns : Elements of Reusable Object- Oriented Software, Addison Wesley, GoF )... j ava.io., BufferedInputStreamInput Stream
22 35 InputStream. Buffered Input- Stream InputStream, InputStream., BufferedInputStreamFile- InputStream, FileInputStreamread(), BufferedInputStreamread(). FileInput Stream BufferedInput Stream..,. 01: interface Some_interface 02: { public Object message(); 03: } 04: 05: class Not_t hread_safe implements Some_interface 06: { 07: public Object message() 08: { / /. 09: return null; 10: } 11: } 12: 13: class Thread_safe_wrapper implements Some_ interface 14: { 15: Some_interface not_t hread_safe; 16: 17: public Thread_safe_wrapper ( Some_interface not_t hread_safe ) 18: { this.not_thread_safe = not_thread_safe; 19: } 20: 21: public Some_interface ext ract () 22: { return not_t hread_safe(); 23: } 24: 25: public synchroni zed Object message() 26: { return not_t hread_safe.message(); 27: } 28: }
23 36 Chapte r 1 Not_thread_safe.,. Some_interface object = newnot_thread_safe(); / /... object = newthread_safe_wrapper (object ); / /.,. object = ((Thread_safe_wrapper)object ).ext ract ();.? (Concurrency) (Parallelism)..,. [ 1.1].. CPU
24 37., (,, )..,.,..,..,.,., CPU.,....., NT.
25 38 Chapte r 1 10 (, ) , 10., 10.. NT. NT ,., 12 NT 1, 8, 9, 10NT 7. NT. NT. NT (Priority boosing). C,., NT I/ O,.,. I/ O. UI.....,.,
26 39.,. NT. NT.,,. NT.,. NT (Priority classes). [ 1.2]. ( 7 31., 7 ). 22 ( NT ).. NT 1.2 NT Idle Normal 1, , , Idle, Normal. High 6.
27 40 Chapte r 1 NT., (boosting)....,... NT.,, NT. NT.? NT,.., set- Priority(), Thread.MAX_PRIORITYThread.MIN_PRIORITY Thread. NORM_PRIORITY , os.name NT., Sun... Sun MS( ) JNI., RNI., MS 3158 RNI JNI.
28 4 1, NORM_PRIORITY..!., ( ). (starvation) (,. ).. (, 3.x. 3.1 ).., (, ). C setjump/ longj ump....,..
29 42 Chapte r Timer. Timer,. Timer (time slice)... (, ).,.... ( ). 3.1,. NT, (, NT. (fiber). (fiber)., )....
30 43,. NT[ 1.3] 1: NT NT.,,. (, 600 )... [ 1.4].
31 44 Chapte r (lightweight process. LWP)... (pool), CPU.,, CPU. CPU. (, ).,,.. (, ). CPU..
32 ,.. NT ( ), ( )....,..,.?.,..
33 46 Chapte r synchronized. 2..,. yield()sleep () (, )., 100 yield(), (yield(),. sleep (), )..,., synchronized. yield()sleep () I/ O.,.. NTNT7 10., 2 1. NT.
PowerPoint 프레젠테이션
@ Lesson 2... ( ). ( ). @ vs. logic data method variable behavior attribute method field Flow (Type), ( ) member @ () : C program Method A ( ) Method B ( ) Method C () program : Java, C++, C# data @ Program
More information05-class.key
5 : 2 (method) (public) (private) (interface) 5.1 (Method), (public method) (private method) (constructor), 3 4 5.2 (client). (receiver)., System.out.println("Hello"); (client object) (receiver object)
More information02 C h a p t e r Java
02 C h a p t e r Java Bioinformatics in J a va,, 2 1,,,, C++, Python, (Java),,, (http://wwwbiojavaorg),, 13, 3D GUI,,, (Java programming language) (Sun Microsystems) 1995 1990 (green project) TV 22 CHAPTER
More informationMicrosoft PowerPoint - 04-UDP Programming.ppt
Chapter 4. UDP Dongwon Jeong djeong@kunsan.ac.kr http://ist.kunsan.ac.kr/ Dept. of Informatics & Statistics 목차 UDP 1 1 UDP 개념 자바 UDP 프로그램작성 클라이언트와서버모두 DatagramSocket 클래스로생성 상호간통신은 DatagramPacket 클래스를이용하여
More informationrmi_박준용_final.PDF
(RMI) - JSTORM http://wwwjstormpekr (RMI)- Document title: Document file name: Revision number: Issued by: Document Information (RMI)- rmi finaldoc Issue Date: Status:
More information10장.key
JAVA Programming 1 2 (Event Driven Programming)! :,,,! ( )! : (batch programming)!! ( : )!!!! 3 (Mouse Event, Action Event) (Mouse Event, Action Event) (Mouse Event, Container Event) (Key Event) (Key Event,
More information제11장 프로세스와 쓰레드
제9장자바쓰레드 9.1 Thread 기초 (1/5) 프로그램 명령어들의연속 (a sequence of instruction) 프로세스 / Thread 실행중인프로그램 (program in execution) 프로세스생성과실행을위한함수들 자바 Thread 2 9.1 Thread 기초 (2/5) 프로세스단위작업의문제점 프로세스생성시오버헤드 컨텍스트스위치오버헤드
More informationPowerPoint 프레젠테이션
@ Lesson 1,..... @ 1 Green Project 1991 Oak Java 1995. 5 December '90 by Patrick Naughton, Mike Sheridan and James Gosling Embedded in various consumer electronic device 1992. 9. 3 Star 7 1993 www portability
More informationJMF3_심빈구.PDF
JMF JSTORM http://wwwjstormpekr Issued by: < > Revision: Document Information Document title: Document file name: Revision number: Issued by: JMF3_ doc Issue Date:
More informationChap12
12 12Java RMI 121 RMI 2 121 RMI 3 - RMI, CORBA 121 RMI RMI RMI (remote object) 4 - ( ) UnicastRemoteObject, 121 RMI 5 class A - class B - ( ) class A a() class Bb() 121 RMI 6 RMI / 121 RMI RMI 1 2 ( 7)
More information11 템플릿적용 - Java Program Performance Tuning (김명호기술이사)
Java Program Performance Tuning ( ) n (Primes0) static List primes(int n) { List primes = new ArrayList(n); outer: for (int candidate = 2; n > 0; candidate++) { Iterator iter = primes.iterator(); while
More information자바GUI실전프로그래밍2_장대원.PDF
JAVA GUI - 2 JSTORM http://wwwjstormpekr JAVA GUI - 2 Issued by: < > Document Information Document title: JAVA GUI - 2 Document file name: Revision number: Issued by: Issue Date:
More information자바 프로그래밍
5 (kkman@mail.sangji.ac.kr) (Class), (template) (Object) public, final, abstract [modifier] class ClassName { // // (, ) Class Circle { int radius, color ; int x, y ; float getarea() { return 3.14159
More informationch09
9 Chapter CHAPTER GOALS B I G J A V A 436 CHAPTER CONTENTS 9.1 436 Syntax 9.1 441 Syntax 9.2 442 Common Error 9.1 442 9.2 443 Syntax 9.3 445 Advanced Topic 9.1 445 9.3 446 9.4 448 Syntax 9.4 454 Advanced
More informationPowerPoint 프레젠테이션
@ Lesson 4 (Object) (Class) (Instance) (Method) (Constructor) Memory 1 UML 1 @ & 1 (Real World) (Software World) @ &.. () () @ & 2 (Real World) (Software World) OOA/ Modeling Abstraction Instantiation
More information비긴쿡-자바 00앞부속
IT COOKBOOK 14 Java P r e f a c e Stay HungryStay Foolish 3D 15 C 3 16 Stay HungryStay Foolish CEO 2005 L e c t u r e S c h e d u l e 1 14 PPT API C A b o u t T h i s B o o k IT CookBook for Beginner Chapter
More information6주차.key
6, Process concept A program in execution Program code PCB (process control block) Program counter, registers, etc. Stack Heap Data section => global variable Process in memory Process state New Running
More information12-file.key
11 (String).. java.lang.stringbuffer. s String s = "abcd"; s = s + "e"; a b c d e a b c d e ,., "910359,, " "910359" " " " " (token) (token),, (delimiter). java.util.stringtokenizer String s = "910359,,
More informationMicrosoft PowerPoint - 14주차 강의자료
Java 로만드는 Monster 잡기게임예제이해 2014. 12. 2 게임화면및게임방법 기사초기위치 : (0,0) 아이템 10 개랜덤생성 몬스터 10 놈랜덤생성 Frame 하단에기사위치와기사파워출력방향키로기사이동아이템과몬스터는고정종료버튼클릭하면종료 Project 구성 GameMain.java GUI 환경설정, Main Method 게임객체램덤위치에생성 Event
More information쉽게 풀어쓴 C 프로그래밍
Power Java 제 23 장스레드 이번장에서학습할내용 스레드의개요 스레드의생성과실행 스레드상태 스레드의스케줄링 스레드간의조정 스레드는동시에여러개의프로그램을실행하는효과를냅니다. 멀티태스킹 멀티태스킹 (muli-tasking) 는여러개의애플리케이션을동시에실행하여서컴퓨터시스템의성능을높이기위한기법 스레드란? 다중스레딩 (multi-threading) 은하나의프로그램이동시에여러가지작업을할수있도록하는것
More information01-OOPConcepts(2).PDF
Object-Oriented Programming Concepts Tel: 02-824-5768 E-mail: hhcho@selabsoongsilackr? OOP (Object) (Encapsulation) (Message) (Class) (Inheritance) (Polymorphism) (Abstract Class) (Interface) 2 1 + = (Dependency)
More informationOOP 소개
OOP : @madvirus, : madvirus@madvirus.net : @madvirus : madvirus@madvirus.net ) ) ) 7, 3, JSP 2 ? 3 case R.id.txt_all: switch (menu_type) { case GROUP_ALL: showrecommend("month"); case GROUP_MY: type =
More information초보자를 위한 자바 2 21일 완성 - 최신개정판
.,,.,. 7. Sun Microsystems.,,. Sun Bill Joy.. 15... ( ), ( )... 4600. .,,,,,., 5 Java 2 1.4. C++, Perl, Visual Basic, Delphi, Microsoft C#. WebGain Visual Cafe, Borland JBuilder, Sun ONE Studio., Sun Java
More informationInterstage5 SOAP서비스 설정 가이드
Interstage 5 Application Server ( Solaris ) SOAP Service Internet Sample Test SOAP Server Application SOAP Client Application CORBA/SOAP Server Gateway CORBA/SOAP Gateway Client INTERSTAGE SOAP Service
More information9장.key
JAVA Programming 1 GUI(Graphical User Interface) 2 GUI!,! GUI! GUI, GUI GUI! GUI AWT Swing AWT - java.awt Swing - javax.swing AWT Swing 3 AWT(Abstract Windowing Toolkit)! GUI! java.awt! AWT (Heavy weight
More information<4D F736F F F696E74202D20C1A63139C0E520B9E8C4A120B0FCB8AEC0DA28B0ADC0C729205BC8A3C8AF20B8F0B5E55D>
Power Java 제 19 장배치관리자 이번장에서학습할내용 배치관리자의개요 배치관리자의사용 FlowLayout BorderLayout GridLayout BoxLayout CardLayout 절대위치로배치 컨테이너안에서컴포넌트를배치하는방법에대하여살펴봅시다. 배치관리자 (layout manager) 컨테이너안의각컴포넌트의위치와크기를결정하는작업 [3/70] 상당히다르게보인다.
More informationMicrosoft PowerPoint - Java7.pptx
HPC & OT Lab. 1 HPC & OT Lab. 2 실습 7 주차 Jin-Ho, Jang M.S. Hanyang Univ. HPC&OT Lab. jinhoyo@nate.com HPC & OT Lab. 3 Component Structure 객체 (object) 생성개념을이해한다. 외부클래스에대한접근방법을이해한다. 접근제어자 (public & private)
More information신림프로그래머_클린코드.key
CLEAN CODE 6 11st Front Dev. Team 6 1. 2. 3. checked exception 4. 5. 6. 11 : 2 4 : java (50%), javascript (35%), SQL/PL-SQL (15%) : Spring, ibatis, Oracle, jquery ? , (, ) ( ) 클린코드를 무시한다면 . 6 1. ,,,!
More informationuntitled
Memory leak Resource 力 金 3-tier 見 Out of Memory( 不 ) Memory leak( 漏 ) 狀 Application Server Crash 理 Server 狀 Crash 類 JVM 說 例 行說 說 Memory leak Resource Out of Memory Memory leak Out of Memory 不論 Java heap
More information5장.key
JAVA Programming 1 (inheritance) 2!,!! 4 3 4!!!! 5 public class Person {... public class Student extends Person { // Person Student... public class StudentWorker extends Student { // Student StudentWorker...!
More information09-interface.key
9 Database insert(record r): boolean find(key k): Record 1 Record getkey(): Key * Record Key Database.? Key equals(key y): boolean Database insert(record r): boolean find(key k): Record * Database OK 1
More information11장.key
JAVA Programming 1 GUI 2 2 1. GUI! GUI! GUI.! GUI! GUI 2. GUI!,,,!! GUI! GUI 11 : GUI 12 : GUI 3 4, JComponent 11-1 :, JComponent 5 import java.awt.*; import java.awt.event.*; import javax.swing.*; public
More information제8장 자바 GUI 프로그래밍 II
제8장 MVC Model 8.1 MVC 모델 (1/7) MVC (Model, View, Controller) 모델 스윙은 MVC 모델에기초를두고있다. MVC란 Xerox의연구소에서 Smalltalk 언어를바탕으로사용자인터페이스를개발하기위한방법 MVC는 3개의구성요소로구성 Model : 응용프로그램의자료를표현하기위한모델 View : 자료를시각적으로 (GUI 방식으로
More informationPowerPoint Presentation
Package Class 1 Heeseung Jo 목차 section 1 패키지개요와패키지의사용 section 2 java.lang 패키지의개요 section 3 Object 클래스 section 4 포장 (Wrapper) 클래스 section 5 문자열의개요 section 6 String 클래스 section 7 StringBuffer 클래스 section
More information초보자를 위한 C# 21일 완성
C# 21., 21 C#., 2 ~ 3 21. 2 ~ 3 21.,. 1~ 2 (, ), C#.,,.,., 21..,.,,, 3. A..,,.,.. Q&A.. 24 C#,.NET.,.,.,. Visual C# Visual Studio.NET,..,. CD., www. TeachYour sel f CSharp. com., ( )., C#.. C# 1, 1. WEEK
More informationuntitled
- -, (insert) (delete) - - (insert) (delete) (top ) - - (insert) (rear) (delete) (front) A A B top A B C top push(a) push(b) push(c) A B top pop() top A B D push(d) top #define MAX_STACK_SIZE 100 int
More information03-JAVA Syntax(2).PDF
JAVA Programming Language Syntax of JAVA (literal) (Variable and data types) (Comments) (Arithmetic) (Comparisons) (Operators) 2 HelloWorld application Helloworldjava // class HelloWorld { //attribute
More informationPowerPoint Presentation
객체지향프로그래밍 그래픽사용자인터페이스 ( 실습 ) 손시운 ssw5176@kangwon.ac.kr 예제 1. 프레임생성 (1) import javax.swing.*; public class FrameTest { public static void main(string[] args) { JFrame f = new JFrame("Frame Test"); JFrame
More informationJava ~ Java program: main() class class» public static void main(string args[])» First.java (main class ) /* The first simple program */ public class
Linux JAVA 1. http://java.sun.com/j2se/1.4.2/download.html J2SE 1.4.2 SDK 2. Linux RPM ( 9 ) 3. sh j2sdk-1_4_2_07-linux-i586-rpm.bin 4. rpm Uvh j2sdk-1_4_2_07-linux-i586-rpm 5. PATH JAVA 1. vi.bash_profile
More informationPowerPoint Presentation
public class SumTest { public static void main(string a1[]) { int a, b, sum; a = Integer.parseInt(a1[0]); b = Integer.parseInt(a1[1]); sum = a + b ; // 두수를더하는부분입니다 System.out.println(" 두수의합은 " + sum +
More informationChap7.PDF
Chapter 7 The SUN Intranet Data Warehouse: Architecture and Tools All rights reserved 1 Intranet Data Warehouse : Distributed Networking Computing Peer-to-peer Peer-to-peer:,. C/S Microsoft ActiveX DCOM(Distributed
More information1
1 1....6 1.1...6 2. Java Architecture...7 2.1 2SDK(Software Development Kit)...8 2.2 JRE(Java Runtime Environment)...9 2.3 (Java Virtual Machine, JVM)...10 2.4 JVM...11 2.5 (runtime)jvm...12 2.5.1 2.5.2
More informationmytalk
한국정보보호학회소프트웨어보안연구회 총괄책임자 취약점분석팀 안준선 ( 항공대 ) 도경구 ( 한양대 ) 도구개발팀도경구 ( 한양대 ) 시큐어코딩팀 오세만 ( 동국대 ) 전체적인 그림 IL Rules Flowgraph Generator Flowgraph Analyzer 흐름그래프 생성기 흐름그래프 분석기 O parser 중간언어 O 파서 RDL
More information자바-11장N'1-502
C h a p t e r 11 java.net.,,., (TCP/IP) (UDP/IP).,. 1 ISO OSI 7 1977 (ISO, International Standards Organization) (OSI, Open Systems Interconnection). 6 1983 X.200. OSI 7 [ 11-1] 7. 1 (Physical Layer),
More informationAnalytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Cras
Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Crash Unity SDK... Log & Crash Search. - Unity3D v4.0 ios
More informationPowerPoint Presentation
객체지향프로그래밍 인터페이스, 람다식, 패키지 ( 실습 ) 손시운 ssw5176@kangwon.ac.kr 예제 1. 홈네트워킹 public interface RemoteControl { public void turnon(); // 가전제품을켠다. public void turnoff(); // 가전제품을끈다. 인터페이스를구현 public class Television
More informationgnu-lee-oop-kor-lec10-1-chap10
어서와 Java 는처음이지! 제 10 장이벤트처리 이벤트분류 액션이벤트 키이벤트 마우스이동이벤트 어댑터클래스 스윙컴포넌트에의하여지원되는이벤트는크게두가지의카테고리로나누어진다. 사용자가버튼을클릭하는경우 사용자가메뉴항목을선택하는경우 사용자가텍스트필드에서엔터키를누르는경우 두개의버튼을만들어서패널의배경색을변경하는프로그램을작성하여보자. 이벤트리스너는하나만생성한다. class
More information소프트웨어 개발의 성공 열쇠 - 오브젝트 디자인
.,,.,,.,...,...,,.!,!.,,......,.. 18..,....,.....,,......,,.?. 6 (1, 2, 3, 4, 5, 6 ).. 1,,.,. 2,. 3, 19. 4,,. 5,. 6,,. 7 10.. 7,. 8,,,. 9,,. 10, 3 (, ),...,,.,. Instantiations Digitalk...,. Smalltalk,
More information07 자바의 다양한 클래스.key
[ 07 ] . java.lang Object, Math, String, StringBuffer Byte, Short, Integer, Long, Float, Double, Boolean, Character. java.util Random, StringTokenizer Calendar, GregorianCalendar, Date. Collection, List,
More informationfundamentalOfCommandPattern_calmglow_pattern_jstorm_1.0_f…
Command JSTORM http://www.jstorm.pe.kr Command Issued by: < > Revision: Document Information Document title: Command Document file name: Revision number: Issued by: Issue
More information<4D F736F F F696E74202D20C1A63233C0E520B1D7B7A1C7C820C7C1B7CEB1D7B7A1B9D628B0ADC0C729205BC8A3C8AF20B8F0B5E55D>
Power Java 제 23 장그래픽프로그래밍 이번장에서학습할내용 자바에서의그래픽 기초사항 기초도형그리기 색상 폰트 Java 2D Java 2D를이용한그리기 Java 2D 를이용한채우기 도형회전과평행이동 자바를이용하여서화면에그림을그려봅시다. 자바그래픽데모 자바그래픽의두가지방법 자바그래픽 AWT Java 2D AWT를사용하면기본적인도형들을쉽게그릴수있다. 어디서나잘실행된다.
More informationMicrosoft PowerPoint - RMI.ppt
( 분산통신실습 ) RMI RMI 익히기 1. 분산환경에서동작하는 message-passing을이용한 boundedbuffer 해법프로그램을실행해보세요. 소스코드 : ftp://211.119.245.153 -> os -> OSJavaSources -> ch15 -> rmi http://marvel el.incheon.ac.kr의 Information Unix
More informationPowerPoint 프레젠테이션
@ Lesson 3 if, if else, if else if, switch case for, while, do while break, continue : System.in, args, JOptionPane for (,, ) @ vs. logic data method variable Data Data Flow (Type), ( ) @ Member field
More informationJava Programing Environment
Lab Exercise #7 Swing Component 프로그래밍 2007 봄학기 고급프로그래밍 김영국충남대전기정보통신공학부 실습내용 실습과제 7-1 : 정규표현식을이용한사용자정보의유효성검사 (ATM 에서사용자등록용도로사용가능 ) 실습과제 7-2 : 숫자맞추기게임 실습과제 7-3 : 은행관리프로그램 고급프로그래밍 Swing Component 프로그래밍 2
More informationMicrosoft PowerPoint - java2-lecture6.ppt [호환 모드]
Multi-tasking vs Thread Thread & Multitasking 멀티태스킹 (Multi-tasking) 하나의응용프로그램이여러개의작업 ( 태스크 ) 을동시에처리 스레드 (Thread) 마치바늘이하나의실 (thread) 을가지고바느질하는것과자바의스레드는일맥상통함 514770 2018 년가을학기 11/19/2018 박경신 다림질하면서이어폰으로전화하는주부운전하면서화장하는운전자제품의판독과포장작업의두기능을갖춘기계
More information(Microsoft PowerPoint - java2-lecture6.ppt [\310\243\310\257 \270\360\265\345])
멀티태스킹과스레드개념 Thread & Multitasking 멀티태스킹 (Multi-tasking) 하나의응용프로그램이여러개의작업 ( 태스크 ) 을동시에처리 스레드 (Thread) 마치바늘이하나의실 (thread) 을가지고바느질하는것과자바의스레드는일맥상통함 514770-1 2017 년봄학기 5/10/2017 박경신 다림질하면서이어폰으로전화하는주부운전하면서화장하는운전자제품의판독과포장작업의두기능을갖춘기계
More informationSpring Data JPA Many To Many 양방향 관계 예제
Spring Data JPA Many To Many 양방향관계예제 오라클자바커뮤니티 (ojc.asia, ojcedu.com) 엔티티매핑 (Entity Mapping) M : N 연관관계 사원 (Sawon), 취미 (Hobby) 는다 : 다관계이다. 사원은여러취미를가질수있고, 하나의취미역시여러사원에할당될수있기때문이다. 보통관계형 DB 에서는다 : 다관계는 1
More information@OneToOne(cascade = = "addr_id") private Addr addr; public Emp(String ename, Addr addr) { this.ename = ename; this.a
1 대 1 단방향, 주테이블에외래키실습 http://ojcedu.com, http://ojc.asia STS -> Spring Stater Project name : onetoone-1 SQL : JPA, MySQL 선택 http://ojc.asia/bbs/board.php?bo_table=lecspring&wr_id=524 ( 마리아 DB 설치는위 URL
More information<4D F736F F F696E74202D20C1A63138C0E520C0CCBAA5C6AE20C3B3B8AE28B0ADC0C729205BC8A3C8AF20B8F0B5E55D>
Power Java 제 18 장이벤트처리 이번장에서학습할내용 이벤트처리의개요 이벤트 액션이벤트 Key, Mouse, MouseMotion 어댑터클래스 버튼을누르면반응하도록만들어봅시다. 이번장의목표 버튼을누르면버튼의텍스트가변경되게한다. 이벤트처리과정 이벤트처리과정 (1) 이벤트를발생하는컴포넌트를생성하여야한다. 이벤트처리과정 (2) 이벤트리스너클래스를작성한다.
More information강의자료
Copyright, 2014 MMLab, Dept. of ECE, UOS Java Swing 2014 년 3 월 최성종서울시립대학교전자전기컴퓨터공학부 chois@uos.ac.kr http://www.mmlab.net 차례 2014년 3월 Java Swing 2 2017-06-02 Seong Jong Choi Java Basic Concepts-3 Graphical
More information10주차.key
10, Process synchronization (concurrently) ( ) => critical section ( ) / =>, A, B / Race condition int counter; Process A { counter++; } Process B { counter ;.. } counter++ register1 = counter register1
More information( )부록
A ppendix 1 2010 5 21 SDK 2.2. 2.1 SDK. DevGuide SDK. 2.2 Frozen Yoghurt Froyo. Donut, Cupcake, Eclair 1. Froyo (Ginger Bread) 2010. Froyo Eclair 0.1.. 2.2. UI,... 2.2. PC 850 CPU Froyo......... 2. 2.1.
More informationNetwork Programming
Part 5 확장된 Network Programming 기술 1. Remote Procedure Call 2. Remote Method Invocation 3. Object Request Broker 2. Java RMI
More informationilist.add(new Integer(1))과 같이 사용하지 않고 ilist.add(1)과 같이 사용한 것은 자바 5.0에 추가된 기본 자료형과 해당 객체 자료 형과의 오토박싱/언박싱 기능을 사용한 것으로 오토박싱이란 자바 컴파일러가 객체를 요구하는 곳에 기본 자료형
바에 제네릭스(generics)를 도입하기 위한 연구는 이미 8년 전인 1996년부터라고 한다. 실제로 자바에 제네릭스를 도입하 는 몇 가지 방안들이 논문으로 나오기 시작한 것이 1998년 초임을 감 안하면 무려 8년이 지난 후에야 자바 5.0에 전격 채택되었다는 것은 이것이 얼마나 어려운 일이었나 하는 것을 보여준다. 자바의 스펙을 결정하는 표준화 절차인
More information초보자를 위한 C++
C++. 24,,,,, C++ C++.,..,., ( ). /. ( 4 ) ( ).. C++., C++ C++. C++., 24 C++. C? C++ C C, C++ (Stroustrup) C++, C C++. C. C 24.,. C. C+ +?. X C++.. COBOL COBOL COBOL., C++. Java C# C++, C++. C++. Java C#
More informationMicrosoft PowerPoint - lec12 [호환 모드]
스레드란? 스레드의상태 스레드스케줄링 동기화 스레드그룹 kkman@sangji.ac.kr 2 시작, 실행, 종료의순서를가지는제어흐름단위 단일스레딩시스템 : 오직하나의실행점 멀티스레딩시스템 : 다중의실행점 kkman@sangji.ac.kr 3 Concurrent Programming Multiprogramming System Multiprocessing System
More information<4D F736F F F696E74202D20C1A63236C0E520BED6C7C3B8B428B0ADC0C729205BC8A3C8AF20B8F0B5E55D>
Power Java 제 26 장애플릿 이번장에서학습할내용 애플릿소개 애플릿작성및소개 애플릿의생명주기 애플릿에서의그래픽컴포넌트의소개 Applet API의이용 웹브라우저상에서실행되는작은프로그램인애플릿에대하여학습합니다. 애플릿이란? 애플릿은웹페이지같은 HTML 문서안에내장되어실행되는자바프로그램이다. 애플릿을실행시키는두가지방법 1. 웹브라우저를이용하는방법 2. Appletviewer를이용하는방법
More informationDesign Issues
11 COMPUTER PROGRAMMING INHERIATANCE CONTENTS OVERVIEW OF INHERITANCE INHERITANCE OF MEMBER VARIABLE RESERVED WORD SUPER METHOD INHERITANCE and OVERRIDING INHERITANCE and CONSTRUCTOR 2 Overview of Inheritance
More informationI T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r
I T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r I T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r Jakarta is a Project of the Apache
More informationPowerPoint Presentation
객체지향프로그래밍 클래스, 객체, 메소드 ( 실습 ) 손시운 ssw5176@kangwon.ac.kr 예제 1. 필드만있는클래스 텔레비젼 2 예제 1. 필드만있는클래스 3 예제 2. 여러개의객체생성하기 4 5 예제 3. 메소드가추가된클래스 public class Television { int channel; // 채널번호 int volume; // 볼륨 boolean
More informationSpring Boot/JDBC JdbcTemplate/CRUD 예제
Spring Boot/JDBC JdbcTemplate/CRUD 예제 오라클자바커뮤니티 (ojc.asia, ojcedu.com) Spring Boot, Gradle 과오픈소스인 MariaDB 를이용해서 EMP 테이블을만들고 JdbcTemplate, SimpleJdbcTemplate 을이용하여 CRUD 기능을구현해보자. 마리아 DB 설치는다음 URL 에서확인하자.
More information스레드를적용하지않은결과와스레드를적용한결과의비교 1) 두개의작업을스레드를사용하지않고수행한예 ) : 순차작업 class ThreadTest2 { System.out.print("-");// 화면에 - 를출력하는작업 System.out.print(" ");// 화면에 를출력
실 (thread) 을이용한병렬처리 스레드 (thread) 는실을의미한다. 즉, 실하나에여러작업들이꿰어져서순서적으로처리된다. 그런데, 실을여러개 만들고이실에여러작업들을꿰어서이실들을순서적으로처리하게하면, 여러개의작업들이한꺼번에처리된다. 즉, 일정한단위시간당처리되는작업의수를증가시킬수있다. 스레드생성방법에대한예제 ) class ThreadTest1 { ThreadClass1
More informationJava
Java http://cafedaumnet/pway Chapter 1 1 public static String format4(int targetnum){ String strnum = new String(IntegertoString(targetNum)); StringBuffer resultstr = new StringBuffer(); for(int i = strnumlength();
More information* Factory class for query and DML clause creation * tiwe * */ public class JPAQueryFactory implements JPQLQueryFactory private f
JPA 에서 QueryDSL 사용하기위해 JPAQuery 인스턴스생성방법 http://ojc.asia, http://ojcedu.com 1. JPAQuery 를직접생성하기 JPAQuery 인스턴스생성하기 QueryDSL의 JPAQuery API를사용하려면 JPAQuery 인스턴스를생성하면된다. // entitymanager는 JPA의 EntityManage
More informationMobile Service > IAP > Android SDK [ ] IAP SDK TOAST SDK. IAP SDK. Android Studio IDE Android SDK Version (API Level 10). Name Reference V
Mobile Service > IAP > Android SDK IAP SDK TOAST SDK. IAP SDK. Android Studio IDE 2.3.3 Android SDK Version 2.3.3 (API Level 10). Name Reference Version License okhttp http://square.github.io/okhttp/ 1.5.4
More informationSomething that can be seen, touched or otherwise sensed
Something that can be seen, touched or otherwise sensed Things about an object Weight Height Material Things an object does Pen writes Book stores words Water have Fresh water Rivers Oceans have
More information14-Servlet
JAVA Programming Language Servlet (GenericServlet) HTTP (HttpServlet) 2 (1)? CGI 3 (2) http://jakarta.apache.org JSDK(Java Servlet Development Kit) 4 (3) CGI CGI(Common Gateway Interface) /,,, Client Server
More informationConnection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET
135-080 679-4 13 02-3430-1200 1 2 11 2 12 2 2 8 21 Connection 8 22 UniSQLConnection 8 23 8 24 / / 9 3 UniSQL 11 31 OID 11 311 11 312 14 313 16 314 17 32 SET 19 321 20 322 23 323 24 33 GLO 26 331 GLO 26
More informationMasoJava4_Dongbin.PDF
JSTORM http://wwwjstormpekr Issued by: < > Revision: Document Information Document title: Document file name: MasoJava4_Dongbindoc Revision number: Issued by: < > SI, dbin@handysoftcokr
More informationMicrosoft PowerPoint - EEL2 Lecture10 -Swing and Event Handling.pptx
전자공학실험 2 1 WEEK10: SWING AND EVENT HANDLING Fall, 2014 건국대전자공학부 Notice: 주별강의 / 실습 /HW 내용 2 Week Date 강의주제 Homework 실습과제 Handouts 1 09월 03일 Orientation Lab1 Lecture0 2 09월 10일 추석 3 09월 17일 Using Objects
More informationESP1ºÎ-04
Chapter 04 4.1..,..,.,.,.,. RTOS(Real-Time Operating System)., RTOS.. VxWorks(www.windriver.com), psos(www.windriver.com), VRTX(www.mento. com), QNX(www.qnx.com), OSE(www.ose.com), Nucleus(www.atinudclus.
More information교육2 ? 그림
Interstage 5 Apworks EJB Application Internet Revision History Edition Date Author Reviewed by Remarks 1 2002/10/11 2 2003/05/19 3 2003/06/18 EJB 4 2003/09/25 Apworks5.1 [ Stateless Session Bean ] ApworksJava,
More informationJAVA PROGRAMMING 실습 08.다형성
2015 학년도 2 학기 1. 추상메소드 선언은되어있으나코드구현되어있지않은메소드 abstract 키워드사용 메소드타입, 이름, 매개변수리스트만선언 public abstract String getname(); public abstract void setname(string s); 2. 추상클래스 abstract 키워드로선언한클래스 종류 추상메소드를포함하는클래스
More information스레드의우선순위 우선순위설정메소드 : void setpriority(int newpriority) newpriority 에설정할수있는등급 : 1( 가장낮은우선순위 ) 부터 10( 가장높은우선순위 ) 가장높은우선순위 : MAX_PRIORITY, 보통우선순위 : NORM_
10 초동안사용자가입력하지않으면종료하는예제 ) import javax.swing.joptionpane; class AutoTermination { static boolean inputcheck = false; public static void main(string[] args) throws Exception { FirstThread th1 = new FirstThread();
More informationMicrosoft PowerPoint - 2강
컴퓨터과학과 김희천교수 학습개요 Java 언어문법의기본사항, 자료형, 변수와상수선언및사용법, 각종연산자사용법, if/switch 등과같은제어문사용법등에대해설명한다. 또한 C++ 언어와선언 / 사용방법이다른 Java의배열선언및사용법에대해서설명한다. Java 언어의효과적인활용을위해서는기본문법을이해하는것이중요하다. 객체지향의기본개념에대해알아보고 Java에서어떻게객체지향적요소를적용하고있는지살펴본다.
More informationPowerPoint 프레젠테이션
명품 JAVA Essential 1 2 학습목표 1. 멀티태스킹과스레드의개념이해 2. Thread 클래스를상속받아자바스레드만들기 3. Runnable 인터페이스를구현하여자바스레드만들기 4. 스레드종료시키기 5. 스레드의동기화개념과필요성이해 6. synchronized로간단한스레드동기화 7. wait()-notify() 로간단한스레드동기화 멀티태스킹 (multi-tasking)
More information쉽게 풀어쓴 C 프로그래밍
Power Java 제 11 장상속 이번장에서학습할내용 상속이란? 상속의사용 메소드재정의 접근지정자 상속과생성자 Object 클래스 종단클래스 상속을코드를재사용하기위한중요한기법입니다. 상속이란? 상속의개념은현실세계에도존재한다. 상속의장점 상속의장점 상속을통하여기존클래스의필드와메소드를재사용 기존클래스의일부변경도가능 상속을이용하게되면복잡한 GUI 프로그램을순식간에작성
More information교육자료
THE SYS4U DODUMENT Java Reflection & Introspection 2012.08.21 김진아사원 2012 SYS4U I&C All rights reserved. 목차 I. 개념 1. Reflection 이란? 2. Introspection 이란? 3. Reflection 과 Introspection 의차이점 II. 실제사용예 1. Instance의생성
More informationNo Slide Title
J2EE J2EE(Java 2 Enterprise Edition) (Web Services) :,, SOAP: Simple Object Access Protocol WSDL: Web Service Description Language UDDI: Universal Discovery, Description & Integration 4. (XML Protocol
More informationuntitled
Embedded System Lab. II Embedded System Lab. II 2 RTOS Hard Real-Time vs Soft Real-Time RTOS Real-Time, Real-Time RTOS General purpose system OS H/W RTOS H/W task Hard Real-Time Real-Time System, Hard
More information03장
CHAPTER3 ( ) Gallery 67 68 CHAPTER 3 Intent ACTION_PICK URI android provier MediaStore Images Media EXTERNAL_CONTENT_URI URI SD MediaStore Intent choosepictureintent = new Intent(Intent.ACTION_PICK, ë
More information105È£4fš
의 자선단체들이 사랑과 자비를 베푼 덕택에 국제 사회에서 훠모사가 존경받는 위치에 섰으며 국가간 에 상호우애를 다지는 데 큰 기여를 했다고 치하했 다. 칭하이 무상사 국제협회는 구호물자를 터키 지 터키 지진 피해자들을 위한 구호물자 전달식 진 피해자들에게 전달하는데 협조해 준 중국 항공의 훠모사 항공화물 센터 매니저인 제임스 류 씨, 골든 파운데이션 여행사의
More information[ 정보 ] 과학고 R&E 결과보고서 Monte Carlo Method 를이용한 고교배정시뮬레이션 연구기간 : ~ 연구책임자 : 강대욱 ( 전남대전자컴퓨터공학부 ) 지도교사 : 최미경 ( 전남과학고정보 컴퓨터과 ) 참여학생 : 박진명 ( 전
[ 정보 ] 과학고 R&E 결과보고서 Monte Carlo Method 를이용한 고교배정시뮬레이션 연구기간 : 2013. 3 ~ 2014. 2 연구책임자 : 강대욱 ( 전남대전자컴퓨터공학부 ) 지도교사 : 최미경 ( 전남과학고정보 컴퓨터과 ) 참여학생 : 박진명 ( 전남과학고 1학년 ) 박수형 ( 전남과학고 1학년 ) 서범수 ( 전남과학고 1학년 ) 김효정
More information<4D F736F F F696E74202D20C1A63230C0E520BDBAC0AE20C4C4C6F7B3CDC6AE203128B0ADC0C729205BC8A3C8AF20B8F0B5E55D>
Power Java 제 20 장스윙컴포넌트 1 이번장에서학습할내용 텍스트컴포넌트 텍스트필드 텍스트영역 스크롤페인 체크박스 라디오버튼 스윙에서제공하는기초적인컴포넌트들을살펴봅시다. 스윙텍스트컴포넌트들 종류텍스트컴포넌트그림 텍스트필드 JTextField JPasswordField JFormattedTextField 일반텍스트영역 JTextArea 스타일텍스트영역
More information歯2000-09-Final.PDF
Design Pattern - API JSTORM http://www.jstorm.pe.kr -1- java API 2000-08-14 Public 2000-08-16 Draft (dbin@handysoft.co.kr), (pam@emotion.co.kr) HISTORY (csecau@orgio.net) 2001/2/15 9 10 jstorm
More informationFileMaker ODBC and JDBC Guide
FileMaker 14 5 5 5 5 6 6 6 7 7 7 8 8 8 9 9 10 10 11 11 12 12 12 12 12 13 13 14 15 16 17 18 18 19 19 20 20 20 21 21 21 22 22 22 22 23 24 24 24 24 25 27 27 28 29 29 29 29 30 30 31 31 31 32 1 1 1 1 1 1 1
More informationSRC PLUS 제어기 MANUAL
,,,, DE FIN E I N T R E A L L O C E N D SU B E N D S U B M O TIO
More informationSena Technologies, Inc. HelloDevice Super 1.1.0
HelloDevice Super 110 Copyright 1998-2005, All rights reserved HelloDevice 210 ()137-130 Tel: (02) 573-5422 Fax: (02) 573-7710 E-Mail: support@senacom Website: http://wwwsenacom Revision history Revision
More information