Operating programmers aware of the underlying HW no multitasking - - PowerPoint PPT Presentation

operating
SMART_READER_LITE
LIVE PREVIEW

Operating programmers aware of the underlying HW no multitasking - - PowerPoint PPT Presentation

Brief history Early computer systems No OS Operating programmers aware of the underlying HW no multitasking System one job at a time IBM System 360 OS 360 (IBM) [1965] multitasking pagination assembly Brief history Brief history


slide-1
SLIDE 1

Operating System

Brief history

Early computer systems

No OS

programmers aware of the underlying HW no multitasking

  • ne job at a time

IBM System 360

OS 360 (IBM) [1965]

multitasking pagination assembly

Brief history

Multics (MIT/General Electrics/Bell Labs) [1965]

PDP-7 memory mapped files (sort of) virtual filesystem

process memory segments viewed as files

dynamic linking multitasking pagination segmentation interprocess calls dropped

Brief history

Unix [1969]

PDP-7 (PDP-11 initially)

then widespread

C preemptive multitasking pagination segmentation

slide-2
SLIDE 2

Brief history

MS-DOS [1981]

no advanced features (lack of hw support)

Windows 3.1 [1992]

pagination multitasking (no preemption)

Windows NT 3.1 [1993] Linux [start: 1991 ver. 1.0 release: 1994] Several others

VAX/VMS, MAC-OS, OS/2, QNX, Symbian OS, ...

Features

Abstraction

HW details

Management

resources

Protection

Errors / attacks

Features

Program execution management

Security

User mode vs Supervisor/Protected/Kernel mode

Multitasking

Hardware management

Abstraction

Hardware driving Interrupt handling

Memory management

Elements

Scheduler Device drivers Memory management routines Cache (buffer) management

slide-3
SLIDE 3

Operating System

Interface between applications and hardware

provides hardware abstraction (and protection)

Resource manager Activity coordinator

Applications

Operating System

H A R D W A R E

User Level Kernel Level

Protection

Kernel (or protected or supervisor) level

Full system access

HW devices registers “Critical” address space regions

I/O mapping System data

User level

Restricted system access

“Owned” address space regions

Interface

OS functions called by applications

Application Programming Interface (API)

standard routine call

library routine

Application Library OS

std call

Kernel level User level

standard routine call

Application Library OS

Kernel level User level

standard routine call OS routine OS routine

slide-4
SLIDE 4

Protection issue

func_enter_address:

<parameters validation> <user permissions check>

func_internal_address:

<critical work>

Kernel level code

<parameters setting>

call func_enter_address

User code OK

<parameters setting>

call func_internal_address

User code NO

(protection bypassed)

Interface

OS functions called by applications

Application Programming Interface (API)

standard routine call system calls (syscalls)

not a standard function call is the “door” for the kernel level usually “wrapped” by library functions

  • pen (library routine)
  • pen (OS routine)

Application Library OS libraries provide a further abstraction (abstraction from OS)

syscall

Kernel level User level

standard routine call

System calls

Architecture dependent

software interrupt / trap

Call # Routine address 2 System routine ... /* parameters in registers */ ... mov r7, 2 /* syscall no. */ SVC 0 /* syscall */ ... /* results managing */ ...

user code

syscall table can be modified

  • nly at kernel level

Example: ARM – Linux

System calls

Architecture dependent

software interrupt / trap

Call # Routine address 2 System routine ... /* parameters in registers */ ... SVC 2 /* syscall */ ... /* results managing */ ...

user code

syscall table can be modified

  • nly at kernel level

Example: ARM – Linux (old ABI)