Data Access and Storage
In this module, we will learn about the two key abstractions that operating systems provide to processes in order to organize and represent data. First, we will study the basics of memory management, and dynamic allocation. Next we will study the fundamental concepts and abstractions that make up a file system, and explore how these abstractions are realised in both the high-level C standard I/O library, and in the low-level POSIX system call interfaces. And, we will compare and contrast these abstractions from a systems programming perspective, while investigating the connections between them. By the end of this module, students will be able to work with allocated memory, understand the basic concepts and abstractions of file systems, be able to use the facilities provided by both the C library and POSIX system calls to perform file system tasks, and finally be able to demonstrate the relationship between the standard library and the underlying system calls that it is built on top of.
Module Learning Outcomes
After successful completion of this module, you will
Understand and explain the fundamental abstractions of a file system
Structure and organization
File access, permissions, and representation
C streams concepts
POSIX-specific concepts
Write C programs that use the C standard I/O library features to,
Manage and work with dynamically allocated memory
Open, read from, write to, and close files
Select appropriate file buffering modes
Use file positioning to access structured data
Handle errors and end-of-file conditions
Write C programs that use POSIX system calls to do all of the above, and,
Appropriately use blocking and non-blocking I/O
Use polling to manage simultaneous input streams
Inspect and manipulate file meta-information
Navigate and manipulate file system structure
Manipulate files of different types
Write an implementation of the C standard I/O library using POSIX system calls