notes6 - System Calls A way for program to get services...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: System Calls A way for program to get services from the operating system- Software interrupts generated by the program itself.- During the system call, the OS o checks arguments validity o enforces policy and security o performs the service requested- Example main printf() libc.print() libc.write syscall(SYS::write) kernel SYS_Write (check args, perform write function) Process A process is a program in execution. A program may have multiple processes running the same program. Each process will be a different instance of the same program. Ex. Ps e States of a process New ready running terminated \ / Waiting New process is being initialized Ready the process is a candidate to run in the CPU but there is another process currently running Running The process is currently using the CPU Waiting - Process is waiting for an event Terminated Process is exiting #running process <= #processors Most times processes are in waiting state Only programs that are CPU intensive may be in ready/running state most of the time (but these are exceptions) Interactive applications are mostly in waiting state- Word processors- Browsers- Mail reader Process Table Processes are represented in the kernel by entries in the process table data structure.- Process have an entry in this table- The size of the table determines the maximum number of processes in the system- This max is determined at boot time Diagram: pid + process_table- Each process table entry has o...
View Full Document

This note was uploaded on 01/30/2012 for the course CS 354 taught by Professor Staff during the Fall '08 term at Purdue University-West Lafayette.

Page1 / 4

notes6 - System Calls A way for program to get services...

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

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