This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full 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.
- Fall '08
- Operating Systems