Operating Systems 2019W: Assignment 4
This assignment is not yet finalized.
- [2] When you hit Ctrl-C while running the bc command, does the Ctrl-C generate a signal? How do you know?
- [2] Does bashreadline report commands given to bash via shell scripts? How do you know?
- [2] How can you modify 3000pc so the producer stops on the third time it fills its queue? Give your code as a diff -c versus the original 3000pc
- [2] Under what conditions would 3000pc never send a signal (from the producer to the consumer or vice versa)? How could you modify 3000pc so this occurance was more likely?
- [2] Implement and critique your own version of sem_wait() and sem_post() in pure C with no system calls. Do you think your version is free of race conditions? Explain.
- [2] Change 300pc so that uses a shared memory mapped file rather than simply shared memory to communicate between the producer and consumer. How big is the file? Does its size change?
- [2] How difficult is it for a userspace process to generate truly random numbers on its own, without the assistance of the kernel? Explain.
- [2] Does the ssh command use random numbers? How can you demonstrate this?
- [2] Can a setuid root process give up its privileges and run as a regular user? Is this change necessarily permanant?
- [2] What are the main factors that influence whether the attacker wins the race with 3000run-write? Explain what it means for the attacker to win.