Operating Systems 2021F Lecture 23

From Soma-notes
Revision as of 14:45, 9 December 2021 by Soma (talk | contribs) (Created page with "==Video== Video from the lecture given on December 9, 2021 is now available: * [https://homeostasis.scs.carleton.ca/~soma/os-2021f/lectures/comp3000-2021f-lec23-20211209.m4v...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Video from the lecture given on December 9, 2021 is now available:

Video is also available through Brightspace (Resources->Class zoom meetings->Cloud Recordings tab)


Lecture 23

Final is on December 16th, 7-9 PM
 - if you have accommodations, the timing might be a bit different

I can potentially have the final earlier in the day for some, let me know
 - but I need it to be fixed time

Final is same format as midterm
 - no proctoring software
 - but there will be interviews, ideally the week of Dec. 27th,
   but if necessary the week of January 3rd.
     - so everything will be graded by then
     - if week of Jan 3rd, final grades will be submitted,
       but I can submit a change of grade if things go up

Practice questions
 - that's the assignments and the midterm
 - I suggest making up your own

I will have an optional review session on Dec. 14th
 - will be recorded, but I will have no prepared material

Final exam is open book/open note/open internet

But here's a hint - online isn't your best choice
 - if you look up more than a few questions, you are doing it wrong
 - takes up too much time, and will often mislead you

Look to the textbook when the tutorials/assignments feel unclear
 - they will provide lots of context

atomic - something that is "indivisible"
 - so an atomic operation can't be divided, it all happens or none of it happens
 - in databases, we make things indivisible with transactions
    - but that just means we undo changes if we can do them all

What is the heart of concurrency problems? TOCTTOU
 - "time of check to time of use"
 - data changes between the time you check it to the time you modify/use

 - Anywhere you check data and then do something based on that test
   is where concurrency issues can bite you
     - which is all over the place

single-threaded processes really minimize concurrency issues
 - minimal concurrency issue inside a process (except signals)
 - between process concurrency is managed through system calls
    - which from a process perspective are mostly atomic
    - and there are mechanisms to enfore mutual exclusion for communication, e.g. pipes

What is ioctl?
 - a system call that is device specific
    - basically, a way to send custom messages to a device driver
 - NO uniformity, so can make it whatever you want
 - very old fashioned, not preferred nowadays but still used

Mental model: ioctl lets you control a device
 - e.g., if it is a tape drive, lets you eject a tape
 - things that don't fit into a classic file API model

You may volunteer for final interviews
 - will have plenty of time!
   - may have to extend into Winter term