Learning Goal: I’m working on a operating systems test / quiz prep and need an explanation and answer to help me learn.I will send the book and some notes with a brief preview, I need you to be here at 10:50 am to 11:45am EST on Friday so I can send you the questions and you send me the answers during that time the exam topics are here- lineno.c – mysh.c – strex.c – fork1.c, fork2.c, fork3.c, fork4.c- I’ll give a command to copy files that include a Makefile, xv6 source, etc. – When writing C code answers, you won’t have to modify any other files than the one given. – When you copy this code, you’ll get some C files for questions, e.g., q1.c, q2.c, etc. – The code will clearly show the part you need to copy-paste into Canvas answer.- C code – Manipulate arrays (like integer arrays) – Manipulate strings (character arrays) with string functions, and without functions – E.g., char *mystring = “abc”; – then mystring = ‘a’; mystring is going to 0 (terminator) – then *(mystring + 2) = ‘c’ – Work with argc and argv – Open, read, write, close files – fd = open(“filename.txt”, 0) — 0 == read – fd is a file descriptor (an integer) – use fd for future commands: – close(fd) – read(fd, num_of_bytes) – write(fd, bytes_to_write) – printf(fd, message_to_print_into_file) – Read input from keyboard- Processes (ch 4 & 5): – Fix broken code that does a fork/exec/wait pattern (perhaps missing some steps) – Write code that does a fork/exec/wait pattern – Explain a zombie is made, and how it is avoided – How to make a process execute two different kinds of code (e.g., some code that computes numbers, other code that interacts with user). – The point of this question is that when you run fork(), you get two copies of your program; – (one copy is parent, one is child) – (you can tell which is parent/child because fork() returns 0 if you’re the child) – you do not have to run exec() next – you can simply use an if() to run some code if you’re the child, and different code if you’re the parent – and parent should eventually wait() for child – How to run another program (like the shell does) – Answer questions about a process state table like Figure 4.4 in Ch 4 in OSTEP book- Time-sharing, “limited direct execution” (ch 6; stop at page 9): – Explain difference between user mode and kernel mode, and how to switch from user to kernel – User mode: where all “your” programs run (assuming you are not coding for the kernel) – For example, your programs include the shell, ls, cat, etc. etc. – Kernel mode: where the operating system (aka kernel) runs, has direct access to hardware – Bad kernel code can easily crash a machine, destroy files, etc. – Better to make sure this code cannot be used inappropriately – The CPU must support this concept of “privileges” or “ring levels” – When machine is booted, it starts in kernel mode – Switching between them is done one of two ways: – User -> kernel: user code must run a syscall like fork(), open(), etc. – Kernel -> user: starting/resuming a process and continuing where you left off in that code – Identify which “ring” goes with which mode – Explain purpose of “trap table”, and when it is created and by what (answer: OS) – Explain a figure like 6.2 (ch 6 in OSTEP), ignoring “kernel stack” parts – How process switching works: given a story, explain if it’s a “cooperative” approach or “non-cooperative” approach – Explain how non-cooperative mode works
Requirements: the exam time is 45 minutes | .doc file
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.Read more
Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.Read more
Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.Read more
Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.Read more
By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.Read more