Starting from:

$25

VE482-Homework 3 Solved

Non-programming exercises:

Write in a neat and legible handwriting
Clearly explain the reasoning process
Write in a complete style (subject, verb and object) Progamming exercises:
Write a README file for each program
Upload an archive with all the programs onto Canvas
Ex. 1 — General questions
Why would a thread voluntarily release the CPU?
What is the biggest advantage/disadvantage of user space threads?
If a multithreaded process forks, a problem occurs if the child gets copies of all the parent’s 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?
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.

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.
Knowing that the void pointer in the structure could contain some char*, int, or double, write a search function for this linked list.
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.
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.
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.

More products