In-class notes for 08/26/2020
CS 273 (OS), Fall 2020
Questions?
Reading questions?
Chapter 1
Chapter 10
Submitted questions on assignments and technology
Use this form to submit questions for a future class meeting
Reading questions
Expanded notes on topics from last time
Lab 2
(Start in-class; due later as part of HW3)
Selected Linux system calls
More file-related system calls
dup()
,pipe()
, etc.Each process has a kernel file descriptor array, with file descriptor as index and pointer to open-file data structures as values.
System calls for file systems, i.e., OS components that contain files and directories
mount()
,umount()
, etc.
Other components of an OS besides file system
Devices
ioctl()
, for setting parameters for an I/O (input-output) device (will return for code illustration)Berkeley socket calls, for network I/O (will return later)
Specialized device calls, e.g., time-related calls for interacting with clock device (will return)
Memory management
brk()
,sbrk()
, for adjusting how much main memory is allocated to a process.
Process management system calls
fork(), execve(), exit(), wait(), waitpid()
Example code: ~rab/os/egs/forkeg.c
(
fork()
,execve()
, andwait()
implement the key ideas in the Linux strategy for starting new programs.)zombie process -- process called
exit()
, but its parent hasn't calledwait()
for it to collect its exit status, so that exited process continues to take up OS resources.
< >