Docsity

System Call Interface in Operating Systems: Process and File Management - Prof. Gregory D., Study notes of Operating Systems

Partial preview of the text

Download System Call Interface in Operating Systems: Process and File Management - Prof. Gregory D. and more Study notes Operating Systems in PDF only on Docsity!

usf CSCS

UNIVERSITY of SAN FRANCISCO department of computer science

System Call Interface

CS 326 Operating Systems Greg Benson

System Calls Revisited

Systems calls and their parameters define the user-kernel interface

This interface provides functionality to user processes:

Process management

File and directory management

Others: I/O, time, memory, environment

Main UNIX Abstractions

Processes

PIDs (process IDs)

Files

FDs (file descriptors)

Process Concepts

Main issues:

Create and name processes

Synchronize processes

Process relationships (parent, child, ancestors)

Keeping track of resources (freeing resources)

User-level data types and operations:

PID, exec, wait, kill, signals

Possible Scenarios

Parent/Child

Parent waits for child, child exits later

Child exits, parent waits

Parent waits, child dies (exits)

Parent may wait for several children

Parent dies, child exits later

Files

File Descriptors

Small non-negative integers

Used to index a kernel-level file descriptor table

Used for console I/O and file I/O (also network I/O)

Operations

create, remove, open, read, write, seek, tell, close

Notes on Operations

create/remove

open/close

read/write

seek/tell