Sie sind auf Seite 1von 3

Notes for 4th semsester’s project exam 12.6.

2009

Notes for 4th semsester’s project exam

Project related theories


Scheduling
Scheduling is decides how to commit resources to a variety of possible tasks

Scheduling algorithms
Fair queuing: asdf

Used in network handling, processing queues.

Task scheduling
Operating system scheduler implementations
http://en.wikipedia.org/wiki/Scheduling (computing)
Linux 2.5 - 2.6: Multi-level feedback queue with priority levels, ranging from 0-140. Levels 0-99 are considered
real-time tasks and 100-140 are considered ’nice’ tasks. Real-time tasks are allowed to run for approximately
200ms before process switching occurs. Nice tasks are given 10. The process scheduler will run through the
queue letting processes run for their allowed time-slice, then moving them into the ’expired’ queue. Active
processes with higher level (lower priority number) will always get processed first. When the ’active’ queue is
empty, the ’expired’ queue becomes the new active queue and vice versa.
Linux 2.6.23+: Completely Fair Scheduler uses a red-black tree instead of running queues and utilises the fair
queueing scheduling algorithm.
Windows 3.x: Non-preemptive scheduler, which meant a one badly written program could freeze the entire system.
Windows 9X: Rudimentary preemptive scheduler, although legacy 16-bit applications were allowed to run uninter-
rupted.
Windows NT: Multi-level feedback queue with 32 priority levels. 0-15 were ”normal” priority levels and 16-31 being
soft real-time priorities.
Windows Vista: Essential the same scheduler as in NT with a few modifications. Uses a cycle-counter register in
modern processors to account of individual cycle counts of threads.
MacOS X: The Mach kernel uses co-operative kernel threads.

Process-scheduler types
Preemptive: Has the capability of forcefully removing a task from the CPU if it decides to allocate the resource
to another process. The scheduler can do this without any co-operation from the process. By definition it
can preempt, interrupt and later resume the task in the system. In system design, usually not all tasks are
preemptible, such as system services and kernel functions that if not allowed to finish could produce race
conditions, resulting in a dead lock. So called pre-emptive kernels allow kernel mode tasks to be pre-empted
(such as: Windows NT, Linux 2.6, AIX and some BSD systems).
Non-preemptive: Also referred to as ’co-operative’ or ’voluntary’ when the scheduler is unable to remove processes
from the CPU. The process either has to complete its task or offer its slot up for grabs. In other words,
non-preemptive multi-tasking is when a program has to be specifically programmed to yield when it does not
require system resources any more.

I/O scheduling (disk scheduling)


Relevant to scheduling.

Prioritisation methods
Not used, but relevant for any scheduling activities as well as task scheduling.

Andri Óskarsson 1/ 3
Notes for 4th semsester’s project exam 12.6.2009

Searching algorithms
Binary search and linear search are implemented in the server.

Synchronisation methods
Used in the server for sharing data between threads.

Thread-safety
Relevant to server, what makes a program or library thread-safe?

Reentrant: A code is reentrant when a routine can be re-entered while it is already running (can be executed
concurrently).
To be reentrant, a computer program or routine:
• Must hold no static (or global) non-constant data.
• Must not return the address to static (or global) non-constant data.
• Must work only on the data provided to it by the caller.
• Must not rely on locks to singleton resources.
• Must not modify its own code.
• Must not call non-reentrant computer programs or routines.

Data structures
Buffering
Buffering is used in the server for tasks as well as data.

Andri Óskarsson 2/ 3
Notes for 4th semsester’s project exam 12.6.2009

Hash tables
Trees
Graphs

D4-4: Analyse og Design af Indlejrede Realtidssystemer


Multi-threaded programming
Real-time kernels
Synchronisation, IPC and data sharing
Embedded kernels, interrupt driven systems
Mapping of tasks on processors
Parallelism and pseudo-parallelism
Heterogeneity and homogeneity

CPU problematikker (?)


Modeling af omgivelser (?)
Real-time operating systems (example: RTAI)
Scheduling theory
Categorisation of tasks
Dependability
Calculating response times

Scheduling principles
RMA, DMA, EDF
Priority Ceiling
Aperiodic servers

Analysis and design methods of real-time systems


RT-UML
RT Hood
CODARTS

Testing of embedded real-time systems

D4-6: Algoritmer og Arkitekturer II


Processors
Recursion and induction
v. Neumann, Harward, memory hierarchy
Andri Óskarsson 3/ 3

Das könnte Ihnen auch gefallen