Lecture 5 - Linux System Calls

Lecture 5 - Linux System Calls - Linux System Calls Unix...

Info iconThis preview shows pages 1–13. Sign up to view the full content.

View Full Document Right Arrow Icon
Linux System Calls
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Unix History Born in 1969 Brainchild of Dennis Ritchie and Ken Thompson Ported to different arch by Sun, IBM, SGI, HP, etc UC Berkeley made significant contributions in TCP/IP, VM and demand paging
Background image of page 2
Unix Overview Oldest commercial software that is still being used today Stable, robust, powerful and scalable Everything is a file ” concept Common file functions are applied to all entities In 1991, Linus created Linux Unix for i386
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Overview of UNIX OS System Call Interface Kernel Subsystems Device Drivers Hardware Application 1 Application 2 Application 3 User space Kernel space
Background image of page 4
Jobs of the Kernel In kernel-space Attend to system calls Attend to hardware interrupts In user-space Manage execution of an application (memory, cpu usage, etc)
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Interrupts Interrupt are issued when a hardware wants CPU attention Process is usually called Interrupt Request (IRQ) Used instead of polling to reduce CPU usage e.g. Button push Kernel executes an interrupt handler, entering the interrupt context
Background image of page 6
Types of Interrupts Maskable Interrupt (IRQ) Hardware interrupt that can be ignored Non-maskable Interrupt (NMI) Hardware interrupt that cannot be ignored (e.g. timers) Inter-processor Interrupt Special case for multi-processor devices Software Interrupt Generated by a processor by executing an instruction Used by System Calls
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Linux System Calls
Background image of page 8
System Calls Interface between applications and OS/hardware The kernel executes in behalf of the application The kernel is said to be in the process context Provide hardware abstraction Ensure security and stability User-space process can't mess up kernel
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
C Library and System Calls printf () C Library write() system call Application Kernel
Background image of page 10
API, POSIX and C Library Portable Operating System Interface (POSIX) A set of Application Programming Interfaces (API) for Unix The C Library implements main API (entry point) standard library System calls Majority of POSIX API are implemented in the Linux C libraries
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Typical System Calls Process Management Device I/O Timers Signals
Background image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 45

Lecture 5 - Linux System Calls - Linux System Calls Unix...

This preview shows document pages 1 - 13. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online