UNIX AND POSIX APIs APIs – a set of application programming

Slides:



Advertisements
Similar presentations
3.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Process An operating system executes a variety of programs: Batch system.
Advertisements

CSC 501 Lecture 2: Processes. Von Neumann Model Both program and data reside in memory Execution stages in CPU: Fetch instruction Decode instruction Execute.
Introduction to Processes
The Process Model.
CS 311 – Lecture 09 Outline Introduction to Systems programming – System calls – Categories of system calls Error Management System calls File Handling.
Unix Processes.
Page 1 Processes and Threads Chapter 2. Page 2 Processes The Process Model Multiprogramming of four programs Conceptual model of 4 independent, sequential.
1 CS 333 Introduction to Operating Systems Class 2 – OS-Related Hardware & Software The Process Concept Jonathan Walpole Computer Science Portland State.
Fork Fork is used to create a child process. Most network servers under Unix are written this way Concurrent server: parent accepts the connection, forks.
Inter Process Communication:  It is an essential aspect of process management. By allowing processes to communicate with each other: 1.We can synchronize.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
Advanced Programming in the UNIX Environment Hop Lee.
Process Description and Control A process is sometimes called a task, it is a program in execution.
Fork and Exec Unix Model Tutorial 3. Process Management Model The Unix process management model is split into two distinct operations : 1. The creation.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
The Programming Interface. Main Points Creating and managing processes – fork, exec, wait Performing I/O – open, read, write, close Communicating between.
1 Logging in to a UNIX System init ( Process ID 1 created by the kernel at bootstrap ) spawns getty for every terminal device invokes our login shell terminal.
1 Semaphores Chapter 7 from Inter-process Communications in Linux: The Nooks & Crannies by John Shapley Gray Publisher: Prentice Hall Pub Date: January.
8-Sep Operating Systems Yasir Kiani. 8-Sep Agenda for Today Review of previous lecture Process scheduling concepts Process creation and termination.
Linux Processes Travis Willey Jeff Mihalik. What is a process? A process is a program in execution A process includes: –program counter –stack –data section.
Operating Systems Process Creation
UNIX Signals * POSIX-Defined Signals * Signaling Processes * Signal Mask * sigaction * kill and sigaction * alarm * Interval Timers * POSIX.1b Timers *
Semaphores Chapter 7 from Inter-process Communications in Linux:
Silberschatz, Galvin and Gagne  Operating System Concepts Six Step Process to Perform DMA Transfer.
Process Description and Control Chapter 3. Source Modified slides from Missouri U. of Science and Tech.
CSCI 330 UNIX and Network Programming
Tutorial 3. In this tutorial we’ll see Fork() and Exec() system calls.
Operating System Components) These components reflect the services made available by the O.S. Process Management Memory Management I/O Device Management.
UNIX AND POSIX APIs APIs – a set of application programming
Exceptional Control Flow
Chapter 13: I/O Systems.
System Calls, Interrupts and Exceptions
Lecture 3 Process.
Module 12: I/O Systems I/O hardware Application I/O Interface
2. OPERATING SYSTEM 2.1 Operating System Function
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Protection of System Resources
Chapter 2: System Structures
Linux Processes & Threads
Chapter 3 – Process Concepts
Process Management Presented By Aditya Gupta Assistant Professor
UNIX System Overview.
Unix and Posix Standards
INTER-PROCESS COMMUNICATION
Example questions… Can a shell kill itself? Can a shell within a shell kill the parent shell? What happens to background processes when you exit from.
Tarek Abdelzaher Vikram Adve Marco Caccamo
Exceptional Control Flow: System Calls, Page Faults etc.
CGS 3763 Operating Systems Concepts Spring 2013
Fork and Exec Unix Model
Chapter 2: System Structures
Interprocess Communication
System Structure and Process Model
Operating Systems Lecture 6.
Operating System Concepts
13: I/O Systems I/O hardwared Application I/O Interface
CS703 - Advanced Operating Systems
CSE 333 – Section 3 POSIX I/O Functions.
Lab 5 Process Control Operating System Lab.
Process Description and Control
CSE 333 – Section 3 POSIX I/O Functions.
Operating Systems Lecture 3.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Chapter 3: Processes.
Intertask Communication
EECE.4810/EECE.5730 Operating Systems
Low-Level I/O – the POSIX Layer CSE 333 Winter 2019
EECE.4810/EECE.5730 Operating Systems
In Today’s Class.. General Kernel Responsibilities Kernel Organization
Module 12: I/O Systems I/O hardwared Application I/O Interface
System Programming: Process Management
Presentation transcript:

UNIX AND POSIX APIs APIs – a set of application programming interface functions that can be called by user’s programs to perform system specific functions

Common functions Determine system configuration and user information File manipulation Process creation and control Interprocess communication Network communication

API COMMON CHARACTERISTICS API return -1 to indicate the execution has failed Global variable errno is set with an error code Perror function prints diagnostic message of the error to the standard output or calls streeror with errno as argument

ERROR STATUS CODE :: MEANING EACCESS :: No access to perform an operation via a API EPERM :: a API was aborted because the calling process doesnot have superuser privilege ENOENT :: an invalid filename was specified to an API BADF :: a API was called with an invalid file descriptor EINTR :: a API excecution was aborted due to signal interruption

EAGAIN :: a API was aborted because system resource it requested was temporarily unavailable ENOMEM :: a API was aborted because it could not allocate dynamic memory EIO :: I/O error occurred in a API excecution EPIPE :: a API attempted to write to a pipe which has no reader

EFAULT :: a API was passed an invalid address in one of its arguments ENOEXEC :: a API could not execute a program via one of the exec API ECHILD :: a process doesnot have any child process which it can wait on