Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Overview
Real-Time Operating Systems/Linux Motivation and context
Copyright c 1997-2000 Dept. of Computer Science, Washington University 1
David L. Levine Real-Time Operating Systems/Linux David L. Levine Real-Time Operating Systems/Linux
Copyright c 1997-2000 Dept. of Computer Science, Washington University 2
Copyright c 1997-2000 Dept. of Computer Science, Washington University 3
David L. Levine Real-Time Operating Systems/Linux David L. Levine Real-Time Operating Systems/Linux
Copyright c 1997-2000 Dept. of Computer Science, Washington University 4
Copyright c 1997-2000 Dept. of Computer Science, Washington University 5
David L. Levine Real-Time Operating Systems/Linux David L. Levine Real-Time Operating Systems/Linux
SCHEDULER
RUNTIME
client
Number 2 was pSOS by Integrated Systems ... Object Adapter
[P ] [P ] [P ]
1..n 10 Hz low-priority
0 1 n
...
POSIX: LynxOS, QNX Neutrino C0 C1 ... Cn
...
S0 S1
ORB Core
Sn clients
Requests
Windows and Linux compatibility
[P] Priority – Increasing n
I/O SUBSYSTEM
– RT versions really aren’t Client Server increases load
– RT compatible versions are coming, e.g., Blue Cat Linux
Server factory
implements
1100
0011
001
110 thread-per-connection
11
00
Pentium II
– Each connection links
http://www.cs.wustl.edu/
client with its servant
˜levine/research/RT-OS.ps.gz
Copyright c 1997-2000 Dept. of Computer Science, Washington University 6
Copyright c 1997-2000 Dept. of Computer Science, Washington University 7
David L. Levine Real-Time Operating Systems/Linux David L. Levine Real-Time Operating Systems/Linux
1400
Linux
1200
LynxOS
NT – VxWorks does not 1000 1000
Solaris
VxWorks scale on x86 800 800
1000
– Non-RTOS’s are not 600 600
800
predictable
400 400
600 – ORB (TAO) provides
400
low latency and avoids 200 200
priority inversion 0
0 5 10 15 20 25 30 35 40 45
0
0 5 10 15 20 25 30 35 40 45 50
200
i.e., high priority Number of Low priority Clients Number of Low priority Clients
David L. Levine Real-Time Operating Systems/Linux David L. Levine Real-Time Operating Systems/Linux
Depends on application, but in general, probably not POSIX.1 IPC, threads, scheduling, synchronization, etc.
However, RTOS’s are often used as lightweight OS’s Both Process (sched_) and thread (pthread_) scheduling
We can use middleware for services, and use any suitable OS Scheduling modes:
– SCHED_FIFO (run-to-completion/block)
– SCHED_RR (round-robin, with time quantum)
– SCHED_OTHER (time sharing, dynamic based on nice setting and
block time)
Priority levels
– 1 to 99 for SCHED_FIFO and SCHED_RR
– 0 for SCHED_OTHER
Copyright c 1997-2000
softirq.c
module.c
printk.c
ptrace.c
signal.c
sysctl.c
panic.c
sched.c
timer.c
uid16.c
David L. Levine
acct.c
exit.c
fork.c
info.c
kmod.c
time.c
sys.c
pm.c
Copyright c 1997-2000 Dept. of Computer Science, Washington University 15
David L. Levine Real-Time Operating Systems/Linux David L. Levine Real-Time Operating Systems/Linux
/proc$ ls self PID TTY STAT TIME COMMAND PID TTY STAT TIME COMMAND
cmdline environ fd/ mem stat status 1 ? S 0:08 init 246 ? S 0:00 inetd
cwd@ exe@ maps| root@ statm 2 ? SW 0:00 (kflushd) 257 ? S 0:00 lpd
3 ? SWN 0:00 (kswapd) 269 ? S 0:00 rpc.mountd
/proc$ cat self/status 4 ? SW 0:00 (nfsiod) 278 ? S 0:04 rpc.nfsd
Name: cat 5 ? SW 0:00 (nfsiod) 292 ? S 0:00 gpm -t ps/2
State: R (running) 6 ? SW 0:00 (nfsiod) 303 ? S 0:00 /usr/local/sbin/sshd
Pid: 2404 7 ? SW 0:00 (nfsiod) 310 1 S 0:00 /bin/login -- levine
PPid: 2398 67 ? S 0:00 kerneld 311 2 S 0:00 /sbin/mingetty tty2
Uid: 1046 1046 1046 1046 193 ? S 0:00 syslogd 312 3 S 0:00 /sbin/mingetty tty3
Gid: 1213 1213 1213 1213 202 ? S 0:00 klogd 313 4 S 0:00 /sbin/mingetty tty4
VmSize: 2056 kB VmStk: 8 kB SigBlk: 00000000 213 ? S 0:00 atd 314 5 S 0:00 /sbin/mingetty tty5
VmLck: 0 kB VmExe: 16 kB SigIgn: 00000000 224 ? S 0:00 crond 315 6 S 0:00 /sbin/mingetty tty6
VmRSS: 560 kB VmLib: 856 kB SigCgt: 00000000 235 ? S 0:00 portmap 317 ? S 0:05 update (bdflush)
VmData: 56 kB SigPnd: 00000000
244999 (pc=12005056c,va=120
Linux version 2.0.34 (root@linux00.amt.tay1.dec.com)
0 (pc=0,va=0)
1: 60316 keyboard
1024.00
Linux System Info
4: 27127 + serial
497.02
EB164
Alpha
127
N/A
EV5
0
0
:
:
:
:
:
:
:
:
:
:
:
/proc$ cat /proc/version
platform string
Copyright c 1997-2000
cpu variation
cpu revision
system type
David L. Levine
cpu model
BogoMIPS
cpu
Copyright c 1997-2000 Dept. of Computer Science, Washington University 19
David L. Levine Real-Time Operating Systems/Linux David L. Levine Real-Time Operating Systems/Linux
Copyright c 1997-2000 Dept. of Computer Science, Washington University 20
Copyright c 1997-2000 Dept. of Computer Science, Washington University 21