[Solved] VE482-Homework 3

$25

File Name: VE482_Homework_3.zip
File Size: 150.72 KB

SKU: [Solved] VE482-Homework 3 Category: Tag:
5/5 - (1 vote)

Ex. 1 General questions

  1. Why would a thread voluntarily release the CPU?
  2. What is the biggest advantage/disadvantage of user space threads?
  3. If a multithreaded process forks, a problem occurs if the child gets copies of all the parents threads. Suppose that one of the original threads was waiting for keyboard input. Now two threads are waiting for keyboard input, one in each process. Does this problem ever occur in single-threaded processes?
  4. Many UNIX system calls have no Win32 API equivalents. For each such call, what are the consequences when porting a program from a UNIX system to a Windows system?

Ex. 2 C programming

The code of this exercise will be reused in future labs.

The goal of this exercise is to improve the programming skills and get more familiar with pointers and function pointers.

  1. Implement a linked list structure containing two pointers of type char and void. It should be possible to at least add elements to the list.
  2. Knowing that the void pointer in the structure could contain some char*, int, or double, write a search function for this linked list.
  3. The linked list will store elements read from an ASCII file where each line is in the format somestring=somedata. The type of the data is defined in the filename; for instance a file containing unsorted integers will be named txt. Implement the necessary functions to read and write such files.
  4. Use a function pointers to compare and sort the elements from the structure with respect to the data field. Implement the following sorting orders: increasing, decreasing, and random. The filename is txt, where sortingtype is rand, inc, or dec.
  5. Write a function to test the implementation.

Sample output:

Ex. 3 Research on POSIX

Write a few paragraphs about the POSIX standards. What are they, why do they exist, what kind of things are included in the norms.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] VE482-Homework 3[Solved] VE482-Homework 3
$25