In-class notes for 11/11/2020
CS 273 (OS), Fall 2020
HW12, first submission due (at least in part) today at "midnight"
Deadlock questions (available last week)
Security - questions on Chapter 9 (discussed today and Friday)
Practice final, example of a final exam, indicating potential content, length, etc.
Either submit two questions from the practice final
OR submit any other two review questions of your choice.
Project due on Saturday 11/14 at "midnight"
Complete submission instructions available on Friday.
See below for more help towards a minimal basic assignment
System-call project: An example minimal basic assignment
Example project ideas - consider first idea, adding a new field to
task_struct
Notion of
task_struct
object per processProcesses document has links to beginning and end of
task_struct
in the online hyperlinked source code.Safe to add a new
int
field near the end oftask_struct
, according to code documentation
Plan for system calls (choose your own names...):
putval(val)
, assigns non-negative integer valueval
to the new field.getval1()
, returns the (non-negative integer) value of the new field for the current process)getval(pid)
, returns the (non-negative integer) value of the new field for the process with process idpid
)
The middle system call
getval1()
is for testing, as described belowUse the system call index page to find source code for particular system calls, as a research technique.
Example:
getpid()
You will need to find task_struct data structure for particular processes
current
(as ingetpid()
Given a pid, how can you find that process's
task_struct
?
Security and protection
-
Be educated about security as a user, system administrator, implementer and/or designer.
Think security throughout design and implementation
Make security design simple and verifyably correct
Beware of unsafe assumptions upon which security depends.
Give the least possible access in every conceivable way.
Seriously test security
Security/convenience tradeoff.
Exercise: Think of current-day computing examples where these principles would help
< >