lecture-36b - Object Oriented Programming Java -...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Object Oriented Object Oriented Programming Programming Java Java - - Multithreaded Multithreaded Programming Programming
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
OOP Java - Multithreaded Programming R.B. Lenin Winter - 2006 DA-IICT 2 Introduction Introduction Java provides built-in support for multithreaded programming. A multithreaded program contains two or more parts that can run concurrently. Each part of such a program is called a thread. Each thread defines a separate path of execution.
Background image of page 2
OOP Java - Multithreaded Programming R.B. Lenin Winter - 2006 DA-IICT 3 Types of Multitasking Types of Multitasking • Process-based –A process is a program that is executing –process-based multitasking is the feature that allows your computer to run two or more programs concurrently • Example: compiling your source code while searching for a document in the hard disk –program is the smallest unit of code that can be dispatched by the scheduler
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
OOP Java - Multithreaded Programming R.B. Lenin Winter - 2006 DA-IICT 4 Types of Multitasking Types of Multitasking • Thread-based – the thread is the smallest unit of dispatchable code – that is, a single program can perform two or more tasks simultaneously • Process-based multitasking deals with scheduling many programs and thread- based multitasking handles the details of a single program
Background image of page 4
Java - Multithreaded Programming R.B. Lenin Winter - 2006 DA-IICT 5 Multithreading Programming Multithreading Programming • Multithreading enables us to write very efficient programs that make maximum use of the CPU. • The Java run-time system depends on threads for many things and all the class libraries are designed with multithreading. • Java uses threads to enable the entire
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 18

lecture-36b - Object Oriented Programming Java -...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online