Optimize useful things not rarely used features good

Info iconThis preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: uld happen if we DIDN’T add this feature? Optimize useful things, not rarely used features good enough is good enough optimize the common case: example? Performance Performance (cont’d) Space-Time Trade-Offs Memory and CPU tradeoff Other tricks Use macros to save function call overhead #define max(a,b) a<b Keep critical regions as small as possible Performance Performance (cont’d) Caching: e.g. i-node cache To look up /usr/ast/mbox requires: 1. read i-node for root dir, 2. read the root dir, 3. read the i-node for /usr, 4. Read the /usr dir, 5. Read the i-node for /usr/ast, 5. read the /usr/ast/dir Other examples of caching? Performance Performance (cont’d) Caching exploits locality: temporal and spatial Other Examples of exploiting locality? Execution Execution Paradigms Architectural Coherence OS mechanisms should “hang together” Event-driven: Role Role of OS is a coordinator of user activities (threads) and generator of events Execution Execution Paradigms (cont’d) Algorithmic Role of OS is a service provider Systems Systems Mantras Be clever at high utilization! simple techniques work well at “low resource demands” Bulk operations work better than large number of smaller ones Indirection, indirection, …. That’s That’s All Folks Good luck on the final! Weds July 28 in the classroom, 12:20-2:20...
View Full Document

Ask a homework question - tutors are online