Operating System Definitions - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

Operating System Definitions

Description:

Time sharing. Real-time. Process. A program in execution ... Context switch time between two user-level threads in the same process is very fast ... – PowerPoint PPT presentation

Number of Views:21
Avg rating:3.0/5.0
Slides: 13
Provided by: ralphh
Category:

less

Transcript and Presenter's Notes

Title: Operating System Definitions


1
Operating System Definitions
  • Resource Allocator
  • Command Interpreter
  • Government

2
Operating System Types
  • Batch
  • Time sharing
  • Real-time

3
Process
  • A program in execution
  • A process stored in memory is executed when the
    contents of an operating system data area called
    the process control block is loaded into the CPU
    register
  • PC is the starting address of the program
  • The change from one process to another requires
    changing from one page/segment table to another

4
Thread
  • The components of both processes and threads are
    executable instructions
  • A process can be comprised of one or more threads
  • A switch from one thread to another in the same
    process does not cause a change to the
    page/segment table.

5
Context Switch
  • The switching from one process to another or one
    thread to another.
  • During a context switch, the CPU is performing no
    useful work.

6
Kernel-Level Threads
  • Dispatched through the kernel of the operating
    system by calls to the interrupt handler like
    processes
  • Switching between kernel-level threads is faster
    than switching between processes, but slower than
    switching between user-level threads

7
User-Level Threads
  • Scheduled at the user level, normally by library
    routines
  • Context switch time between two user-level
    threads in the same process is very fast

8
Concurrency
  • Multiple events competing with each other to
    occur

9
Real Concurrency Example
  • Consider 3 secretaries doing the following three
    different jobs
  • The first is answering questions asked by
    students who enter the office
  • The second is answering phone questions
  • The third is preparing a report
  • Three secretaries would probably perform these
    tasks faster than one could

10
Apparent Concurrency Example
  • One secretary is
  • Answering questions when students enter the door
  • Answering the phone
  • Preparing the report
  • In the middle of doing any of the tasks, the
    secretary could be interrupted to do another
  • At the end of the day the secretary would
    complain about doing a million tasks at once

11
Synchronization
  • Synchronization problems occur when
  • two or more processes or threads try to access
    the same shared memory location at the same time,
    where at least one of them is writing to the
    location
  • one process/thread must wait until another
    process/thread completes an event

12
Synchronization Problems
  • Synchronization is not a problem if only one
    process is executing on a single processor
  • Synchronization IS a problem when competing
    processes are executed on multiple processors
    (real concurrency)
  • Synchronization is also a problem when multiple
    processes are being executed on a single
    processor when interrupts are possible
Write a Comment
User Comments (0)
About PowerShow.com