______ In-class notes for 09/09/2019 (CS 273 (OS), Fall 2019)
Home
>>     < >




In-class notes for 09/09/2019

CS 273 (OS), Fall 2019

Reading questions?

  • Chapter 1

  • Chapter 10

Selected Linux system calls

Some basic file system calls (highlights)

  • open(), read(), write(), close()

    • Can open for read-only, write-only, read or write

      OS creates an internal data structure for each open file
      User and System parts of a process

    • file descriptor (relationship to open-file data structure)

    • lseek() - change current position in file

    • ~rab/os/egs/mopen filename [-r|-w|-rw] ...

    • man open

      • Section 2; call syntax; O_READ, O_WRITE, O_APPEND

      • O_APPEND warning

    • Source code mopen.c

      • How to call a system call - read(), write(); try_open()

  • File properties

    mode bits; protection domains; umask

  • Directory operations

    (hard) links; symbolic links; unlinking; default directory




< >