CS208, Monday 21 Feb 2022
Today's office hours
- 9:45-11:00 (not 10:30-11:30--I have an un-reschedulable meeting at 11)
- Available for Zooming 3:00-4:00. Slack DM me if you want to talk.
This week
- More on concurrency
- Wrap up the command shell assignment
- Start the buffer overflow assignment
- Start virtual memory
Today
- C stuff (const; variations on char *)
- Process stuff (signals, background processes)
- Probably not enough time, but maybe: trouble in multi-processing paradise
char pointers
- charstar.c
- "hello", char *p, char p[10], &c
- What's the same? What's different?
- where do these things live in memory?
- two questions you should ask yourself (in many situations):
- what type is that thing?
- where does that thing live in memory?
- const
- execlp(...)?
Background processes
- the ampersand
- reading the "wait" manual page
- other systems of background processes (e.g. systemd)
Unix signals
- signals.c
- man signals
- Unix reference manual sections ("man 2 read" vs. "man read"; same with "kill")
More questions about the command shell
Shared memory and problems with concurrency