CSE 325 Operating Systems Lecture Notes

Thoughts on Appendix A and B

Thoughts on System Call Parameters

The actual hardware instruction takes an immediate integer code for which system call it is. Many syscalls may take 3 or more parameters.

In the lecture notes, it was noted that there are many ways that operating systems have employed to pass parameter information into system calls: registers, stack, "tables"...

Mailbox Question 8/31/22

Me and my partner have been trying to figure out the lab and have no idea what we are supposed to be looking for. So far we have figured out a total of two things that are on the stack but have no clue about anything else.
Thank you for the question; I love questions. Questions like this should be posed earlier than <24 hours before the lab is due, in order for there to be time to generate a response and still allow you to have time to utilize any help you receive. To have a clue about what you are looking at, you will have to pretty aggressively read all available documentation regarding the boot process. What addresses are printed out? What address does the boot start at? What instructions are in the boot assembler code? What opcodes are they, in binary? How does the x86 define/establish a "stack"? Does the boot assembler define/establish such a stack? At what address?

Mailbox Questions 9/2/22

Can I have a "mulligan"?
No, sorry. This proposal is unfair to others. But maybe Lab 1 will not be weighted as heavily as later labs.
Can I have a lab team of size 3 ?
This is unfair to others unless you get a supermajority to agree that all teams should be size 3, in which case assignments will be resized.
Can I have a lab team of size 1?
No. Per the syllabus, the learning outcomes for this course include management of a substantial group project.
After noticing the instruction portion was over at ~6:05pm, I was wondering if we could use lab time to go over the previous week's lab? It would be tremendously helpful to have a walk-through of the lab and the solutions to solidify understanding.
My understanding is that the last lab should have included a walk through of the previous lab, but a student requested that that not happen so that they could turn in the lab late, and the TA agreed. But in fact, class policy is that we don't take late turnins of labs. I will seek to clarify with the TA how they are spending the lab time.

Mailbox Questions 9/7/22

Where in the book are we?
I am following Dr. Zheng's notes, which may not correspond very closely to our book. I will try to tie them together via appropriate reading assignments.
I added my system calls for Lab 2, but my test program won't compile/link, what do I do?
User-level code must have two things to compile/link: the prototype and the actual function body. The prototype goes in: ___________. The body is generated by: ______________. Note that the user-level code links to system call functions without a sys_ prefix; the sys_ prefix is for the in-kernel implementations of those system calls. The connection between the two is a table mapping system call integers to function pointers. The table is named _________.

In-class Work on 9/9/22

Midterm 1 Distribution

95
90 90 91 91
86 87 88 88 89
82 83 83 84 84 85
80 80
79 79 79
77
73 73 74 75
72 72 72
67 67 68 68
62 63
58
54

Midterm Grades Discussion

Mailbag

I'm struggling a bit with mutex locks. I'm trying to replicate the spinlock but to work with the lock_t. I can't seem to figure out how to declare it as an actual struct. I can only declare it as an alternate definition of uint. The issue I'm running into is how the sleep is supposed to work. I'm just not seeing how to call the sleep function, as when I do I don't know how to get reference back to the process to wake it back up, as I cannot put a reference in the lock itself due to the lock only able to be an integer. Even so it seems like it always runs into a "panic: sched locks" when I'm basically reusing the spinlock code.
Great question. Before I try, how would you-all assist this colleague?

Midterm 2 Distribution

Extra credit has not yet been applied to your score as recorded, since it was entered in a separate place on Canvas.
86 87
82 83
75 76 76 77
-------------------- A line
67 67 67
63
60 60 61
-------------------- B line
56 56 56 57 57 57
52 53 54 54 54
49 50
-------------------- C line
46
42 43
40
37
-------------------- D line
31