Question

1.) Five threads are created by a process with PID 10. Name three entities that are...

1.) Five threads are created by a process with PID 10. Name three entities that are unique to threads (i.e. each thread has its own 'copy' potentially different from the other ones of other threads.)

2.)  Five threads are created by a process with PID 10. Each one of the threads have threadIDs (TID) 11, 12, 13, 14, and 15 respectively. What is the value Linux(Unix) of getpid() returned when thread with TID 11 is issuing the call?

3.)  process with PID 10 is creating five threads using thread_create(). How many threads of execution are there after the creation of those threads, assuming they have all been created successfully and all are still running ? process with PID 10 is creating five threads using thread_create(). How many threads of execution are there after the creation of those threads, assuming they have all been created successfully and all are still running ?

Homework Answers

Answer #1

Please find the requested answers below.

Please provide your feedback
Thanks and Happy learning!



1) A thread is a light weight process. Each thread created by a process will have below unique entities

a. Thread ID

b. Stack(for storing local variables, return values etc..)

c. Saved registers

d. Stack pointer

e. instruction pointer

f. Signal mask

g. Scheduling priority information



2) As a  thread is a light weight process, each thread lives within the same process. That means if a process with PID 10 creates five threads then all thos five threads are part of the same process(ie , process ID will be same for all those five threads but each thread will have ots own thread ID).  So if the thread with TID calls the getpid() function then it will return the same process Id of the process which created this thread. That means the Thread id printed by getpid() will be 10(ie PID of the parent process which created this thread).



3) If the process with PID 10 creates 5 threads, then there will be total six threads of execution. When a process starts it will have a single main thread(ie each process is considered to have a single main thread). Now when the process/main thread creates new 5 threads, there will be total 6 threads. That are the main thread plus the newly created 5 threads.
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
BridgeRock is a major manufacturer of tires in the U.S.. The company had five manufacturing facilities...
BridgeRock is a major manufacturer of tires in the U.S.. The company had five manufacturing facilities where tires were made and another 20 facilities for various components and materials used in tires. Each manufacturing facility produced 10,000 tires every hour. Quality had always been emphasized at BridgeRock, but lately quality was a bigger issue because of recent fatal accidents involving tires made by other manufacturers due to tread separation. All tire manufacturers were under pressure to ensure problems did not...
1)Which of the following is a driver of globalization? a) Trade barriers and controls on inflows...
1)Which of the following is a driver of globalization? a) Trade barriers and controls on inflows of foreign direct investment b) Weak competition c) Technological advance d) Economies of scale are being exploited to the maximum 2) Globalization is beneficial for firms because a) It protects them against foreign competition b) It cushions them from the effect of events in other countries c) It open up new market opportunities d) It increases the risk and uncertainty of operating in a...
1- Which of the following is a drawback of using three- dimensional graphs? a- three-dimensional graphs...
1- Which of the following is a drawback of using three- dimensional graphs? a- three-dimensional graphs are difficult to represent on paper. b- three-dimensional graphs cannot represent qualitative data. c- three-dimensional graphs cannot be rotated when presenting digitally. d- three- dimensional graphs can only express two variables at a time. e- three-dimensional graphs contains lines that overlap too much to be distinguishable. 2- the most frequently used chart in comparing the subdivisions of wholes is the a- line chart b-...
LEADERSHIP IMPLICATIONS IN COMPLEX PROJECTS: THE BOEING DREAMLINER AND CEO JIM MCNERNEY In defense of criticism...
LEADERSHIP IMPLICATIONS IN COMPLEX PROJECTS: THE BOEING DREAMLINER AND CEO JIM MCNERNEY In defense of criticism of Boeing’s 787 production delays, CEO Jim McNerney explained: We are trying to come up with the strongest set of partnerships we can with the people that supply our major systems and structures. In defense, we are trying to respond to the pressures of governments buying fewer things at lower prices, with less favorable contract terms. And that pressure cannot just stop at Boeing....
LEADERSHIP IMPLICATIONS IN COMPLEX PROJECTS: THE BOEING DREAMLINER AND CEO JIM MCNERNEY In defense of criticism...
LEADERSHIP IMPLICATIONS IN COMPLEX PROJECTS: THE BOEING DREAMLINER AND CEO JIM MCNERNEY In defense of criticism of Boeing’s 787 production delays, CEO Jim McNerney explained: We are trying to come up with the strongest set of partnerships we can with the people that supply our major systems and structures. In defense, we are trying to respond to the pressures of governments buying fewer things at lower prices, with less favorable contract terms. And that pressure cannot just stop at Boeing....
Which of the following best describes a project management plan? The project charter, WBS, and project...
Which of the following best describes a project management plan? The project charter, WBS, and project scope statement The schedule, management plans, and budget A formal, approved document used to control the project The project manager's plan for managing and controlling the work The engineering department wants the project objective to be a 10 percent improvement in throughput. The information technology department wants no more than 5 percent of its resources to be used on the project. Management, who is...
1-25 True or False 1. Sales revenue is an inflow of assets. 2. The three distinct...
1-25 True or False 1. Sales revenue is an inflow of assets. 2. The three distinct types of cost to a manufacturer are direct materials, direct labor, and manufacturing overhead.                       3. Sales Returns and Allowances is a contra-asset account. 4. Like sales revenue, cost of goods sold represents an inflow of assets. 5. With the periodic inventory system the inventory account is updated after each sale or purchase. 6. When merchandise is sold FOB shipping point, the buyer is responsible...
Multiple Choice 1) On December 15 of the current year, Conrad Accounting Services signed a $40,000...
Multiple Choice 1) On December 15 of the current year, Conrad Accounting Services signed a $40,000 contract with a client to provide bookkeeping services to the client in the following year. Which accounting principle would require Conrad Accounting Services to record the bookkeeping revenue in the following year and not the year the cash was received? • Going-concern assumption. • Monetary unit assumption. • Revenue recognition principle. • Business entity assumption. • Cost principle. 2) On January 1, a company...
Amazon CEO Jeff Bezos’ 2020 letter to shareholders details the company’s plans to combat the coronavirus...
Amazon CEO Jeff Bezos’ 2020 letter to shareholders details the company’s plans to combat the coronavirus Amazon CEO Jeff Bezos just published his annual letter to shareholders, and the efforts his company is taking to address the COVID-19 crisis were front and center. He outlined the company’s plans to build a lab to test employees and the social distancing measures its implemented in its facilities among other initiatives. Other than the coronavirus pandemic, Bezos also discussed the retail giant’s efforts...
5.Paralanguage includes yawning and laughing. True False 6.A person with the director style of communication likes...
5.Paralanguage includes yawning and laughing. True False 6.A person with the director style of communication likes to know the whole picture and thrives on details. True False 7.Effective feedback is evaluative rather than descriptive. True False 8.Social cognitive theory posits that humans often evaluate themselves quite differently than others do. True False 9.Vertical communication is required to make a coordinated, cross functional effort in achieving organizational goals. True False 10.The informal system of communication has a highly impersonal orientation. True...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT
Active Questions
  • In C++ ------------------------------------------ All functions take no parameters as input and return nothing. Create a function...
    asked 9 minutes ago
  • Based on the increasing theft rate in Sunset Harbor, the Harbor is planning to upgrade its...
    asked 10 minutes ago
  • Design a program that allows the user to enter 5 names into a String array. Sort...
    asked 13 minutes ago
  • Directions: Pair off into groups of 3-4 students. Please read and respond to all the following...
    asked 32 minutes ago
  • a) What, exactly, is the “State Income Tax (SIT)? What are the various tax rates in...
    asked 33 minutes ago
  • Identify the correct combinational circuit in the following analogy. Due to road construction, four lanes may...
    asked 34 minutes ago
  • Educators sometimes need access to student’s medical information when it relates to their performance and safety...
    asked 42 minutes ago
  • Write Python expressions corresponding to the following statements: The sum of the first five positive integers...
    asked 49 minutes ago
  • Write a function that passes an array argument, getRandomNumbers, to get a pointer to an array...
    asked 1 hour ago
  • An automobile is traveling at v0 = 30 meters per second, when the driver applies the...
    asked 1 hour ago
  • T=15C, RH=70%, P= 99.6KPa. Calculate i) the saturated vapor pressure es, ii) vapor pressure e; iii)...
    asked 1 hour ago
  • Computer Science, Website Design, Enhanced Business Technology Write three paragraphs (4-7 sentences each) with three website...
    asked 1 hour ago