1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
alexira [117]
3 years ago
7

The following code will create a zombie child process because the child process is terminated and the parent process is busy in

a loop without calling wait() function. now, modify this program by handling sigchld signal so that no zombie process is created. the parent process cannot call wait()directly in the main(). however, calling wait() from inside the signal handler is fine. the main still must go to the infinite while loop. you can add helper functions.
int main(){
if (fork()== 0) // child process
exit(0);
else // parent process
while (true);
}
Computers and Technology
1 answer:
Georgia [21]3 years ago
5 0

Answer:

what on earth

Explanation:

You might be interested in
Given an array a, declared to contain 34 elements, write an expression that refers to the last element of the array.
Mice21 [21]
If the language is zero indexed:

a[ 33 ]
4 0
3 years ago
In a linked chain implementation of a stack ADT the performance of popping am emtry from the stack is
Mice21 [21]

Answer:

B.O(1)

Explanation:

When we are implementing ADT stack using linked chain we can pop an entry from the stack having O(1) time complexity because in linked chain we have the head or top pointer in linked chain only.Popping and pushing in stack happens on only one end that is top.So we have move to move top in linked chain to the next and delete prev node.

8 0
2 years ago
In which method of encryption is a single encryption key sent to the receiver so both sender and receiver share the same key?
mars1129 [50]

Answer:

B. Symmetric key encryption

Explanation:

Symmetric key encryption is one in which a single encryption key is sent to the receiver so both sender and receiver share the same key. In this type of encryption, the sender uses a particular key to encrypt the data and sends the encrypted data (cipher data) to the receiver and then the receiver uses the same key to decrypt the data.

Public key encryption, or asymmetric encryption uses two keys - a private key and a public key. The public key is know to everyone while the private key is known only to those for whom the message is intended. An application of this type of encryption is in SSL (Secure Sockets Layer) -  a protocol for transmitting data privately on the internet.

Private key encryption is not exactly one of the encryption methods but rather, a private key and a public key are used in encryption.

The best option is therefore <em>symmetric key encryption</em>.

<em>Hope this helps!</em>

7 0
2 years ago
#Write a function called find_median. find_median #should take as input a string representing a filename. #The file correspondin
azamat

Answer:

Explanation:

The following is written in Python. It takes in a file, it then reads all of the elements in the file and adds them to a list called myList. Then it sorts the list and uses the elements in that list to calculate the median. Once the median is calculated it returns it to the user. The code has been tested and the output can be seen in the image below.

def find_median(file):

   file = open(file, 'r')

   mylist = []

   for number in file:

       mylist.append(int(number))

   numOfElements = len(mylist)

   mylist.sort()

   print(mylist)

   if numOfElements % 2 == 0:

       m1 = numOfElements / 2

       m2 = (numOfElements / 2) + 1

       m1 = int(m1) - 1

       m2 = int(m2) - 1

       median = (mylist[m1] + mylist[m2]) / 2

   else:

       m = (numOfElements + 1) / 2

       m = int(m) - 1

       median = mylist[m]

   return median

print("Median: " + str(find_median('file1.txt')))

5 0
3 years ago
In DNS cache poisoning, valid packets exploit poorly configured DNS servers to inject false information to corrupt the servers'
myrzilka [38]

Answer: True

Explanation: Domain name system(DNS) is the kind of attack that exploits the functioning of the DNS .This process is also known as the DNS spoofing .The corrupted data is invoked in the cache database and thus creates spoof.

It creates diversion of the traffic from the actual servers to the fake servers and entering the exploited data in the cache database.Thus, the given statement is true.

4 0
2 years ago
Other questions:
  • The FTC found CardSystems Solutions and its predecessors __________ the FTC Act 15, U.S.
    12·1 answer
  • Alex leads a team of eight members. Arrange his tasks in sequential order of phases of group dynamics. What are the stages in gr
    13·1 answer
  • A hub or ____ is a central point that connects several devices in a network together.
    11·1 answer
  • A user of the wireless network is unable to gain access to the network. The symptoms are:1.) Unable to connect to both internal
    6·1 answer
  • What does PowerPoint display when you use the Notes Page view?
    14·2 answers
  • The practice of texting is most popular and what age group
    12·2 answers
  • Which type of server runs Active Directory?
    12·1 answer
  • Given a int variable named callsReceived and another int variable named operatorsOnCall write the necessary code to read values
    13·1 answer
  • HELP PLSSSSS!!! I WILL MARK BRAINLIEST FOR THE FIRST AND CORRECT ANSWER!!!
    14·2 answers
  • Mille gets a text from her friend asking if she wants to come over. It seems like a bit of a hassle to go to her friend's house,
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!