Ch.03 Outline - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

Ch.03 Outline

Description:

Job(long-term), CPU (short-term) & swap (medium-term) Context ... Daemon, daimon : a divinity or a. manifestation of divine power in. ancient Greek belief ... – PowerPoint PPT presentation

Number of Views:68
Avg rating:3.0/5.0
Slides: 24
Provided by: top1
Category:
Tags: divinity | outline

less

Transcript and Presenter's Notes

Title: Ch.03 Outline


1
Ch.03 Outline
  • Process concept
  • Definition
  • Process states
  • PCB
  • Threads
  • Process scheduling
  • Queues
  • Job, ready, device

2
Ch.03 Outline (cont)
  • Process scheduling (cont)
  • schedulers
  • Job(long-term), CPU (short-term) swap
    (medium-term)
  • Context switch
  • Operations on processes
  • Creation
  • Termination

3
Ch.03 Outline (cont)
  • Cooperating processes
  • motivation
  • Consumer/producer problem
  • (shared memory)
  • Interprocess communication
  • Message-passing
  • Naming
  • Direct vs indirect

4
Ch.03 Outline (cont)
  • Interprocess communication (cont)
  • Synchronization
  • Blocking vs nonblocking
  • Buffering
  • Zero
  • Bounded
  • Unbounded

5
Ch.03 Outline (cont)
  • Comm in client/server systems
  • sockets
  • Remote procedure calls (RPC)
  • Issues
  • Remote method invocation (RMI)

6
PRESENTATION
  • Process scheduling (?3.2)
  • Queues
  • Job, ready, device
  • Process scheduling (cont)
  • schedulers
  • Job(long-term), CPU (short-term) swap
    (medium-term)
  • Context switch

7
PRESENTATION
  • Presentation (cont)
  • Operation on Processes(?3.3)
  • Creation
  • Fork, execlp, wait
  • Termination
  • Exit, abort, kill
  • PP. 83 92 in the text

8
processes
  • Slide 4.2
  • Compare program, process(job), task and thread in
    terms of size or work unit
  • job (early term)
  • Definition of above terms
  • Need of a stack data section
  • reentrant

9
Process states
  • Slide 4.4
  • Scheduling occurs when CPU is idle (timer
    interrupt, termination or I/O) or a process
    changes its state to ready (higher priority
    process)
  • Interrupted programs (by I/O not timer) are
    handled by interrupt stack and re-scheduling is
    not involved,i.e., no state changes

10
PCB
  • Slide 4.5
  • PCB
  • it is like a name or student id for a person
    and used for mgmt but it is not the actual being
    (as in file descriptor for files)

11
Exceptional conditions
  • Made a mistake
  • Slide 4.10 has a queue for wait for
    interrupt and I did not see that because of my
    prejudice
  • Exceptions are interrupts, traps, faults and
    aborts.
  • Executing process is suspended and control goes
    to the exceptions handler in the OS kernel.

12
Exceptional conditions
  • 1. Interrupts
  • asynchronous, signal from I/O devices external
    to CPU.
  • timer interrupts
  • put SP back in RQ and reschedule
  • other interrupts
  • put SP in current frame and adjust frame in
    interrupt stack for interrupt handler and process
    the interrupt.

13
Exceptional conditions
  • 1. Interrupts (cont)
  • continue I/O if more interrupts are expected
    (initiation, continuation termination). For
    termination, make any interrupt waiting process
    ready, if it exists.
  • the remaining classes of exceptional
    conditions(trap, fault, abort) occur
    synchronously as a result of current instruction
    execution.

14
Exceptional conditions
  • 2. Traps
  • For I/O, a new system process different
    from caller is created and enqued to that device
    que (I/O que). Schedule device ques and ready
    queue. Enque the suspended process to WIF queue
    and it will later become ready again by an
    interrupt.

15
Exceptional conditions
  • 2. Traps (cont)
  • For non-I/O, a new process may not be
    necessary and works like a usual procedure
    call/return except that caller executes in user
    mode and system calls in supervisor mode.
  • 3. Faults
  • Correct the problem if possible, otherwise
    abort (e.g. divide error).

16
Exceptional conditions
  • 3. Faults (cont)
  • Error correction requires system calls and
    works like a trap afterwards (page fault)
  • 4. Aborts
  • hardware error, abort system call
  • Terminate the process and reschedule.

17
schedulers
  • Slide 4.11
  • Job scheduler (long-term)
  • Input spooling
  • card reader (special handling in I/O)
  • manual interrupt as in KB, mouse
  • Degree of multiprogramming
  • Job mix (CPU or I/O bound)
  • Swapping (mid-term)

18
Process termination
  • Slide 4.18
  • Cascade
  • Cascading termination

19
Process communication
  • Process communication
  • Cooperating processes must communicate and
    synchronize their activities with others (slide
    4.19)
  • Shared memory (producer/consumer)
  • IPC (without shared memory)
  • direct indirect (slides 4.26-29)

20
Client/server comm
  • Client/server communication
  • Sockets concatenation of IPport
  • Port number identifies specific services e.g.
    telnet23, ftp21,etc.
  • RPC
  • Built on top of IPC
  • Stub on both sides

21
RPC
  • RPC (cont)
  • Parameter marshalling by stubs
  • Issues
  • External data representation (diff syss)
  • comm failure (timestamps)
  • binding of client and server ports
  • fixed or matchmaker daemon

22
Word power
  • Daemon, daimon a divinity or a
  • manifestation of divine power in
  • ancient Greek belief
  • Paradigm an example serving as a
  • model or pattern
  • a set of all inflected forms of a word
  • based on a single stem or root
  • ex. Boy, boys, boys, boys

23
homework
  • List and explain two major issues in RPC
    operation.
  • Solve exercise 4.6.
  • What is the main reason causing poor performance
    in message systems?
  • What is meant by process migration between
    different queues?
  • Solve problem 4.4.
Write a Comment
User Comments (0)
About PowerShow.com