Your SlideShare is downloading. ×
Multithreading
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Multithreading

298
views

Published on

Multithreading slides.

Multithreading slides.

Published in: Education

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
298
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
20
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. MULTITHREADINGPRESENTED BYWAFA QAISER KHAN
  • 2. DIFFERENCE BETWEEN TASK AND THREAD
  • 3. •Most computers can only execute oneprogram instruction at a time, butbecause they operate so fast, theyappear to run many programs andserve many users simultaneously.•The computer operating system giveseach program a "turn" atrunning, then requires it to wait whileanother program gets a turn. Each ofthese programs is viewed by theoperating system as a task for whichcertain resources are identified andkept track of.
  • 4. The operating system manages eachapplication program in your PC system(spreadsheet, word processor, Webbrowser) as a separate task.If the program initiates an I/Orequest, such as reading a file or writingto a printer, it creates a thread.
  • 5. In a two state process model from timeto time the currently running processwill be interrupted and the dispatcherportion of the OS will select some otherprocess to run.The unit of dispatching is usuallyreferred to as a thread or lightweightprocess.
  • 6. MULTITHREADING
  • 7. Multithreading refers to the ability of anOS to support multiple, concurrent paths ofexecution within a single process.
  • 8. SINGLE THREADED APPROACHES•MS-DOS supports a single user processand a single thread.•Some UNIX, support multiple userprocesses but only support one threadper process.
  • 9. MULTITHREADED APPROACHES•Java run-time environment is a single processwith multiple threads•Multiple processes and threads are found inWindows, Solaris, and many modern versions ofUNIX
  • 10. SINGLE THREADED ANDMULTITHREADED PROCESS MODELS
  • 11. BENEFITS OF THREADS• It takes far less time to create a new thread than to create a brand-new process.• It takes less time to terminate a thread than a process• It takes less time to switch between two threads within the same process than to switch between processes.• Threads enhances efficiency in communication between different executing programs.
  • 12. MULTITHREADING ON A UNIPROCESSOR
  • 13. CONCLUSION•Threads are mini processes or lightweightprocesses.• They reside in the same address space andhave access to the same data.•It enhances efficiency.
  • 14. THANKYOU