4.4 BSD chap.4.14.3 process management - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

4.4 BSD chap.4.14.3 process management

Description:

SSLEEP awaiting an event. SSTOP process stopped or being traced ... Whenever a process must awaits the availability of the resources or the arrival of an event ... – PowerPoint PPT presentation

Number of Views:39
Avg rating:3.0/5.0
Slides: 15
Provided by: wonk
Category:

less

Transcript and Presenter's Notes

Title: 4.4 BSD chap.4.14.3 process management


1
4.4 BSD chap.4.14.3process management
  • ??
  • -_-v

2
Intro to productionmanagement
  • When written in C, multiprogramming was
    introduced.
  • Process operation-user mode
  • -kernel mode
  • Resources-user mode
  • -kernel mode
  • Multiprogramming-context switching
  • -scheduling

3
Scheduling
  • Periodically recalculated on various parameter
  • Initially high execution priority given
  • And then lowered
  • When raised?
  • AnsWhen inactive
  • Minimize thrashing

4
Process state
  • Completely reorganized to support multiple
    threads
  • But kernel-thread support not enabled, cause C
    library not rewritten

5
  • process
  • entry

Machine dependent Process
informatiom
Process group
session
Process credential
User credential
Region list
VM space
File descriptor
File entries
Resource limits
Protocol control block Process kernal stack
statistics
Signal action
6
Process states
  • SIDL intermediate state in processcreation
  • SRUN runnable
  • SSLEEP awaiting an event
  • SSTOP process stopped or being traced
  • SZOMB intermidiate state in process
    termination

7
Process A
P_pptr
P_children
Process B
P_children
P_pptr
P_pptr
P_pptr
Process C
Process D
Process E
P_sibling
P_sibling
8
Process-scheduling priorities
  • p_usrpri field, p_priority
  • Priorities range from 0 to 127
  • User-mode priorities range from PUSER(50) to127
  • sleep()
  • tsleep()

9
User structure
  • The process state that may be swapped to
    secondary storage
  • Execution state etc.
  • Historically user-structure was mapped to a fixed
    location in the virtual adress space, but not
    now!!

10
Context switching
  • In effort to share the CPU effectively
  • Voluntary involuntary context switching
  • It needs the kernel user-mode context to be
    changed
  • Low-level context switching

11
Voluntary context switching
  • Whenever a process must awaits the availability
    of the resources or the arrival of an event
  • Invokes sleep()
  • lbolt()
  • To collect the termination status of children

12
Sleep routines steps
  • Prevent interrupts by raising the
    Hardware-processor priority
  • Record the wait channel and hash the value
  • Set the processs priority to that the process
    will have, when awaken
  • Place the process at the end of the sleep queues
  • Call mi_switch()

13
Wakeup routines step
  • Remove the process from the sleep queue
  • Recompute the user-mode scheduling priority if
    needed
  • Make the process runnable and place it on run
    queue

14
Synchronization
  • Locked flag and wanted flag
  • See table 4.3 for interrupt-priority assignment
  • splx(s) reset priority level to previous
    value
  • Uniprocessor architecture theme
Write a Comment
User Comments (0)
About PowerShow.com