Binghamton



Introduction to Operating Systems

Nick Guydosh – 9/4/03

What is an Operating system?

Figure 1.1 from Silberschatz

Virtual Machine (OS) concept of an Operating System:

Concept: An OS is can be thought of a virtual machine that is easier and safer to use than directly the “raw hardware.

The Virtual Machine model provides a software emulation of an abstract machine – given the hardware interface. … a familiar example is the Java Virtual machine.

The Virtual machine provides portability of applications to different HW platforms

The Virtual machine provides protection and security.

The Virtual machine will allow convenient concurrent programming, multi-users, file systems, memory management, etc.

The actual software implementation will depend on the level and functionality of the hardware interface.

The OS architecture problem is knowing the hardware interface, what should the API be? The API is the easier to use view of the underlying hardware.

There is a tradeoff between the OS architecture and the hardware architecture:

Question: How much function should go into the hardware and how much in the software.

Example: CISC verses RISC architecture.

Two Main Views or Functions of an Operating System

Idea from Silberschatz: An Operating System is like a government. It performs no useful function in itself . It simple provides an environment for an efficient, orderly, secure, and convenient use of the underlying hardware.

User view: The OS is a provider of services to make the application programming and use of the machine easier, more efficient, fault tolerant, secure, … . Example: device drivers and file systems simplify the use of the I/O devices.

System View: The OS is an allocator of resources and traffic/event controller. These functions must be done in an efficient and fair manner. Metrics of success are throughput, minimum CPU idle time (CPU utilization), preventing deadlock in an multi/concurrent processing environment, etc.

Components of an Operating system:

Process management and CPU scheduling

including multi-tasking, multiprogramming, thread support, process synchronization, etc

Memory management – example: Virtual Memory

I/O management

File systems (possible push to “user space” – but typically an OS function)

Communications, networking

Borderline areas:

Multi-media support

User interface and windows support

Internet browsers … remember M-Soft!

Levels of Complexity of an OS:

No OS: Source code -> compiler -> object code -> hardware -> output

Use primitive I/O under manual control, control panels,…

Example of “LGP30” and wave guide problem.

Simple OS – one application at a time:

Embedded controllers, early DOS PC’s

Example of early systems and their evolution – see text and PPT slides (1.7 – 1.11).

More Complex OS’s:

What if you want to share a single machine with multiple applications and/or users?

OS must now coordinate and manage the interactions among different applications and users. It must now manage hardware resources such as CPU, memory, I/O, etc. while still providing standard services (libraries, etc)

The OS must provide protection for resources (especially memory) among users:

keep programs from crashing the OS

keep user programs from clobbering each other

Protection is done by providing:

Address translation (keep user in own address space) … concept of an address space.

Dual mode operation – user has restricted use of instructions and memory space (user mode). Only the OS is unrestricted (kernel or privileged mode).

Address Translation:

Address space: The set of all memory addresses that a given process (program for now) can access.

We can achieve protection by restricting what this program can access (define and enforce the address space.

A memory management unit (MMU) converts “virtual or logical” addresses generated by the CPU from instructions, to physical addresses (which go in the memory address register (MAR) ). A contiguous logical address space can now map discontiguously to anywhere in physical memory and the mapping may even change throughout the life of the associated process. This process of address translation will also check to make sure that all addresses are “legal”, ie., make sure that the addresses are within the specified address space. Sharing memory will be only allowed “cautiously” under the discipline of the OS. This process is logically a table lookup (address translation tables) … a lot more on this later.

Dual Mode operation:

Example: What if an application could access the address translation tables? …

There is a “mode bit” in the hardware which can is under control only by the OS.

The applications will operate in user mode, and have its access restricted to its own address space (or shared memory under OS control).

The OS will operate in kernel mode or privileged mode and can excute any instruction and access anywhere in memory – gotta trust someone!

If only one user process is running at a time, then dual operation becomes unnecessary because if the process crashes the system (and OS) it is done for anyway. Maybe in this case dual mode would possible prevent a tediously re-boot.

In a multi-programming/user system, dual mode is a must.

Additional complexity in an operating system.

Distributed systems, networking, parallel processing (multiple processes within the same box, ie., SMP, and clustering) require further sophistication in the OS – see text and PPT slides (1.13 – 1.23).

-----------------------

Hardware Interface (

API (

“V.M.” interface

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download

To fulfill the demand for quickly locating and searching documents.

It is intelligent file search solution for home and business.

Literature Lottery