What is a batch processing system

Introduction to scheduling

Degree in computer science FHDW

Lecture:

Operating systems II

SchedulinG

1st quarter 2011

Lecture: 1 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: SchedulinG

Process schedulinG

What is the because?

Do you have eine idea for the fundamental

Procedure?

What criteria would you choose for SchedulinG-

Use procedure?

What do you think what procedure when

Implementation of current BS in practice

Application finthe?

Lecture: 2 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: SchedulinG

Process schedulinG

E.in (Scheduler = control program) is eine arbitration logic that supports the

execution of several processes over time in Operating systems regulates.

Process scheduler can be roughly used in preemptive and

non-interruptive (non preemptive, also called cooperative)

split up. Non-interruptive schedulers allow einen process,

after the CPU eintimes has been allocated, run until this

releases it again on its own initiative or until it blocks. Interrupting

Schedulers divide the CPU from the startin only for eine certain

Time span and then withdraw it from the processin again.

Next is eine distinction in "work-conserving "and" non workconservinG"

Strategies possible. E.ine scheduler strategy works "workconservinG",

if the Switching between processes only eine

negligible geringood time in Claims. [1] One can

differentiate between different systems, in which each different

Requirements are placed on the scheduler:

Batch processing systems

ininteractive systems

Real-time systems

Lecture: 3 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: SchedulinG

Process scheduling goals

The allocation of the CPU to the processes should

best possible, whereby (depending on

executing system) howeverings different

Goals can be pursued:

Generalin

Fairness: Kein Process should be disproportionate

have to wait a long time while ein another

is preferred.

Balance: The processes should send the CPU to eine

Be allocated in a manner thes also others

Resources such as hard drive, network interface

e.g. busy sind.

E.incompliance with the system rules

Lecture: 4 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: SchedulinG

Process scheduling goals

Batch processing systems

CPU usage: The CPU should be at all times

busy sein. It shouldn't happen thes the

CPU is idleindet, just because ein process

waiting for data from the hard drive.

Throughput: The number of completed tasks per

Timeinunity should be maximized. This gives eine

strategy similar to utilization

but more the actual result.

short turnaround time (lead time): The time that

from arrival einit process up to seinhe

complete termination passes, minimiert

become.

Lecture: 5 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: SchedulinG

Process scheduling goals

Interactive systems (dialogue systems)

Fast response times: The waiting times of the

User (or other systems) should minimiert

become. Processes that eine interaction with the

Users require, so should be preferred

in front of those in the Hinunderground takes placeinthe can.

Proportionality: The response times of different

Processes should meet the expectations of the user

correspond. Are processes (such as the

Close einer application) by the user as

Put simply, they should also be quick

are executed.

Lecture: 6 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: SchedulinG

Process scheduling goals

Real-time systems

Deadlinit einhold

Predictability: Important for multimedia

Applications (otherwise e.g.

Deterioration of the sound quality threatens)

Lecture: 7 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: SchedulinG

Process scheduling strategies:

Strategies

The scheduler's biggest problem is that

Fact, thes the resources required

for the eindo not individual processes in advance

known sind. So it can be in the

Generalinen keine optimal planning

create, but the scheduler has to

dynamically to changing requirements

react. Here (depending on the

Scheduler) various

Allocation strategies to the Einsentence come.

Amongst other things:

Lecture: 8 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: SchedulinG

Process scheduling strategies:

First-Come First-Served (FCFS, FIFO): Here

become all processes in the order of theirs

E.ingangs processed. E.ine reallocation of

Processes findet only takes place when the current one

Process beg to waitinnt or seine execution

This strategy achieves eine good

Load with regard to the CPU, howeverings not

with regard to resources that are used for a longer period of time for eine

Requirement may need such. B. E.in-

/ Output or mass storage. For

Multi-user systems is the strategy above

Hinfrom little suitable, as einindividual users like this

possibly for a longer period of time (namely with complex

Processes of other users) excluded

become.

Lecture: 9 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: SchedulinG

Process scheduling strategies:

Shortest Job First (SJF, SPT) is ein

further procedure, the not for

Multi-user systems is suitable. SJF lets

yourself in Cases einput, in To whom the

required computing time for einindividual tasks

Well predicted from experience

can be. E.in Disadvantage is thes great

Processes may never be allocated the CPU

when getting shorter and shorter jobs

queue jumping.

Lecture: 10 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: SchedulinG

Process scheduling strategies:

Shortest Remaining-time, shortest

Remaining-Processincorresponds to g-time

the SPT procedure. Unlike the SPT

Procedure is here ein Process change

carried out if ein new arriving

Process eine shorter execution time

than the remaining of the current one

Process.

Lecture: 11 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: SchedulinG

Process scheduling strategies:

Round Robin (Time slice method):

E.inIn the process, the CPU for eine

assigned a certain (short) period of time.

After that, the process starts againinth in the

Queue einlined up.

Lecture: 12 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: SchedulinG

Process scheduling strategies:

Earliest Due Date: With this strategy

those processes will be first

executed which the geringuests Deadline

to have. Prerequisite for this seeind static

Deadlines and simultaneous Einmeet from

einother independent tasks. This

non-interruptive procedure is ideal to get around

the maximum delay to minimitate.

Lecture: 13 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: SchedulinG

Process scheduling strategies:

Priority scheduleing: With this strategy, everyone will

Process eine assigned priority. The processing takes place

then in the order of priorities. Since it is then

(inwithin the same priorities) by eine strategy of the

E.insequence is this procedure

mostly still ein Subordinate to time slice method

(This is called, among other things, multilevel feedback

Queue scheduling, Shortest-Elapsed-Time (SET)) to

anyway eine to enable fast response time.

In addition, will in the popular schedulers

dynamic priorities worked, taking priority

einit process increases with time, thus also low

prioritized processes will be processed at some point and

not constantly displaced by higher-priority processes

become.

Lecture: 14 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: SchedulinG

Process scheduling strategies:

termindependent scheduling: This

Strategy comes mainly in

Real-time systems. The

Processes preferentially processed as

first ends sein have to. So that's it

possibleine definized response time for

to guarantee certain processes.

Lecture: 15 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: SchedulinG

Process scheduling Procedure:

Scheduling-procedure I.

Completely Fair Scheduler (CFS), the latest scheduler from

L.inux since 2.6.23

CoschedulinG

COVERT (Cost Over Time)

Deadline Monotonic Scheduling (DMS)

Earliest Deadline First (EDF) (planning according to deadlines)

Fair share scheduleinG

First Come First Serve (FCFS) or First In - First Out

(FIFO)

Generalized Processor Sharing (GPS)

Group schoolinG

Highest Response Ratio Next (HRRN)

Least Laxity First (planning according to scope)

Least recently used (LRU)

Lecture: 16 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: SchedulinG

Process scheduling Procedure:

Scheduling procedure II

Lottery scheduleinG

Multilevel feedback queue

Plan by searching

Priority scheduleing (PS)

Priority Exchange Server

Rate Monotonic Scheduling (RMS) (planning according to monotonous rates)

Round robin-Strategy

Shortest job first

Shortest-Process-Next (SPN)

Shortest Remaining-Time (SRT)

Soft_affinity (SA)

Sporadic SchedulinG

Three-level scheduleinG

Weighted Round Robin (WRR)

Lecture: 17 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: SchedulinG

Scheduling procedure

Completely Fair Scheduler (CFS) (Scheduler for Linux since 2.6.23)

The Completely Fair Scheduler (CFS for short) is ein Process scheduler

in of computer science. Such schedulers are used to set the priority

of program sequences at the kernel level of operating systems

manage. CFS was developed by Ingo Molnár and replaced with the

L.inux kernel version 2.6.23 in October 2007 the previously implemented

O (1) scheduler.

The CFS guarantees eine fair allocation of processor time. He renounces

in contrast to the O (1) scheduler on heuristics and statistics. in the

Ideally, every task with CFS runs quasi-parallel in same

Speedinage. The CFS knows keine runqueue, keine timeslices and

kein Array switching because it kein expired array there. Instead it is

each process ein wait_runtime value assigned to

Nanosecond is precisely determined, and eine makes a statement about

how long the process on seine Waiting for execution. The one process

with the highest wait_runtime is selected. The structure is ein to

the wait_runtime uses sorted red-black tree. [1]

Lecture: 18 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: SchedulinG

Process schedulinG

Basic procedure

Criteria for Scheduling procedure

Round robin-SchedulinG

Priority schedulinG

Multiple snakes

Shortest job first

Guaranteed scheduleinG

Two-stage scheduleinG

Implementation in the current BS in the

practice

Lecture: 19 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: SchedulinG

Detailed discussion of the scheduling procedure

Different criteria

Advantages and disadvantages of the different procedures

Round robin-SchedulinG

Priority schedulinG

Two-stage scheduleinG

Implementation in the current BS in practice

Example Windows NT 4.0

Structure and architecture of Windows-NT 4.0 (see

also white paper)

Lecture: 20 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: memory management

Memory management

Storage management tasks

E.inmultiple memory management

Fragmentation (instar / external)

Relocation

Organizational forms (bitmap, chained

Lists ..)

Virtual memory

Segments, pages, page frames

Lecture: 21 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: memory management

Generaline memory management

Virtual memory management

Paging / Demand PaginG

CachinG

SwappinG

Various realizations with current

Operating system variants

Translation LookAside Buffer (TLAB)

ThrashinG

Localityinzip

Working set

Lecture: 22 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: memory management

Memory management using the example of Linux

PaginG

The virtual memory model

The page table in detail

Page Allocation and Page Deallocation

Memory maping & Demand PaginG

CachinG

The different caches

SwappinG

Paging out memory pages

The Kernel Swap Demon (kswapd)

Freeing up memory pages

Lecture: 23 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: memory management

Memory management at Linux

Paging, caching, swappinG

E.in- / output system

conditions

Physical E.in- / output system

Tasks einit's device driver

Polling / interrupt

Logical E.in- / output system

File management

File concept (file, file system)

Lecture: 24 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: file management

File management

File concept (file, file system)

File organization logical structure

Forms of access

Sequential access

Random access

Index sequential access

Storage allocation and management

Directories

Volume organization

Example: virtual machinen and file systems

Lecture: 25 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: file management

Volume organization

Security and access protection

Performance improvements

System services for file management

Practical examples for the Einsentence of

File systems (MS-DOS, NTFS, ext2 ...)

Lecture: 26 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


Operating systems: updates

After briefly repeating the

most important terms and

Relationships become current

Developments and tendencies in the environment

the operating systems and networks for

Motivation given.

What did you hear about?

What is needed?

Various application / Einsentence areas

Cost / benefit considerations

Practical examples and outlook

Lecture: 27 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


END

Ask?

Lecture: 28 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg


swell

Tannenbaum, Andrew, Modern Operating Systems

M. Weber, set of slides, Ulm University

Microsoft whitepapers

Novell Brainshare 2004

Novell Papers 2003/2004

Novell Tour 2004

Presentation Oracle 2004

Presentation Targosoft 2004

Presentation Matsushita 2004

Lecture: 29 Operating Systems / Networks II

2011 Prof. Dr. G. Hellberg