Introduction - Operating System - Lecture Slides, Slides of Computer Science

These are the Lecture Slides of Operating System which includes Environment, Fundamental Goal, Programs, Time Line, User Programs, Versus, Operating System, Running, Symmetric Multiprocessing etc.Key important points are: Introduction, Environment, Fundamental Goal, Programs, Time Line, User Programs, Versus, Operating System, Running, Symmetric Multiprocessing

Typology: Slides

2012/2013

Uploaded on 03/27/2013

ekana
ekana 🇮🇳

4

(44)

370 documents

1 / 32

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Chapter 1: Introduction
“An operating system is similar to a
government. Like a government, it performs
no useful function by itself. It simply
provides an environment within which
other programs can do useful work” (p. 4)
[Bold added]
“The fundamental goal of computer systems
is to execute user programs and to make
solving user problems easier” (p. 5-6)
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20

Partial preview of the text

Download Introduction - Operating System - Lecture Slides and more Slides Computer Science in PDF only on Docsity!

1

Chapter 1: Introduction

  • “An operating system is similar to a

government. Like a government, it performs

no useful function by itself. It simply

provides an environment within which

other programs can do useful work” (p. 4)

[Bold added]

  • “The fundamental goal of computer systems

is to execute user programs and to make

solving user problems easier” (p. 5-6)

Consider the use of

a single CPU over time

  • Suppose we have two user programs

(machine language)

  • Show a time line of when user programs run

and when O/S runs

  • Think about how much CPU time O/S uses

versus the programs

user program 2

O/S user user program 1 program 1

O/S

time Docsity.com

What is the operating system

doing?

user program 2

O/S user user program 1 program 1

O/S

time Docsity.com

On (p. 6) the text says “an operating

system is always running”

BUT…

  • On a single CPU system, if a user program

is running, the O/S is not running (O/S not

using the CPU)!

  • In general, with symmetric multiprocessing

(p. 14), there may be times when the O/S is

not running (O/S is not using the CPU)

5

7

Views of an Operating System

  • Resource Allocator
    • Operating system manages or allocates resources
    • What resources?
      • CPU time, RAM Memory, disk & other I/O devices, interrupt numbers (IRQ’s), files, network ports & sockets, and other software resources
    • Who uses the resources?
      • Resource users: One or more user processes & threads
  • Control Program
    • Operation and control of hardware devices
    • Implements security and protection
    • Execution of user program to prevent errors and

prevent improper use of the computer

When is an Operating System

(OS) needed?

  • When we have multiple processes
  • When we have a need for a human user to

interface with the system

  • When we need security and protection
  • When we have common system (e.g.,

hardware) operations

  • we don’t want same code repeatedly within

multiple programs 8

10 Figure 1.5: How a modern computer system works (modified)

RAM

RAM

Docsity.com

  • Figure 1.4: Storage-device hierarchy

13

Protection

  • A main way that modern operating

systems provide protection is through use of

dual-mode hardware features

  • User-mode & kernel mode
  • Hardware boots in kernel mode ;

switches to user-mode when running user processes

  • System call or interrupt enables switch

back to kernel mode

Protection modes

  • User mode
    • limited access to RAM memory; just the

memory of a single program running

  • limited access to machine instructions;

illegal to execute I/O instructions,

interrupt management instructions and

some others

  • kernel mode
    • access to all RAM memory
    • access to all machine instructions
  • User vs. kernel mode implemented as a

bit in CPU Docsity.com^14

16

System Call

  • A means for application programs to access operating system functionality - Application program code (user programs) versus operating system implementation code
  • Some types of calls
    • Process control: E.g., create, load, execute
    • File operations: E.g., create, open, read, write
    • Device manipulation: E.g., request, read, write
    • Information: E.g., get or set process attributes
    • Communications: E.g., create connection, send or receive message
  • What (typically) differs between a system call and a function call?

17

Figure 1.10: Transition from User to Kernel Mode

time

19

History : Batch Systems

  • Punched card input
  • Job control cards
  • A “user” program starts & runs to completion
  • System then loads next program in queue (into RAM) and starts this next program
  • Single job (user program) in

memory

  • Human operator queues up jobs to be processed
  • Resident monitor (This is the OS)
    • Always in memory, interprets control cards, I/O device drivers
    • Operation: Loads program into memory, runs program to completion, loads next program, …
  • Issues
    • CPU idle during I/O operations
    • CPU time is wasted; CPU utilization is low Docsity.com

20

History:

Multiprogrammed Systems - 1

  • Multiple jobs (programs) in memory
  • Why?

Figure 1.9: Memory layout for a multiprogramming system