chapter 3 operating systems introduction to cs 1 st semester, 2015 sanghyun park

15
Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park

Upload: meagan-manning

Post on 25-Dec-2015

223 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park

Chapter 3Operating Systems

Introduction to CS

1st Semester, 2015 Sanghyun Park

Page 2: Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park

Outline History of Operating Systems Operating System Architecture Coordinating the Machine’s Activities Handling Competition Among Processes (skipped) Security (skipped)

Page 3: Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park

History of Operating Systems An Operating System (OS) controls and coordinates usage of a

machine’s __________ (CPU, memory, disks, …)

Single-processor machines in 1940s and 1950s Significant preparation of mechanical equipment to run a program Execution of a program → ____

Separation of users and equipments(introduction of computer operator concept) Submit program to operator to run,

along with any required ____ and special _________ Operator _____ program materials into machine’s mass storage Batch processing – the execution of jobs by collecting them in a single

_____, then executing them _______ further _________ with the user

Page 4: Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park

Batch Processing

___ interaction with the program once submitted

Page 5: Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park

Interactive Processing

What happens when we have multiple users? Time-_______ solution (time slices) In single-user systems usually called ___________

Page 6: Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park

Software Classification

Application: spreadsheets, games, program development software

Utility: utility to format a disk, copy a file, utility to handle network communication

Operating system

Page 7: Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park

Operating System Components

Shell: ________ between users and operating systems

Modern computers have a _____ shell

Window manager: component within the GUI shell

Kernel: ______ part of an OS

Page 8: Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park

OS Kernel Software Components File manager

Coordinates use of machine’s mass _______

Device drivers Controls operation of machine’s ________ devices (printer, monitor, …)

Memory manager Coordinates machine’s use of main ________

Scheduler Determines which ________ is executed ______

Dispatcher Controls allocation of _____ slices to activities

Page 9: Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park

Boot Strapping in OS

Page 10: Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park

File Manager Keep ________ of files stored in secondary storage

_________ of each file Which users are allowed to access which files _________ space in secondary storage

Group files into a bundle called a __________ or folder

A directory may contain other directories called ____________

A chain of directories within directories is called a directory _____

Provide means to access files (open and manipulate files)

Page 11: Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park

Memory Manager Charged with the task of coordinating the machine’s use of main

memory

Such duties are minimal in ‘one task at a ____’ environment The program for the current task is placed in main memory, executed,

and then replaced by the program for the next task

The duties are extensive in _________ or multitasking environment Many programs and blocks of data reside in main memory concurrently Allocate areas of memory for each program Fulfill memory requirements for programs Keep track of memory areas no longer occupied

Page 12: Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park

Virtual Memory When total main memory required _______ actually available?

Memory manager creates _______ of additional memory space by ________ programs and data back and forth between main memory and secondary storage

Illusionary memory space is called _______ memory Memory requirements are allocated in units called ______

(page size < 4KB)

When a main memory of 256MB is required,but only 128MB is actually available? Memory manager _______ contents of pages in secondary storage When a page in secondary storage is needed for access,

_____ it in main memory If no space in main memory, _____ some other page no longer required

to secondary storage

Page 13: Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park

Concept of a Process Distinction between a program and the activity of executing a program

Program static set of directions

Activity of executing a program dynamic activity known as a ________

Process state Current ________ in the program being executed (value of PC) _______ in other registers and associated memory cells

A single program can be associated with ___________ one process

In a time-sharing computer, processes _________ for time slices

It is the task of operating system to coordinate these processes

Page 14: Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park

Process Administration (1/2) The tasks associated with process coordination are handled by the

_________ and _________ within OS kernel

Scheduler Maintains a block of information in main memory called _____________ When a new task is assigned to machine, creates a process for that

task by placing a new _____ in the process table Memory area assigned to process (from memory manager) Process priority Process status (ready, waiting for some event (I/O for example))

Determines which activity is executed first

Dispatcher Ensures that the scheduled processes are actually executed Divides time into time slices (quantum) Process __________

Page 15: Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park

Process Administration (2/2)

At interrupt CPU completes current machine

_____, _______ current process state, and transfers control to an _________ handler

Interrupt handler is part of dispatcher

Dispatcher Selects a _____ process from the

process table (highest priority) _______ time circuit for the next

interrupt Allow selected process to ______

execution

Sometimes, the process time sliceis terminated ______ the timer expires(for example when executing I/O)