Answer:
b) Bounded Waiting
Explanation:
int currentThread = 1;
bool thread1Access = true;
bool thread2Access = true;
thread1 { thread2 {
While (true) {
While (true)
{
while(thread2Access == true)
{
while(thread1Access == true)
{
If (currentThread == 2) {
If (currentThread == 1)
{
thread1Access = false; thread2Access = false;
While (currentThread == 2);
While (currentThread == 1);
thread1Access = true; thread2Access = true;
} }
/* start of critical section */ /* start of critical section */
currentThread = 2 currentThread = 1
… ...
/* end of critical section */ /* end of critical section */
thread1Access = false; thread2Access = false;
… ...
} }
} }
} }
It can be seen that in all the instances, both threads are programmed to share same resource at the same time, and hence this is the bounded waiting. For Mutual exclusion, two threads cannot share one resource at one time. They must share simultaneously. Also there should be no deadlock. For Progress each thread should have exclusive access to all the resources. Thus its definitely the not the Progress. And hence its Bounded waiting.
Answer:
Database platform as a service
Explanation:
The database platform as a service is also called the managed databases. This software serves by giving users the opportunity to set up and also operate databases. The user would be able to use the database cloud system without having to buy hardware or install software. The cloud providers are in charge of everything which includes it's availability and security.
Answer:
see explaination
Explanation:
#include <iostream>
#include <string>
#include <vector>
using namespace std;
vector<string> split(string, string);
int main()
{
vector<string> splitedStr;
string data;
string delimiter;
cout << "Enter string to split:" << endl;
getline(cin,data);
cout << "Enter delimiter string:" << endl;
getline(cin,delimiter);
splitedStr = split(data,delimiter);
cout << "\n";
cout << "The substrings are: ";
for(int i = 0; i < splitedStr.size(); i++)
cout << "\"" << splitedStr[i] << "\"" << ",";
cout << endl << endl;
cin >> data;
return 0;
}
vector<string> split(string target, string delimiter)
{
unsigned first = 0;
unsigned last;
vector<string> subStr;
while((last = target.find(delimiter, first)) != string::npos)
{
subStr.push_back(target.substr(first, last-first));
first = last + delimiter.length();
}
subStr.push_back(target.substr(first));
return subStr;
}
Answer:
There are different countries in the world having different laws for for the protection of privacy and data. Such as
1. Data Privacy Act 2012, Philippines
2. Cyber Security Law China
3. General Data Protection Regulation (GDPR)- Europion Union
These laws provide best legislation to their users in terms of security and protection of data and privacy.
Explanation: