Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Overview Protection
IN2011 Nets & Ops Session 2 3 IN2011 Nets & Ops Session 2 4
IN2011 Nets & Ops Session 2 5 IN2011 Nets & Ops Session 1 6
1
CPU modes in practice Meltdown
IN2011 Nets & Ops Session 1 7 IN2011 Nets & Ops Session 2 8
IN2011 Nets & Ops Session 2 9 IN2011 Nets & Ops Session 1 10
IN2011 Nets & Ops Session 2 11 IN2011 Nets & Ops Session 2 12
2
System Call APIs System Call Implementation
n System calls are usually accessed via a n A small integer number is associated
high-level Application Program Interface with each system call
(API) rather than directly l System-call interface maintains a table of
l Common APIs: Win32 API for Windows; POSIX privileged (ie kernel) code locations, indexed
API for POSIX-based systems (including virtually according to these numbers
all versions of UNIX, Linux, and Mac OS X); Java n The system call interface invokes the
API for the Java virtual machine (JVM)
intended system call code in the OS
n Why use APIs rather than direct system kernel and returns the status of the
calls? system call and any return values
IN2011 Nets & Ops Session 2 13 IN2011 Nets & Ops Session 2 14
IN2011 Nets & Ops Session 2 15 IN2011 Nets & Ops Session 2 16
IN2011 Nets & Ops Session 2 17 IN2011 Nets & Ops Session 2 18
3
A Layered View OS Services (Cont)
n Communications (inter-process)
l via shared memory or through message passing
n Error detection
l Errors may occur in the CPU and memory
hardware, in I/O devices, in user programs
l For each type of error, OS should take appropriate
action to ensure system integrity and to limit
consequences
IN2011 Nets & Ops Session 2 19 IN2011 Nets & Ops Session 2 20
IN2011 Nets & Ops Session 2 23 IN2011 Nets & Ops Session 2 24
4
Layered Structure MS-DOS Layer Structure (Bad!)
Violation of
layering!
Protection
not enforced
IN2011 Nets & Ops Session 2 25 IN2011 Nets & Ops Session 2 26
IN2011 Nets & Ops Session 2 27 IN2011 Nets & Ops Session 2 28
5
System Boot Linux Boot on x86
IN2011 Nets & Ops Session 2 31 IN2011 Nets & Ops Session 2 32
IN2011 Nets & Ops Session 2 33 IN2011 Nets & Ops Session 2 34
6
Linux Kernel Initialisation Kernel Parameters
n Kernel has a lot of work to do before it is n The behaviour of the kernel at start up is
ready for normal business configurable by setting various kernel
l in particular, initialising the file system (using initrd)
parameters
l we will gloss over the details n Examples in the GRUB menu entries:
n At the very end of initialisation, the kernel l ro mount root file system read-only (init
may remount it read-write later)
runs /sbin/init (but see next slide)
l quiet suppress lots of boot-time messages
l init consults /etc/inittab to determine which
user-mode processes (services) it should start l init=file run file instead of /sbin/init
l networking, mail system, X-windows, etc
IN2011 Nets & Ops Session 2 37 IN2011 Nets & Ops Session 2 38
n Labs
n Preparation for Session 3
l see Moodle