SlideShare a Scribd company logo
1 of 1
Download to read offline
(1) Briefly describe what overhead is associated with managing and switching between
processes/threads.
Solution
In single-threaded processes, the thread is the process. There's one thing going on. In
multithreaded processes, there is more than one thread—more than one thing going on.
As virtualized memory is associated with the process and not threads, threads share the same
memory address space. One instance of virtualized memory but many virtualized processors.
Process switching is context switching from one process to a different process. It involves
switching out all of the process abstractions and resources in favor of those belonging to a new
process. Most notably and expensively, this means switching the memory address space. This
includes memory addresses, mappings, page tables, and kernel resources—a relatively expensive
operation. On some architectures, it even means flushing various processor caches that aren't
sharable across address spaces. For example, x86 has to flush the TLB and some ARM
processors have to flush the entirety of the L1 cache!
Thread switching is context switching from one thread to another in the same process (switching
from thread to thread across processes is just process switching). Thread switching is much,
much cheaper, as it involves switching out only the abstraction unique to threads: The processor
state. Switching processor state (such as the program counter and register contents) is generally
very efficient. For the most part, the cost of thread-to-thread switching is about the same as the
cost of entering and exiting the kernel. On systems such as Linux, that is very cheap.
Consequently, thread switching is significantly faster than process switching. How much faster
depends on the operating system and architecture, but it can easily be a magnitude difference in
CPU time. On an OS like Linux with cheap system calls, thread-to-thread switching is very
quick.

More Related Content

Similar to (1) Briefly describe what overhead is associated with managing and s.pdf

UNIT II DIS.pptx
UNIT II DIS.pptxUNIT II DIS.pptx
UNIT II DIS.pptxSamPrem3
 
Operating System 4 1193308760782240 2
Operating System 4 1193308760782240 2Operating System 4 1193308760782240 2
Operating System 4 1193308760782240 2mona_hakmy
 
Operating System 4
Operating System 4Operating System 4
Operating System 4tech2click
 
Parallel and Distributed Computing chapter 3
Parallel and Distributed Computing chapter 3Parallel and Distributed Computing chapter 3
Parallel and Distributed Computing chapter 3AbdullahMunir32
 
thread_ multiprocessor_ scheduling_a.ppt
thread_ multiprocessor_ scheduling_a.pptthread_ multiprocessor_ scheduling_a.ppt
thread_ multiprocessor_ scheduling_a.pptnaghamallella
 
Parallel Computing - Lec 3
Parallel Computing - Lec 3Parallel Computing - Lec 3
Parallel Computing - Lec 3Shah Zaib
 
Introduction to multi core
Introduction to multi coreIntroduction to multi core
Introduction to multi coremukul bhardwaj
 
Shared memory Parallelism (NOTES)
Shared memory Parallelism (NOTES)Shared memory Parallelism (NOTES)
Shared memory Parallelism (NOTES)Subhajit Sahu
 
1. What important part of the process switch operation is not shown .pdf
1. What important part of the process switch operation is not shown .pdf1. What important part of the process switch operation is not shown .pdf
1. What important part of the process switch operation is not shown .pdffathimaoptical
 
Operating system 20 threads
Operating system 20 threadsOperating system 20 threads
Operating system 20 threadsVaibhav Khanna
 
process and thread.pptx
process and thread.pptxprocess and thread.pptx
process and thread.pptxHamzaxTv
 

Similar to (1) Briefly describe what overhead is associated with managing and s.pdf (20)

UNIT II DIS.pptx
UNIT II DIS.pptxUNIT II DIS.pptx
UNIT II DIS.pptx
 
Threads
ThreadsThreads
Threads
 
Os Threads
Os ThreadsOs Threads
Os Threads
 
Treads
TreadsTreads
Treads
 
Operating System 4 1193308760782240 2
Operating System 4 1193308760782240 2Operating System 4 1193308760782240 2
Operating System 4 1193308760782240 2
 
Operating System 4
Operating System 4Operating System 4
Operating System 4
 
Parallel and Distributed Computing chapter 3
Parallel and Distributed Computing chapter 3Parallel and Distributed Computing chapter 3
Parallel and Distributed Computing chapter 3
 
thread_ multiprocessor_ scheduling_a.ppt
thread_ multiprocessor_ scheduling_a.pptthread_ multiprocessor_ scheduling_a.ppt
thread_ multiprocessor_ scheduling_a.ppt
 
Chapter04 new
Chapter04 newChapter04 new
Chapter04 new
 
Parallel Computing - Lec 3
Parallel Computing - Lec 3Parallel Computing - Lec 3
Parallel Computing - Lec 3
 
Multi-Core on Chip Architecture *doc - IK
Multi-Core on Chip Architecture *doc - IKMulti-Core on Chip Architecture *doc - IK
Multi-Core on Chip Architecture *doc - IK
 
Introduction to multi core
Introduction to multi coreIntroduction to multi core
Introduction to multi core
 
Shared memory Parallelism (NOTES)
Shared memory Parallelism (NOTES)Shared memory Parallelism (NOTES)
Shared memory Parallelism (NOTES)
 
Lecture 3 threads
Lecture 3   threadsLecture 3   threads
Lecture 3 threads
 
Assignment-01.pptx
Assignment-01.pptxAssignment-01.pptx
Assignment-01.pptx
 
1. What important part of the process switch operation is not shown .pdf
1. What important part of the process switch operation is not shown .pdf1. What important part of the process switch operation is not shown .pdf
1. What important part of the process switch operation is not shown .pdf
 
Threads
ThreadsThreads
Threads
 
Operating system 20 threads
Operating system 20 threadsOperating system 20 threads
Operating system 20 threads
 
process and thread.pptx
process and thread.pptxprocess and thread.pptx
process and thread.pptx
 
Chapter 3 chapter reading task
Chapter 3 chapter reading taskChapter 3 chapter reading task
Chapter 3 chapter reading task
 

More from indiaartz

Some Calvin Cycle enzymes contain disulfide bonds that must be reduc.pdf
Some Calvin Cycle enzymes contain disulfide bonds that must be reduc.pdfSome Calvin Cycle enzymes contain disulfide bonds that must be reduc.pdf
Some Calvin Cycle enzymes contain disulfide bonds that must be reduc.pdfindiaartz
 
Simplify and write the answer with positive exponents Simplify and w.pdf
Simplify and write the answer with positive exponents Simplify and w.pdfSimplify and write the answer with positive exponents Simplify and w.pdf
Simplify and write the answer with positive exponents Simplify and w.pdfindiaartz
 
Question 7 (of 20) 7. 1000 poants TB 1301 which of the following an.pdf
Question 7 (of 20) 7. 1000 poants TB 1301 which of the following an.pdfQuestion 7 (of 20) 7. 1000 poants TB 1301 which of the following an.pdf
Question 7 (of 20) 7. 1000 poants TB 1301 which of the following an.pdfindiaartz
 
Problem 12-9ACondensed financial data of Waterway Industries follo.pdf
Problem 12-9ACondensed financial data of Waterway Industries follo.pdfProblem 12-9ACondensed financial data of Waterway Industries follo.pdf
Problem 12-9ACondensed financial data of Waterway Industries follo.pdfindiaartz
 
Please help me with these 3 questions! True or False. Assortment of .pdf
Please help me with these 3 questions! True or False. Assortment of .pdfPlease help me with these 3 questions! True or False. Assortment of .pdf
Please help me with these 3 questions! True or False. Assortment of .pdfindiaartz
 
Performance BudgetingPerformance budgeting has been attempted at t.pdf
Performance BudgetingPerformance budgeting has been attempted at t.pdfPerformance BudgetingPerformance budgeting has been attempted at t.pdf
Performance BudgetingPerformance budgeting has been attempted at t.pdfindiaartz
 
Many bridges are made from rebar-reinforced concrete composites. Cla.pdf
Many bridges are made from rebar-reinforced concrete composites. Cla.pdfMany bridges are made from rebar-reinforced concrete composites. Cla.pdf
Many bridges are made from rebar-reinforced concrete composites. Cla.pdfindiaartz
 
If the cystic fibrosis allele protects against tuberculosis the same .pdf
If the cystic fibrosis allele protects against tuberculosis the same .pdfIf the cystic fibrosis allele protects against tuberculosis the same .pdf
If the cystic fibrosis allele protects against tuberculosis the same .pdfindiaartz
 
Match the graph of the sine function to the equation over [-4 Pi. 4 P.pdf
Match the graph of the sine function to the equation over [-4 Pi. 4 P.pdfMatch the graph of the sine function to the equation over [-4 Pi. 4 P.pdf
Match the graph of the sine function to the equation over [-4 Pi. 4 P.pdfindiaartz
 
location in the stem, function, and Chemical Composition of their Wa.pdf
location in the stem, function, and Chemical Composition of their Wa.pdflocation in the stem, function, and Chemical Composition of their Wa.pdf
location in the stem, function, and Chemical Composition of their Wa.pdfindiaartz
 
If Zn Binomial (n, ) , and n~possion(), find the distribution of Z .pdf
If Zn Binomial (n, ) , and n~possion(), find the distribution of Z .pdfIf Zn Binomial (n, ) , and n~possion(), find the distribution of Z .pdf
If Zn Binomial (n, ) , and n~possion(), find the distribution of Z .pdfindiaartz
 
Given the global financial crisis of 2007–2009, do you anticipate an.pdf
Given the global financial crisis of 2007–2009, do you anticipate an.pdfGiven the global financial crisis of 2007–2009, do you anticipate an.pdf
Given the global financial crisis of 2007–2009, do you anticipate an.pdfindiaartz
 
Generativity versus stagnation        Early adult transitio.pdf
Generativity versus stagnation        Early adult transitio.pdfGenerativity versus stagnation        Early adult transitio.pdf
Generativity versus stagnation        Early adult transitio.pdfindiaartz
 
Genetics Question 2 In the insect sex determination system, th.pdf
Genetics Question 2 In the insect sex determination system, th.pdfGenetics Question 2 In the insect sex determination system, th.pdf
Genetics Question 2 In the insect sex determination system, th.pdfindiaartz
 
Explain why malaria infection may lead to anemia. How would you clas.pdf
Explain why malaria infection may lead to anemia. How would you clas.pdfExplain why malaria infection may lead to anemia. How would you clas.pdf
Explain why malaria infection may lead to anemia. How would you clas.pdfindiaartz
 
Figure 13.2 of a single pair of homologous chromosomes as they might.pdf
Figure 13.2 of a single pair of homologous chromosomes as they might.pdfFigure 13.2 of a single pair of homologous chromosomes as they might.pdf
Figure 13.2 of a single pair of homologous chromosomes as they might.pdfindiaartz
 
Every individual produced by sexual reproduction is unique. This is .pdf
Every individual produced by sexual reproduction is unique. This is .pdfEvery individual produced by sexual reproduction is unique. This is .pdf
Every individual produced by sexual reproduction is unique. This is .pdfindiaartz
 
Explain to them the probability of future offspring being normal or h.pdf
Explain to them the probability of future offspring being normal or h.pdfExplain to them the probability of future offspring being normal or h.pdf
Explain to them the probability of future offspring being normal or h.pdfindiaartz
 
explain conceptual questionsvariabilitystandard devationz-sc.pdf
explain conceptual questionsvariabilitystandard devationz-sc.pdfexplain conceptual questionsvariabilitystandard devationz-sc.pdf
explain conceptual questionsvariabilitystandard devationz-sc.pdfindiaartz
 
Explain the difference between fermentation and respiration in biolo.pdf
Explain the difference between fermentation and respiration in biolo.pdfExplain the difference between fermentation and respiration in biolo.pdf
Explain the difference between fermentation and respiration in biolo.pdfindiaartz
 

More from indiaartz (20)

Some Calvin Cycle enzymes contain disulfide bonds that must be reduc.pdf
Some Calvin Cycle enzymes contain disulfide bonds that must be reduc.pdfSome Calvin Cycle enzymes contain disulfide bonds that must be reduc.pdf
Some Calvin Cycle enzymes contain disulfide bonds that must be reduc.pdf
 
Simplify and write the answer with positive exponents Simplify and w.pdf
Simplify and write the answer with positive exponents Simplify and w.pdfSimplify and write the answer with positive exponents Simplify and w.pdf
Simplify and write the answer with positive exponents Simplify and w.pdf
 
Question 7 (of 20) 7. 1000 poants TB 1301 which of the following an.pdf
Question 7 (of 20) 7. 1000 poants TB 1301 which of the following an.pdfQuestion 7 (of 20) 7. 1000 poants TB 1301 which of the following an.pdf
Question 7 (of 20) 7. 1000 poants TB 1301 which of the following an.pdf
 
Problem 12-9ACondensed financial data of Waterway Industries follo.pdf
Problem 12-9ACondensed financial data of Waterway Industries follo.pdfProblem 12-9ACondensed financial data of Waterway Industries follo.pdf
Problem 12-9ACondensed financial data of Waterway Industries follo.pdf
 
Please help me with these 3 questions! True or False. Assortment of .pdf
Please help me with these 3 questions! True or False. Assortment of .pdfPlease help me with these 3 questions! True or False. Assortment of .pdf
Please help me with these 3 questions! True or False. Assortment of .pdf
 
Performance BudgetingPerformance budgeting has been attempted at t.pdf
Performance BudgetingPerformance budgeting has been attempted at t.pdfPerformance BudgetingPerformance budgeting has been attempted at t.pdf
Performance BudgetingPerformance budgeting has been attempted at t.pdf
 
Many bridges are made from rebar-reinforced concrete composites. Cla.pdf
Many bridges are made from rebar-reinforced concrete composites. Cla.pdfMany bridges are made from rebar-reinforced concrete composites. Cla.pdf
Many bridges are made from rebar-reinforced concrete composites. Cla.pdf
 
If the cystic fibrosis allele protects against tuberculosis the same .pdf
If the cystic fibrosis allele protects against tuberculosis the same .pdfIf the cystic fibrosis allele protects against tuberculosis the same .pdf
If the cystic fibrosis allele protects against tuberculosis the same .pdf
 
Match the graph of the sine function to the equation over [-4 Pi. 4 P.pdf
Match the graph of the sine function to the equation over [-4 Pi. 4 P.pdfMatch the graph of the sine function to the equation over [-4 Pi. 4 P.pdf
Match the graph of the sine function to the equation over [-4 Pi. 4 P.pdf
 
location in the stem, function, and Chemical Composition of their Wa.pdf
location in the stem, function, and Chemical Composition of their Wa.pdflocation in the stem, function, and Chemical Composition of their Wa.pdf
location in the stem, function, and Chemical Composition of their Wa.pdf
 
If Zn Binomial (n, ) , and n~possion(), find the distribution of Z .pdf
If Zn Binomial (n, ) , and n~possion(), find the distribution of Z .pdfIf Zn Binomial (n, ) , and n~possion(), find the distribution of Z .pdf
If Zn Binomial (n, ) , and n~possion(), find the distribution of Z .pdf
 
Given the global financial crisis of 2007–2009, do you anticipate an.pdf
Given the global financial crisis of 2007–2009, do you anticipate an.pdfGiven the global financial crisis of 2007–2009, do you anticipate an.pdf
Given the global financial crisis of 2007–2009, do you anticipate an.pdf
 
Generativity versus stagnation        Early adult transitio.pdf
Generativity versus stagnation        Early adult transitio.pdfGenerativity versus stagnation        Early adult transitio.pdf
Generativity versus stagnation        Early adult transitio.pdf
 
Genetics Question 2 In the insect sex determination system, th.pdf
Genetics Question 2 In the insect sex determination system, th.pdfGenetics Question 2 In the insect sex determination system, th.pdf
Genetics Question 2 In the insect sex determination system, th.pdf
 
Explain why malaria infection may lead to anemia. How would you clas.pdf
Explain why malaria infection may lead to anemia. How would you clas.pdfExplain why malaria infection may lead to anemia. How would you clas.pdf
Explain why malaria infection may lead to anemia. How would you clas.pdf
 
Figure 13.2 of a single pair of homologous chromosomes as they might.pdf
Figure 13.2 of a single pair of homologous chromosomes as they might.pdfFigure 13.2 of a single pair of homologous chromosomes as they might.pdf
Figure 13.2 of a single pair of homologous chromosomes as they might.pdf
 
Every individual produced by sexual reproduction is unique. This is .pdf
Every individual produced by sexual reproduction is unique. This is .pdfEvery individual produced by sexual reproduction is unique. This is .pdf
Every individual produced by sexual reproduction is unique. This is .pdf
 
Explain to them the probability of future offspring being normal or h.pdf
Explain to them the probability of future offspring being normal or h.pdfExplain to them the probability of future offspring being normal or h.pdf
Explain to them the probability of future offspring being normal or h.pdf
 
explain conceptual questionsvariabilitystandard devationz-sc.pdf
explain conceptual questionsvariabilitystandard devationz-sc.pdfexplain conceptual questionsvariabilitystandard devationz-sc.pdf
explain conceptual questionsvariabilitystandard devationz-sc.pdf
 
Explain the difference between fermentation and respiration in biolo.pdf
Explain the difference between fermentation and respiration in biolo.pdfExplain the difference between fermentation and respiration in biolo.pdf
Explain the difference between fermentation and respiration in biolo.pdf
 

Recently uploaded

Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
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
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 

Recently uploaded (20)

Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
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
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 

(1) Briefly describe what overhead is associated with managing and s.pdf

  • 1. (1) Briefly describe what overhead is associated with managing and switching between processes/threads. Solution In single-threaded processes, the thread is the process. There's one thing going on. In multithreaded processes, there is more than one thread—more than one thing going on. As virtualized memory is associated with the process and not threads, threads share the same memory address space. One instance of virtualized memory but many virtualized processors. Process switching is context switching from one process to a different process. It involves switching out all of the process abstractions and resources in favor of those belonging to a new process. Most notably and expensively, this means switching the memory address space. This includes memory addresses, mappings, page tables, and kernel resources—a relatively expensive operation. On some architectures, it even means flushing various processor caches that aren't sharable across address spaces. For example, x86 has to flush the TLB and some ARM processors have to flush the entirety of the L1 cache! Thread switching is context switching from one thread to another in the same process (switching from thread to thread across processes is just process switching). Thread switching is much, much cheaper, as it involves switching out only the abstraction unique to threads: The processor state. Switching processor state (such as the program counter and register contents) is generally very efficient. For the most part, the cost of thread-to-thread switching is about the same as the cost of entering and exiting the kernel. On systems such as Linux, that is very cheap. Consequently, thread switching is significantly faster than process switching. How much faster depends on the operating system and architecture, but it can easily be a magnitude difference in CPU time. On an OS like Linux with cheap system calls, thread-to-thread switching is very quick.