coding examples from CS170 operating systems lectures