3.ppt - Chapter3 n Areferencemodelfocuseson...

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

View Full Document Right Arrow Icon
Chapter 3
Background image of page 1

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

View Full DocumentRight Arrow Icon
Reference Model of Real-Time  n A reference model focuses on  the  timing properties  and  resource requirements  of system components and  the way  the operating system  allocates the  available system resources  among them.
Background image of page 2
Reference Model of Real-Time  n According to the reference model, a system  is characterized by: n   A  workload model  that describes the  applications supported by the system n   A  resource model  that describes the  system resources available to the application n   Algorithms  that define how the application 
Background image of page 3

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

View Full DocumentRight Arrow Icon
Processors and Resources n System resources: processors and resources n Processors –  active resources   Pn n Examples: CPUs, transmission lines, disks n Resources –  passive resources  Rm n Examples: memory, sequence number, database locks n Examples: computation job shares data with other  computations, data guarded by semaphores;  communication ACK sequence number
Background image of page 4
Critical Regions n While the CPU protects itself against  simultaneous use, the code that interacts with  the other serially reusable resources cannot.   Such code is called a  critical region .   n If two tasks enter the same critical region  simultaneously, a catastrophic error occur.
Background image of page 5

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

View Full DocumentRight Arrow Icon
Semaphores n The most common methods for protecting  critical regions involves a special variable  called a  semaphore . n A semaphore S is a memory location that acts  as a lock to protect critical regions.
Background image of page 6
Semaphores n Code that enters a critical region is bracketed  by calls to wait and signal.  This prevents more  than one process from entering the critical  region. n The wait operation suspends any program  calling until the semaphore S is FALSE,  whereas the signal operation sets the 
Background image of page 7

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

View Full DocumentRight Arrow Icon
void P(int S) { while (S == true); S = true; } void V(int S) { S = false; Semaphore is initialized to false. Process_1 . . . P(S) critical region V(S) . . . Process_2 . . . P(S) critical region V(S) .
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/18/2010 for the course ECE 3510 taught by Professor Staff during the Fall '08 term at Western Michigan.

Page1 / 32

3.ppt - Chapter3 n Areferencemodelfocuseson...

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

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