Answer:
A mutex is used here.
A mutex is a locking mechanism set before using a shared resource and is released after using the shared resource. When the lock is set, only one task accesses the mutex.
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<pthread.h>
#include<unistd.h>
pthread_t tid[2];
int flag=0;
int a = 0;
pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
void *thread_a(void *arg)
{
pthread_mutex_lock(&lock);
a += 2;
pthread_mutex_unlock(&lock);
flag = 1;
return NULL;
}
void *thread_b(void *arg)
{
int b = 0;
if(flag){
b++;
}
b += 3;
pthread_mutex_lock(&lock);
a -= b;
pthread_mutex_unlock(&lock);
return NULL;
}
int main()
{
while(1) {
pthread_create(&tid[0],NULL,thread_a,NULL);
pthread_create(&tid[1],NULL,thread_b,NULL);
sleep(1);
}
pthread_exit(NULL);
return 0;
}
The correct answer is Dsmod.exe. Hope this helps!
A Flash video production tool that enables users to make interesting and interactive videos.
<h3>What characteristics does application software have?</h3>
A cloud-based digital adoption platform called the On-screen lets customers execute any activity on SAP ECC, S4HANA, or a variety of other corporate systems like Salesforce, Dynamics, Ariba, Workday, Success factors, Oracle, and even custom apps by providing step-by-step walkthroughs.
Application software has a number of important features, including:
- High-level programming language used to write the document.
- Simple to design.
- more conversational.
- larger in scale.
- performs specialized activities including text processing and photo editing.
- due to its size, extra storage space is required.
To learn more about software, refer to:
brainly.com/question/1538272
#SPJ4
Physical wellness indicates a high level of endurance, flexibility and strength... Mental and emotional wellness focuses on an acceptance and agreement with ones emotions and feelings.
Answer: d)Data access logic and data storage
Explanation:Client-server architecture is model that contains one or more client servers which are connected to one hub server or central server.It has services like storing files, access logic, accessing of application, sharing the files and data etc. It functions by providing the services and resources to the clients over a network. Therefore , the correct option is option(d).