SlideShare a Scribd company logo
1 of 22
Download to read offline
Parallel and distributed
computing
MULTITHREADING, MULTITASKING, MULTIPROCESSING
PROCESS AND THREAD
Process: a program in execution is called process.
Thread: is the segment of process means a process can
have multiple threads and these threads are contained
within a process.
User level vs kernel level thread
User level thread: executes in user space code and can
call kernel space. If user thread need some thing, it will
call into kernel
Kernel level thread: executes only kernel code and isn’t
associated with a user space process.
PROCESS VS THREAD
• Process is program under
execution
• Heave weight
• More time required for
context switching
• Need more resources
• More time for creation
• More time for termination
• Thread is a segment of
process
• Light weight
• Less time required for context
switching
• Need less resources
• Less time for creation
• Less time for termination
PROCESS VS THREAD
• Process doesn’t share data
with each other
• System call is involved
• Process is isolated
• Process has its own PCB, Stack
and address space
• Threads share data with each
other.
• No system call is involved
• Threads share memory.
• Threads has its own TCB, Stack
and Address space.
Process and Thread, EXAMPLE
In a word processor, a thread may check spelling and
grammar while another process user input while yet another
third thread loads images from the hard drive and fourth
does periodic automatic backups of the file being edited.
Multitasking vs multithreading
Multitasking allow to run more process concurrently
While, multithreading allows single process to perform
multiple tasks in a single process
Both were introduced to improve performance and
responsiveness of computing system.
MULTITHREADED PROGRAMMING
Concurrent execution of threads, these threads could run on
single processor.
Is the ability of single CPU to provide multiple threads of
execution concurrently, supported by operating system
Its aims to increase utilization of single core by using thread
level parallelism.
It allows multiple request to be satisfied simultaneously with
having to service requests sequentially.
MULTITHREADED PROGRAMMING - ADVANTAGES
Responsiveness: if one thread complete its execution, then
its output can be immediately returned.
Faster context switching: context switch time is lower,
process context switching requires more overhead from the
CPU.
Effective utilization of multiprocessor: Use of multiple
threads in a single process make process execution faster.
Similarly multiple threads can scheduled on multi processors
MULTITHREADED PROGRAMMING - advantages
Resource Sharing: resources like code, date, files can be
shared among all threads within process. Stack and registers
can’t be shared among threads
Communication: communication between multiple thread is
faster.
Increase throughput of the system: each thread’s function is
considered as one job. Then number of jobs completed per
unit time is increased.
Scaler processors
• a processors that process only one data item at a
time i.e. SISD Processor
• While, Vector processor is a single instruction
operates simultaneously on multiple items i.e. SIMD
Super scaler processors
Executes more than one instruction during a clock
cycle by simultaneously, dispatching multiple
instructions on different functional units on the
processors.
Remember, Processors is single but one CPU has
different functional units. Such as ALU, Bit shifter
or a multiplier
Super scaler processors
It therefore allows more throughput, i.e. the
number of instructions can be executed per unit
time
Intel hyper threading
Uses processor resources more efficiently,
enabling multiple threads to run on each core.
which increases processor throughput, improving
overall performance
Latest (HTT) HT Technology are
•Intel® Core™ Processor Family
•Intel® Core™ vPro ™ Processor Family
•Intel® Core™ M Processor Family
•Intel® Xeon R Processor Family
Intel hyper threading
Main function of hyper-threading is to
increase the number of independent
instructions in the pipeline,
It takes advantages of superscalar architecture
in which multiple instructions operate on
separate data in parallel
HTT: ADVANTAGES /DISADVANTAGES
Advantages:
•make the best use of each CPU Core.
•Allow running more background data without
interruption
•Multithreading enables design and development of
smaller chips by eliminating the need for more cores
HTT: ADVANTAGES /DISADVANTAGES
Disadvantages:
Technically, doesn’t double the performance but
maximize its performance.
Some software doesn’t support multithreading, so
software implementation is required.
Generate more heat, to avoid performance
degradation and overheating, cooling system must be
implemented

More Related Content

Similar to Parallel and Distributed Computing chapter 3

Similar to Parallel and Distributed Computing chapter 3 (20)

Threads
ThreadsThreads
Threads
 
Hardware Multithreading.pdf
Hardware Multithreading.pdfHardware Multithreading.pdf
Hardware Multithreading.pdf
 
Java Thread & Multithreading
Java Thread & MultithreadingJava Thread & Multithreading
Java Thread & Multithreading
 
Multithreaded Programming Part- I.pdf
Multithreaded Programming Part- I.pdfMultithreaded Programming Part- I.pdf
Multithreaded Programming Part- I.pdf
 
Computer architecture multi core processor
Computer architecture multi core processorComputer architecture multi core processor
Computer architecture multi core processor
 
Topic 4- processes.pptx
Topic 4- processes.pptxTopic 4- processes.pptx
Topic 4- processes.pptx
 
Threads.ppt
Threads.pptThreads.ppt
Threads.ppt
 
OS Module-2.pptx
OS Module-2.pptxOS Module-2.pptx
OS Module-2.pptx
 
Chapter -2 operating system presentation
Chapter -2 operating system presentationChapter -2 operating system presentation
Chapter -2 operating system presentation
 
unit 4.pptx
unit 4.pptxunit 4.pptx
unit 4.pptx
 
unit 4.pptx
unit 4.pptxunit 4.pptx
unit 4.pptx
 
Modern processor art
Modern processor artModern processor art
Modern processor art
 
processor struct
processor structprocessor struct
processor struct
 
Chapter 3 chapter reading task
Chapter 3 chapter reading taskChapter 3 chapter reading task
Chapter 3 chapter reading task
 
Modern processor art
Modern processor artModern processor art
Modern processor art
 
Danish presentation
Danish presentationDanish presentation
Danish presentation
 
Parallel processing
Parallel processingParallel processing
Parallel processing
 
Os Threads
Os ThreadsOs Threads
Os Threads
 
Thread
ThreadThread
Thread
 
Lecture 3- Threads.pdf
Lecture 3- Threads.pdfLecture 3- Threads.pdf
Lecture 3- Threads.pdf
 

More from AbdullahMunir32

Mobile Application Development-Lecture 15 & 16.pdf
Mobile Application Development-Lecture 15 & 16.pdfMobile Application Development-Lecture 15 & 16.pdf
Mobile Application Development-Lecture 15 & 16.pdfAbdullahMunir32
 
Mobile Application Development-Lecture 13 & 14.pdf
Mobile Application Development-Lecture 13 & 14.pdfMobile Application Development-Lecture 13 & 14.pdf
Mobile Application Development-Lecture 13 & 14.pdfAbdullahMunir32
 
Mobile Application Development -Lecture 11 & 12.pdf
Mobile Application Development -Lecture 11 & 12.pdfMobile Application Development -Lecture 11 & 12.pdf
Mobile Application Development -Lecture 11 & 12.pdfAbdullahMunir32
 
Mobile Application Development -Lecture 09 & 10.pdf
Mobile Application Development -Lecture 09 & 10.pdfMobile Application Development -Lecture 09 & 10.pdf
Mobile Application Development -Lecture 09 & 10.pdfAbdullahMunir32
 
Mobile Application Development -Lecture 07 & 08.pdf
Mobile Application Development -Lecture 07 & 08.pdfMobile Application Development -Lecture 07 & 08.pdf
Mobile Application Development -Lecture 07 & 08.pdfAbdullahMunir32
 
Mobile Application Development Lecture 05 & 06.pdf
Mobile Application Development Lecture 05 & 06.pdfMobile Application Development Lecture 05 & 06.pdf
Mobile Application Development Lecture 05 & 06.pdfAbdullahMunir32
 
Mobile Application Development-Lecture 03 & 04.pdf
Mobile Application Development-Lecture 03 & 04.pdfMobile Application Development-Lecture 03 & 04.pdf
Mobile Application Development-Lecture 03 & 04.pdfAbdullahMunir32
 
Mobile Application Development-Lecture 01 & 02.pdf
Mobile Application Development-Lecture 01 & 02.pdfMobile Application Development-Lecture 01 & 02.pdf
Mobile Application Development-Lecture 01 & 02.pdfAbdullahMunir32
 
Parallel and Distributed Computing Chapter 13
Parallel and Distributed Computing Chapter 13Parallel and Distributed Computing Chapter 13
Parallel and Distributed Computing Chapter 13AbdullahMunir32
 
Parallel and Distributed Computing Chapter 12
Parallel and Distributed Computing Chapter 12Parallel and Distributed Computing Chapter 12
Parallel and Distributed Computing Chapter 12AbdullahMunir32
 
Parallel and Distributed Computing Chapter 11
Parallel and Distributed Computing Chapter 11Parallel and Distributed Computing Chapter 11
Parallel and Distributed Computing Chapter 11AbdullahMunir32
 
Parallel and Distributed Computing Chapter 10
Parallel and Distributed Computing Chapter 10Parallel and Distributed Computing Chapter 10
Parallel and Distributed Computing Chapter 10AbdullahMunir32
 
Parallel and Distributed Computing Chapter 9
Parallel and Distributed Computing Chapter 9Parallel and Distributed Computing Chapter 9
Parallel and Distributed Computing Chapter 9AbdullahMunir32
 
Parallel and Distributed Computing Chapter 8
Parallel and Distributed Computing Chapter 8Parallel and Distributed Computing Chapter 8
Parallel and Distributed Computing Chapter 8AbdullahMunir32
 
Parallel and Distributed Computing Chapter 7
Parallel and Distributed Computing Chapter 7Parallel and Distributed Computing Chapter 7
Parallel and Distributed Computing Chapter 7AbdullahMunir32
 
Parallel and Distributed Computing Chapter 6
Parallel and Distributed Computing Chapter 6Parallel and Distributed Computing Chapter 6
Parallel and Distributed Computing Chapter 6AbdullahMunir32
 
Parallel and Distributed Computing Chapter 5
Parallel and Distributed Computing Chapter 5Parallel and Distributed Computing Chapter 5
Parallel and Distributed Computing Chapter 5AbdullahMunir32
 
Parallel and Distributed Computing Chapter 4
Parallel and Distributed Computing Chapter 4Parallel and Distributed Computing Chapter 4
Parallel and Distributed Computing Chapter 4AbdullahMunir32
 
Parallel and Distributed Computing Chapter 2
Parallel and Distributed Computing Chapter 2Parallel and Distributed Computing Chapter 2
Parallel and Distributed Computing Chapter 2AbdullahMunir32
 
Parallel and Distributed Computing chapter 1
Parallel and Distributed Computing chapter 1Parallel and Distributed Computing chapter 1
Parallel and Distributed Computing chapter 1AbdullahMunir32
 

More from AbdullahMunir32 (20)

Mobile Application Development-Lecture 15 & 16.pdf
Mobile Application Development-Lecture 15 & 16.pdfMobile Application Development-Lecture 15 & 16.pdf
Mobile Application Development-Lecture 15 & 16.pdf
 
Mobile Application Development-Lecture 13 & 14.pdf
Mobile Application Development-Lecture 13 & 14.pdfMobile Application Development-Lecture 13 & 14.pdf
Mobile Application Development-Lecture 13 & 14.pdf
 
Mobile Application Development -Lecture 11 & 12.pdf
Mobile Application Development -Lecture 11 & 12.pdfMobile Application Development -Lecture 11 & 12.pdf
Mobile Application Development -Lecture 11 & 12.pdf
 
Mobile Application Development -Lecture 09 & 10.pdf
Mobile Application Development -Lecture 09 & 10.pdfMobile Application Development -Lecture 09 & 10.pdf
Mobile Application Development -Lecture 09 & 10.pdf
 
Mobile Application Development -Lecture 07 & 08.pdf
Mobile Application Development -Lecture 07 & 08.pdfMobile Application Development -Lecture 07 & 08.pdf
Mobile Application Development -Lecture 07 & 08.pdf
 
Mobile Application Development Lecture 05 & 06.pdf
Mobile Application Development Lecture 05 & 06.pdfMobile Application Development Lecture 05 & 06.pdf
Mobile Application Development Lecture 05 & 06.pdf
 
Mobile Application Development-Lecture 03 & 04.pdf
Mobile Application Development-Lecture 03 & 04.pdfMobile Application Development-Lecture 03 & 04.pdf
Mobile Application Development-Lecture 03 & 04.pdf
 
Mobile Application Development-Lecture 01 & 02.pdf
Mobile Application Development-Lecture 01 & 02.pdfMobile Application Development-Lecture 01 & 02.pdf
Mobile Application Development-Lecture 01 & 02.pdf
 
Parallel and Distributed Computing Chapter 13
Parallel and Distributed Computing Chapter 13Parallel and Distributed Computing Chapter 13
Parallel and Distributed Computing Chapter 13
 
Parallel and Distributed Computing Chapter 12
Parallel and Distributed Computing Chapter 12Parallel and Distributed Computing Chapter 12
Parallel and Distributed Computing Chapter 12
 
Parallel and Distributed Computing Chapter 11
Parallel and Distributed Computing Chapter 11Parallel and Distributed Computing Chapter 11
Parallel and Distributed Computing Chapter 11
 
Parallel and Distributed Computing Chapter 10
Parallel and Distributed Computing Chapter 10Parallel and Distributed Computing Chapter 10
Parallel and Distributed Computing Chapter 10
 
Parallel and Distributed Computing Chapter 9
Parallel and Distributed Computing Chapter 9Parallel and Distributed Computing Chapter 9
Parallel and Distributed Computing Chapter 9
 
Parallel and Distributed Computing Chapter 8
Parallel and Distributed Computing Chapter 8Parallel and Distributed Computing Chapter 8
Parallel and Distributed Computing Chapter 8
 
Parallel and Distributed Computing Chapter 7
Parallel and Distributed Computing Chapter 7Parallel and Distributed Computing Chapter 7
Parallel and Distributed Computing Chapter 7
 
Parallel and Distributed Computing Chapter 6
Parallel and Distributed Computing Chapter 6Parallel and Distributed Computing Chapter 6
Parallel and Distributed Computing Chapter 6
 
Parallel and Distributed Computing Chapter 5
Parallel and Distributed Computing Chapter 5Parallel and Distributed Computing Chapter 5
Parallel and Distributed Computing Chapter 5
 
Parallel and Distributed Computing Chapter 4
Parallel and Distributed Computing Chapter 4Parallel and Distributed Computing Chapter 4
Parallel and Distributed Computing Chapter 4
 
Parallel and Distributed Computing Chapter 2
Parallel and Distributed Computing Chapter 2Parallel and Distributed Computing Chapter 2
Parallel and Distributed Computing Chapter 2
 
Parallel and Distributed Computing chapter 1
Parallel and Distributed Computing chapter 1Parallel and Distributed Computing chapter 1
Parallel and Distributed Computing chapter 1
 

Recently uploaded

BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxAnaBeatriceAblay2
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 

Recently uploaded (20)

BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 

Parallel and Distributed Computing chapter 3

  • 2. PROCESS AND THREAD Process: a program in execution is called process. Thread: is the segment of process means a process can have multiple threads and these threads are contained within a process.
  • 3. User level vs kernel level thread User level thread: executes in user space code and can call kernel space. If user thread need some thing, it will call into kernel Kernel level thread: executes only kernel code and isn’t associated with a user space process.
  • 4. PROCESS VS THREAD • Process is program under execution • Heave weight • More time required for context switching • Need more resources • More time for creation • More time for termination • Thread is a segment of process • Light weight • Less time required for context switching • Need less resources • Less time for creation • Less time for termination
  • 5. PROCESS VS THREAD • Process doesn’t share data with each other • System call is involved • Process is isolated • Process has its own PCB, Stack and address space • Threads share data with each other. • No system call is involved • Threads share memory. • Threads has its own TCB, Stack and Address space.
  • 6.
  • 7. Process and Thread, EXAMPLE In a word processor, a thread may check spelling and grammar while another process user input while yet another third thread loads images from the hard drive and fourth does periodic automatic backups of the file being edited.
  • 8.
  • 9. Multitasking vs multithreading Multitasking allow to run more process concurrently While, multithreading allows single process to perform multiple tasks in a single process Both were introduced to improve performance and responsiveness of computing system.
  • 10. MULTITHREADED PROGRAMMING Concurrent execution of threads, these threads could run on single processor. Is the ability of single CPU to provide multiple threads of execution concurrently, supported by operating system Its aims to increase utilization of single core by using thread level parallelism. It allows multiple request to be satisfied simultaneously with having to service requests sequentially.
  • 11. MULTITHREADED PROGRAMMING - ADVANTAGES Responsiveness: if one thread complete its execution, then its output can be immediately returned. Faster context switching: context switch time is lower, process context switching requires more overhead from the CPU. Effective utilization of multiprocessor: Use of multiple threads in a single process make process execution faster. Similarly multiple threads can scheduled on multi processors
  • 12. MULTITHREADED PROGRAMMING - advantages Resource Sharing: resources like code, date, files can be shared among all threads within process. Stack and registers can’t be shared among threads Communication: communication between multiple thread is faster. Increase throughput of the system: each thread’s function is considered as one job. Then number of jobs completed per unit time is increased.
  • 13.
  • 14. Scaler processors • a processors that process only one data item at a time i.e. SISD Processor • While, Vector processor is a single instruction operates simultaneously on multiple items i.e. SIMD
  • 15. Super scaler processors Executes more than one instruction during a clock cycle by simultaneously, dispatching multiple instructions on different functional units on the processors. Remember, Processors is single but one CPU has different functional units. Such as ALU, Bit shifter or a multiplier
  • 16. Super scaler processors It therefore allows more throughput, i.e. the number of instructions can be executed per unit time
  • 17.
  • 18. Intel hyper threading Uses processor resources more efficiently, enabling multiple threads to run on each core. which increases processor throughput, improving overall performance Latest (HTT) HT Technology are •Intel® Core™ Processor Family •Intel® Core™ vPro ™ Processor Family •Intel® Core™ M Processor Family •Intel® Xeon R Processor Family
  • 19. Intel hyper threading Main function of hyper-threading is to increase the number of independent instructions in the pipeline, It takes advantages of superscalar architecture in which multiple instructions operate on separate data in parallel
  • 20.
  • 21. HTT: ADVANTAGES /DISADVANTAGES Advantages: •make the best use of each CPU Core. •Allow running more background data without interruption •Multithreading enables design and development of smaller chips by eliminating the need for more cores
  • 22. HTT: ADVANTAGES /DISADVANTAGES Disadvantages: Technically, doesn’t double the performance but maximize its performance. Some software doesn’t support multithreading, so software implementation is required. Generate more heat, to avoid performance degradation and overheating, cooling system must be implemented