icom 5007 - noack operating systems - administrivia prontuario - please time-share and ask questions...

13
ICOM 5007 - Noack Operating Systems - Administrivia Prontuario - Please time-share and ask questions Info is in my homepage amadeus/~noack/ Make bookmark for ICOM5007 Page contains prontuario Links to old exams and labs Links to Minix and Linux source Kernel Hacker’s guide Links to current assignments as developed Course includes Exams and lecture material Lab work Project (described in course page) Lab Partly in OS/Networking lab Individual programs, often using Linux source or Java threads

Upload: shawn-lynch

Post on 29-Dec-2015

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ICOM 5007 - Noack Operating Systems - Administrivia Prontuario - Please time-share and ask questions Info is in my homepage amadeus/~noack/ Make bookmark

ICOM 5007 - Noack

Operating Systems - Administrivia

Prontuario - Please time-share and ask questionsInfo is in my homepage amadeus/~noack/

Make bookmark for ICOM5007Page contains

prontuarioLinks to old exams and labsLinks to Minix and Linux sourceKernel Hacker’s guideLinks to current assignments as developed

Course includesExams and lecture materialLab workProject (described in course page)

LabPartly in OS/Networking labIndividual programs, often using Linux source or Java threads

Page 2: ICOM 5007 - Noack Operating Systems - Administrivia Prontuario - Please time-share and ask questions Info is in my homepage amadeus/~noack/ Make bookmark

ICOM 5007 - Noack

Operating Systems - More Trivia

Accounts already exist for most studentsWill be automatically created for others

Lab instructor - last year was Juan Carvajal Barreto

Please find me by e-mail - noack - or X3652Projects

Info on course page

Try to form groups soon - three or four people

Project can be:Device driver or module

Operating system utility

Operating system modification/improvement

Page 3: ICOM 5007 - Noack Operating Systems - Administrivia Prontuario - Please time-share and ask questions Info is in my homepage amadeus/~noack/ Make bookmark

ICOM 5007 - Noack

Operating Systems - Basics

An OS is a program that controls and shares the resources of a computing system, which are:

CPU time (or allotment in distributed systems)

Memory allocation and swapping to background

I/O device handling - the dirty details

File systems

Network devices, layers and protocols

An OS is (after initial setup) an interrupt-driven programInterrupts may come from:

I/O devices

Timer interrupts - time slicing and hangup recovery

Software interrupts - system call mechanism

Page 4: ICOM 5007 - Noack Operating Systems - Administrivia Prontuario - Please time-share and ask questions Info is in my homepage amadeus/~noack/ Make bookmark

ICOM 5007 - Noack

Operating Systems - Structures

MonolithicOne big complicated layer between users and hardwareUnix is a typical monolithic system

Layered - with microkernelExample - Mach contains

ProcessesThreadsMessagesMemory blocks

and everything else is implemented in higher layers using these highly protected basics

Virtual Machine VM360 (IBM) is an exampleThe virtual machine layer is:

between hardware and client machinesemulates a separate machine for each user session

Page 5: ICOM 5007 - Noack Operating Systems - Administrivia Prontuario - Please time-share and ask questions Info is in my homepage amadeus/~noack/ Make bookmark

ICOM 5007 - Noack

The basic layered structureof all operating systems

Application layer

Operating system

Hardware components

System call interface

Hardware/software interface

The concentric shell picture Layers – as usually drawn

Page 6: ICOM 5007 - Noack Operating Systems - Administrivia Prontuario - Please time-share and ask questions Info is in my homepage amadeus/~noack/ Make bookmark

ICOM 5007 - Noack

More OS Structures

The main OS program is often called the kernelThe Kernel

operates in privileged mode

contains the device drivers and modules

contains process, memory and file management

is protected by the system call interface - the INT instruction in 80x86 architecture

The system call interfaceIs implemented by the INT or similar instruction

Is used when a user program makes a system call

Is the transition from user to kernel mode

Keeps users from running kernel code

Page 7: ICOM 5007 - Noack Operating Systems - Administrivia Prontuario - Please time-share and ask questions Info is in my homepage amadeus/~noack/ Make bookmark

ICOM 5007 - Noack

Monolithic operating system structuree. g. Unix/Linux

Hardware

Processhandling

File systemroutines

Memorymanagement

Device driver Device driver

System call interfaceApplication layer

Intermediateroutine

Page 8: ICOM 5007 - Noack Operating Systems - Administrivia Prontuario - Please time-share and ask questions Info is in my homepage amadeus/~noack/ Make bookmark

ICOM 5007 - Noack

Microkernel-based systeme. g. Mach (used for distributed systems)

Application layer

Microkernel layer

Hardware entities (can be several)

Outer kernel ICould be PosixCompliant layer

Outer kernel IICould be VMS

emulator

Outer kernel IIIExperimental

OS?

Page 9: ICOM 5007 - Noack Operating Systems - Administrivia Prontuario - Please time-share and ask questions Info is in my homepage amadeus/~noack/ Make bookmark

ICOM 5007 - Noack

Virtual machine systemVM – first secure OS for IBM 360/370

Hardware

Kernel imageFor

User I

User IApplication

layer

Virtual machine layer

Kernel imageFor

User II

User IIApplication

layer

Kernel imageFor

User III

User IIIApplication

layer

Page 10: ICOM 5007 - Noack Operating Systems - Administrivia Prontuario - Please time-share and ask questions Info is in my homepage amadeus/~noack/ Make bookmark

ICOM 5007 - Noack

The shell is not the kernel

The shell is an ordinary user programIt operates by creating processes that in turn do

system calls or run programsIt is the equivalent of COMMAND.COM in MS/DOSShell programming is possible and is often done

in OS utilitiesExtensions of shell programming include:

PERL

awk and sed

ksh, csh, bash and other enhanced shells

Page 11: ICOM 5007 - Noack Operating Systems - Administrivia Prontuario - Please time-share and ask questions Info is in my homepage amadeus/~noack/ Make bookmark

ICOM 5007 - Noack

The standard lies of OS

There is a separate processor for each processThe CPU is time-shared

You really have all that memoryMemory is loaded only when needed - demand paging

You are really doing all those disk operationsThe operations are done when and if the OS pleases - the disk block

cache idea

That remote file system is really thereRemote file system utilities are a little unpredictable

The OS is really secureAsk the big kids

Page 12: ICOM 5007 - Noack Operating Systems - Administrivia Prontuario - Please time-share and ask questions Info is in my homepage amadeus/~noack/ Make bookmark

ICOM 5007 - Noack

Concurrency

The theoretical core of OSAn OS creates a set of processes that run concurrentlyA process is like a person - it has

a stream of consciousness

possessions - memory, files, data

is created, reproduces, dies

interacts with other processes

In actuality, it is a program in execution

Concurrent process misbehaviorsRace conditions - unpredictable results because processes simultaneously

modify data or devices

Deadlocks - Each has what the other wants, nobody gets anywhere

Starvation - some processes go hungry - others eat well

Page 13: ICOM 5007 - Noack Operating Systems - Administrivia Prontuario - Please time-share and ask questions Info is in my homepage amadeus/~noack/ Make bookmark

ICOM 5007 - Noack

Some operating system ideas

Everything is a file - even devices This allows a program to work with human input, or a device, or a temporary or

permanent file or even a network connectionThe file system provides access control for devices also – protects raw disk

operations from users

Interrupt-driven behaviorExample - windows - process is simultaneously sensitive to events from

mouse, keyboard, process subsystem, and window manager

Caching - Foreground and background copiesUsed in

Cache memorySwappingThe disk block cache - recent transactions are in memoryNetworking utilities

Advantage – operations take place at memory speeds