A1_OS Review - Basic Operating System Concepts A Review...

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

View Full Document Right Arrow Icon
Basic Operating System Concepts A Review
Background image of page 1

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

View Full DocumentRight Arrow Icon
Main Goals of OS 1. Resource Management: Disk, CPU cycles, etc. must be managed efficiently to maximize overall system performance 2. Resource Abstraction: Software interface to simplify use of hardware resources 3. Virtualization: Supports resource sharing – gives each process the appearance of an unshared resource
Background image of page 2
System Call An entry point to OS code Allows users to request OS services API’s/library functions usually provide an interface to system calls e.g , language-level I/O functions map user parameters into system-call format Thus, the run-time support system of a prog. language acts as an interface between programmer and OS interface
Background image of page 3

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

View Full DocumentRight Arrow Icon
Some UNIX System Calls System calls for low level file I/O creat(name, permissions) open(name, mode) close(fd) unlink(fd) read(fd, buffer, n_to_read) write(fd, buffer, n_to_write) lseek(fd, offest, whence) System Calls for process control fork() wait() execl(), execlp(), execv(), execvp() exit() signal(sig, handler) kill(sig, pid) System Calls for IPC pipe(fildes) dup(fd)
Background image of page 4
Execution Modes (Dual Mode Execution) User mode vs. kernel (or supervisor) mode Protection mechanism: critical operations (e.g. direct device access, disabling interrupts) can only be performed by the OS while executing in kernel mode Mode bit Privileged instructions
Background image of page 5

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

View Full DocumentRight Arrow Icon
Mode Switching System calls allow boundary to be crossed System call initiates mode switch from user to kernel mode Special instruction – “software interrupt” – calls the kernel function transfers control to a location in the interrupt vector OS executes kernel code, mode switch occurs again when control returns to user process
Background image of page 6
Processing a System Call* Switching between kernel and user mode is time consuming Kernel must Save registers so process can resume execution Other overhead is involved; e.g. cache misses, & prefetch Verify system call name and parameters Call the kernel function to perform the service On completion, restore registers and return to caller
Background image of page 7

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

View Full DocumentRight Arrow Icon
Review Topics Scheduling Synchronization Memory Management File and I/O Management
Background image of page 8
Review of Processes Processes process image states and state transitions process switch (context switch) Threads Concurrency
Background image of page 9

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

View Full DocumentRight Arrow Icon
Process Definition A process is an instance of a program in execution. It encompasses the static concept of program and the dynamic aspect of execution. As the process runs, its context (state) changes – register contents, memory contents, etc., are modified by execution
Background image of page 10
Processes: Process Image The process image represents the current status of the process It consists of (among other things) Executable code Static data area Stack & heap area Process Control Block (PCB): data structure used to represent execution context, or state Other information needed to manage process
Background image of page 11

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

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

This note was uploaded on 12/14/2011 for the course CS 690 taught by Professor Staff during the Fall '11 term at University of Alabama - Huntsville.

Page1 / 53

A1_OS Review - Basic Operating System Concepts A Review...

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

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