{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

View Full Document Right Arrow Icon
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.
Image of page 1

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

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}