[PDF] [PDF] Operating Systems

explain the structure and functions of an operating system, – illustrate key e g linux is a “kernel”, but has kernel modules and certain servers • e g Windows 



Previous PDF Next PDF





[PDF] THE LINUX OPERATING SYSTEM - Transparencia Fiscal Jalisco

Operating Systems: Internals and Design Principles, Fifth Edition 4 6 LINUX PROCESS AND THREAD 6 8 LINUX KERNEL CONCURRENCY File systems: Provides a global, hierarchical namespace for files, directories, and other file



[PDF] Operating Systems (Linux)

Agenda A little background about the presenter Computer Systems Architecture( s) What is an Operating System? A brief introduction to Linux



[PDF] Lecture Notes-Linux Programming

However, Apple OS X is most popular UNIX operating system for desktop usage Security Firewall Software Linux comes with open source netfilter/iptables based  



[PDF] Linux Notes for Professionals - GHC

Section 2 7: Find your linux os (both debian rpm) name and release number 14 Section 17 4: Configure a hostname for some other system on your network 48 Please feel free to share this PDF with anyone for free, latest version of this  



[PDF] LINUX PROGRAMMING - IARE

3 files/ user files are arranged • Shell - Linux provides a special interpreter program which can be used to execute commands of the operating system It can be 



[PDF] Linux for Beginners

20 oct 2020 · 1 General remarks on the operating system UNIX/Linux 2 First steps acroread file pdf displays pdf files and allows for simple manipulations 



[PDF] Notes on Linux operating system

9 jan 2007 · UNIX: operating system Linux: free version of UNIX in file names I often give files Windows-like extensions (like txt, pdf , bat, etc ) in order to



[PDF] Operating Systems

explain the structure and functions of an operating system, – illustrate key e g linux is a “kernel”, but has kernel modules and certain servers • e g Windows 



[PDF] Introduction to Linux - The Linux Documentation Project

This guide was created as an overview of the Linux Operating System, geared toward new Format files (PDF); GhostView (gv) for viewing PostScript files; 



[PDF] OPERATING SYSTEMS Lecture Notes - SVECW

User ID then associated with all files, processes of that user to determine access control Common in UNIX operating systems (Solaris, Linux, Mac OS X)

[PDF] linux rust

[PDF] linux scanner drivers

[PDF] linux tshark tutorial

[PDF] linux written in rust

[PDF] lionsgate films management

[PDF] lipid ncert

[PDF] lipolysis

[PDF] lipschitz condition differential equation

[PDF] lipschitz condition solved examples

[PDF] liquid density experiment

[PDF] liquid dmg benefits for autism

[PDF] liquid hand sanitizer dispenser

[PDF] liquidity regulation

[PDF] liquidity reporting

[PDF] liquidity risk metrics

Operating Systems

Steven Hand

Michaelmas Term 2010

12 lectures for CST IA

Operating Systems - N/H/MWF@12

Course Aims

This course aims to:

-explain the structure and functions of an operating system, -illustrate key operating system aspects by concrete example, and -prepare you for future courses. . .

At the end of the course you should be able to:

-compare and contrast CPU scheduling algorithms -explain the following: process, address space, file. -distinguish paged and segmented virtual memory. -discuss the relative merits of Unix and NT. . .Operating Systems - Aimsi

Course Outline

Introduction to Operating Systems.

Processes & Scheduling.

Memory Management.

I/O & Device Management.

Protection.

Filing Systems.

Case Study: Unix.

Case Study: Windows NT.Operating Systems - Outlineii

Recommended Reading

Concurrent SystemsorOperating Systems

Bacon J [ and Harris T ], Addison Wesley 1997 [2003] Operating Systems Concepts (5th Ed.)Silberschatz A, Peterson J and Galvin P, Addison Wesley 1998. The Design and Implementation of the 4.3BSD UNIX OperatingSystemLeffler S J, Addison Wesley 1989 Inside Windows 2000 (3rd Ed)orWindows Internals (4th Ed) Solomon D and Russinovich M, Microsoft Press 2000 [2005]Operating Systems - Booksiii

What is an Operating System?

A program which controls the execution of all other programs(applications). Acts as an intermediary between the user(s) and the computer.

Objectives:

-convenience, -efficiency, -extensibility. Similar to a government. . .Operating Systems - Introduction1

An Abstract View

Operating System

Hardware

App 2 App N App 1

The Operating System (OS):

-controls all execution. -multiplexes resources between applications. -abstracts away from complexity. Typically also have somelibrariesand sometoolsprovided with OS.

Are these part of the OS? Is IE a tool?

-no-one can agree. . . For us, the OSthekernel.Operating Systems - Introduction2

In The Beginning. . .

1949: First stored-program machine (EDSAC)

to1955: "Open Shop". -large machines with vacuum tubes. -I/O by paper tape / punch cards. -user = programmer = operator.

To reduce cost, hire anoperator:

-programmers write programs and submit tape/cards to operator. -operator feeds cards, collects output from printer.

Management like it.

Programmers hate it.

Operators hate it.

need something better.Operating Systems - Evolution3

Batch Systems

Introduction of tape drives allowbatchingof jobs:

-programmers put jobs on cards as before. -all cards read onto a tape. -operator carries input tape to computer. -results written to output tape. -output tape taken to printer.

Computer now has aresident monitor:

-initially control is in monitor. -monitor reads job and transfer control. -at end of job, control transfers back to monitor.

Even better:spooling systems.

-use interrupt driven I/O. -use magnetic disk to cache input tape. -fire operator. Monitor nowschedulesjobs. . .Operating Systems - Evolution4

Multi-Programming

Operating

SystemJob 1Job 2Job 3Job 4

Operating

SystemJob 1Job 2Job 3Job 4

Operating

SystemJob 1Job 2Job 3Job 4

Time Use memory to cache jobs from diskmore than one job active simultaneously.

Two stage scheduling:

1. select jobs to load:job scheduling.

2. select resident job to run:CPU scheduling.

Users want more interactiontime-sharing:

e.g. CTSS, TSO, Unix, VMS, Windows NT. . .Operating Systems - Evolution5

Today and Tomorrow

Single user systems: cheap and cheerful.

-personal computers. -no other usersignore protection. -e.g. DOS, Windows, Win 95/98, . . .

RT Systems: power is nothing without control.

-hard-real time: nuclear reactor safety monitor. -soft-real time: mp3 player.

Parallel Processing: the need for speed.

-SMP: 2-8 processors in a box. -MIMD: super-computing.

Distributed computing: global processing?

-Java: the network is the computer. -Clustering: the network is the bus. -CORBA: the computer is the network. -.NET: the network is an enabling framework. . .Operating Systems - Evolution6

Monolithic Operating Systems

H/WS/WApp.

App. App.

Scheduler

Device Driver

Device Driver

App. Oldest kind of OS structure ("modern" examples are DOS, original MacOS)

Problem: applications can e.g.

-trash OS software. -trash another application. -hoard CPU time. -abuse I/O devices. -etc. . .

No good for fault containment (or multi-user).

Need a better solution. . .Operating Systems - Structures & Protection Mechanisms7

Dual-Mode Operation

Want to stop buggy (or malicious) program from doing bad things. providehardwaresupport to distinguish between (at least) two different modes of operation:

1.User Mode: when executing on behalf of a user (i.e. application programs).

2.Kernel Mode: when executing on behalf of the operating system.

Hardware contains a mode-bit, e.g.0means kernel,1means user.

Kernel

ModeUser

Mode resetinterrupt or fault set user mode

Make certain machine instructions only possible in kernel mode. . .Operating Systems - Structures & Protection Mechanisms8

Protecting I/O & Memory

First try: make I/O instructions privileged.

-applications can"t mask interrupts. -applications can"t control I/O devices. But:

1. Application can rewrite interrupt vectors.

2. Some devices accessed viamemory

Hence need to protect memory also, e.g. definebaseandlimitfor each program:

Operating

SystemJob 1Job 2Job 3Job 4

0x00000x3000

0x50000x98000xD800

0xFFFF

0x5000

0x4800

limit register base register Accesses outside allowed range are protected.Operating Systems - Structures & Protection Mechanisms9

Memory Protection Hardware

CPU vector to OS (address error)yes noyes nobase base+limit

Memory

Hardware checks every memory reference.

Access out of rangevector into operating system (just as for an interrupt). Only allowupdateof base and limit registers in kernel mode. Typically disable memory protection in kernel mode (although a bad idea).

In reality, more complex protection h/w used:

-main schemes aresegmentationandpaging -(covered later on in course)Operating Systems - Structures & Protection Mechanisms10

Protecting the CPU

Need to ensure that the OS stays in control.

-i.e. need to prevent any a malicious or badly-written application from 'hogging" the CPU the whole time. use atimerdevice.

Usually use acountdowntimer, e.g.

1. set timer to initial value (e.g.0xFFFF).

2. everytick(e.g.1μs), timer decrements value.

3. when value hits zero, interrupt.

(Modern timers have programmable tick rate.) Hence OS gets to run periodically and do its stuff. Need to ensure only OS can load timer, and that interrupt cannot be masked. -use same scheme as for other devices. -(viz. privileged instructions, memory protection)

Same scheme can be used to implement time-sharing (more on this later).Operating Systems - Structures & Protection Mechanisms11

Kernel-Based Operating Systems

H/WS/W

App. Priv

Unpriv

App. App. App.

Kernel

Scheduler

Device Driver

Device Driver

System Calls

File System

Protocol Code

Applications can"t do I/O due to protection

operating system does it on their behalf. Need secure way for application to invoke operating system: require a special (unprivileged) instruction to allow transition from user to kernel mode. Generally called asoftware interruptsince operates similarly to a real (hardware) interrupt. . .

Set of OS services accessible via software interrupt mechanism calledsystem calls.Operating Systems - Structures & Protection Mechanisms12

Microkernel Operating Systems

H/WS/W

App. Priv

Unpriv

Server

Device

DriverServer

ServerApp. App. App.

Kernel

Scheduler

Device

Driver

Alternative structure:

-push some OS services intoservers. -servers may be privileged (i.e. operate in kernel mode).

Increases bothmodularityandextensibility.

Still access kernel via system calls, but need new way to access servers: interprocess communication (IPC) schemes.Operating Systems - Structures & Protection Mechanisms13 Kernels versus MicrokernelsSo why isn"t everything a microkernel?

Lots of IPC adds overhead

microkernels usually perform less well. Microkernel implementation sometimes tricky: need to worry about concurrency and synchronisation. Microkernels often end up with redundant copies of OS data structures. Hence today most common operating systems blur the distinction between kernel and microkernel. e.g. linux is a "kernel", but has kernel modules and certain servers. e.g. Windows NT was originally microkernel (3.5), but now (4.0 onwards) pushed lots back into kernel for performance.

Still not clear what the best OS structure is, or how much it really matters. . .Operating Systems - Structures & Protection Mechanisms14

Operating System Functions

Regardless of structure, OS needs tosecurely multiplex resources:

1. protect applications from each other, yet

2. share physical resources between them.

Also usually want toabstractaway from grungy harware, i.e. OS provides avirtual machine: -share CPU (in time) and provide each app with a virtual processor -allocate and protect memory, and provide applications withtheir own virtual address space -present a set of (relatively) hardware independent virtual devices -divide up storage space by using filing systems , and -do all this within the context of a security framework Remainder of this part of the course will look at each of the above areas in turn. . .

Operating Systems - Functions15

Process Concept

From a user"s point of view, the operating system is there to execute programs: -on batch system, refer tojobs -on interactive system, refer toprocesses -(we"ll use both terms fairly interchangeably)

Process=Program:

-a program isstatic, while a process isdynamic -in fact, a process=" a program in execution (Note: "program" here is pretty low level, i.e. native machine code orexecutable)

Process includes:

1. program counter 2. stack 3. data section Processes execute onvirtual processorsOperating Systems - Processes16

Process States

Exit

Running

New Ready

Blocked

dispatch timeout or yieldrelease admit event-wait event

As a process executes, it changesstate:

New : the process is being created

Running

: instructions are being executed Ready : the process is waiting for the CPU (and is prepared to run at any time)

Blocked

: the process is waiting for some event to occur (and cannot run until it does) Exit : the process has finished execution.quotesdbs_dbs7.pdfusesText_13