Docsity

Understanding the Role of an OS in Managing Computer Resources, Study notes of Operating Systems

Partial preview of the text

Download Understanding the Role of an OS in Managing Computer Resources and more Study notes Operating Systems in PDF only on Docsity!

COP 4600

Introduction To Operating Systems

Summer 2011

Introductory Material

Department of Electrical Engineering and Computer Science Computer Science Division University of Central Florida

Instructor : Dr. Mark Llewellyn [email protected] HEC 236, 407-823- http://www.cs.ucf.edu/courses/cop4600/sum

• In the most general sense an operating system is a

collection of system software routines that sit

between an application program and the computer

hardware on which that application is to be

executed.

What is an Operating System?

USER

Application program

Operating System

HARDWARE

between the^ The OS sits^ Interfaces application program and the hardware

The OS As An Intermediary

  • What’s an application?
    • Software to accomplish a task - Spread sheet, word processor, browser, email
    • What about system software? - Depending on who you ask, can be considered application programs, a computer resource, or part of the OS

What Is A Process?

ALGORITHM

ASSEMBLEROR COMPILER

PROGRAM

OBJECTCODE

LIBRARIES

EXECUTABLE LINKER CODE

LOADER

PROBLEM

PROCESS

Types of Operating Systems

  • Focus on two system resources
    • CPU (processor) Utilization
    • Main Memory Utilization
  • Utilization is measure of busy time over total study time (Tbusy/TTotal)
  • In the old days computers were
    • physically very large
    • but very small in terms of resources and capabilities
    • also very, very expensive
  • Important to achieve high utilization of resources

Early Systems

  • Instructions and data written in binary
  • Loaded using switches on front panel
  • Computers also had a few buttons
    • Halt, Run, Load, Set PC (displayed contents), Increment PC
  • Everything done by programmer there was no real “user” as we know them today
  • Very slow set up time
  • Very limited output (set PC and check lights)
  • CPU sat idle much of the time.
  • Very little wasted memory since RAM was so small.
    • Programmers always “squeezed” program into Main Memory

Early Systems - Software Innovations

  • Assemblers
    • Symbolic programming rather than 1s and 0s
    • 1:1 relationship between assembler statements and machine instructions
  • Linkers & Loaders
    • allowed the use of code libraries
    • didn’t have to rewrite common code
  • Compilers
    • Programming in High Level Languages (Fortran, COBOL)
    • 1:n relationship between a program statement and machine instructions
    • Eased programming task and improved operational efficiency.

Early Systems - People/Procedural Changes

  • Too much work for programmer
  • Division of labor became necessary.
    • Divided tasks between a programmer and professional operator
    • Operator could now organize the work more effectively and “batch” jobs
  • Batching
    • allows similar jobs to run sequentially
    • efficient use of system software
    • today, refers more to jobs which lack user interaction
      • Example, billing systems used by companies
    • still took long time to set up jobs
    • CPU frequently sat idle

Resident Monitor

  • Precursor to the Operating System
    • The beginnings of computer “self-governance”
  • Resident in memory all the time, Monitored operations
  • Primary task was job sequencing
    • In beginning read jobs sequentially from tape already prepared off-line
    • With disks, could select which jobs to run and when
      • Job Scheduling
  • Resident Monitors Improved:
    • CPU Utilization: Faster setup, less idle time.
    • Memory Utilization: Sharing of I/O drivers/code
    • Functionality: Accounting and run time & I/O limits.

The Beginnings of Multiprogramming

• With RM, had two programs running serially:

– Application - RM - Application - RM -

Application, etc.

– Application ran to completion before RM took

over

• Reduced CPU idle time between jobs but not

between I/O operations

– I/O speed very slow compared to CPU speed

– Much of I/O deals with accessing data (tape, disk)

Multiprogramming (cont.)

  • Need some way to perform CPU and I/O operations at the same time
  • Keep more than one user program in memory
  • Switch between programs during I/O operations

Operating System

Process 1

Process 2

Process 3

Multiprogramming (cont.)

  • More efficient use of system, less idle time.
  • Made possible because of reduced memory costs.
  • Created a whole new set of problems:
    • Memory Management
    • Protection Mechanisms
    • Job Scheduling
    • CPU/Process Scheduling
  • Improves resource utilization but not user interaction
    • “...manages the computer’s resources efficiently...”
  • What about conveniences
    • “...the user can execute programs conveniently...”

Other Operating System Developments

  • Real Time - Response time is critical
    • Hard Real Time
      • Industrial & Robotic controls.
      • Very small bounded delays.
      • Little use of swapping or secondary storage.
    • Soft Real Time
      • Immediate response not as critical.
      • Monitoring devices, etc.
      • Longer delays tolerated
      • Use of secondary storage & priority scheduling.

Other Developments (cont.)

  • Personal Computers
    • Many of the OS features we’ll study are incorporated in today’s PCs.
    • Change in priority since hardware is cheap and only a single user.
    • Greater emphasis on convenience than on efficiency
    • Ultimate in interactive – in a way, we’ve gone back to the early days
    • Adds new demands also – networking and multimedia.
  • Handheld Systems