0% found this document useful (0 votes)
15 views7 pages

Operating System Overview and Functions

The document provides an overview of operating systems (OS), detailing their functions, components, and management processes. It covers topics such as process management, memory management, storage management, protection and security, and advanced topics like virtual machines and distributed systems. The structure and organization of computer systems, including single and multiprocessor systems, are also discussed, along with the roles of the OS in resource allocation and user interaction.

Uploaded by

seanshmulevich
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views7 pages

Operating System Overview and Functions

The document provides an overview of operating systems (OS), detailing their functions, components, and management processes. It covers topics such as process management, memory management, storage management, protection and security, and advanced topics like virtual machines and distributed systems. The structure and organization of computer systems, including single and multiprocessor systems, are also discussed, along with the roles of the OS in resource allocation and user interaction.

Uploaded by

seanshmulevich
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

OS textbook notes

Introduction

Content of this book

Overview: chapters 1 and 2 explain what operating systems are and what they do, and how they are
designed and constructed.
Process management: chapters 3-7 describe concurrency as the heart of modern operating systems. a
process is the unit of work in a system. A system like this has a collection of concurrently running processes.
Memory management : Chapters 8 and 9 deal with the management of memory during the execution of a
process.
Storage management: chapters 10-13 describe how mass storage, the file system, and I/O are handled in a
modern computer system.
Protection and security: chapters 14 and 15 describe the mechanism needed for the protection and security
of computer systems.
Advanced topics: chapters 16 and 17 discuss virtual machines and distributed systems.
Case studies: chapters 18 and in detail case studies of real operating systems. Compare and contrasts
design of different operating systems.

Overview (Part One)


An OS acts as an intermediary between the user of a computer and the computer hardware. The purpose of an
operating system is to provide an environment in which a user can execute programs in a convenient and
efficient manner.
- An operating system manages the hardware
- The hardware must provide appropriate mechanisms for the OS

Chapter 1
An OS is a program that manages a computer's hardware.
OS are designed with different purposes in mind.
Convenience
Efficiency
Combination of the 2.
Because an OS is large and complex its pieces should be carefully chosen.

What operating systems do.


A computer system can be divided into 4 components:
hardware
operating system
application programs
users
Basic computing resources for the system
Hardware
CPU
Memory
I/O

The application programs define the ways in which the basic computing resources are used to solve
users' computing problems.
Computer system consists of
Hardware
Software
Data

An OS provides an environment for programs to run and do useful work, almost like a government.

User view 1.1.1


A gui operating systems
usually has monitor, keyboard, mouse
Usually designed for one user
Monopolizes resources for that one user.
this type of of OS is designed mostly for ease of use
No attention paid to resource utilization
Some consideration of performance.

Terminal connected to a mainframe or ("minicomputer"?)


Other users are accessing the same computer through other terminals.
This type of OS puts more emphasis on resource utilization. it makes sure the user cannot take more
then their share of resource utilization.
The users share resources and can exchange information.

Workstation connected to networks of to other workstations and servers.


Users have dedicated resources
Also have shared resources available.
Networking
file
compute
print servers.
Designed to compromise between individual usability and resource utilization.

Some computers have little or no view, embedded computers in home devices may have numeric keypads
and may turn indicator lights on or off to show status. but they are designed primarily to run without
intervention.

System View 1.1.2


From the computer's point of view the operating system is the program most involved with the hardware.
The computer space programs use certain api's to interact with hardware.
The rest of the allocation that the operating system does is and should be closed off from the
programs running on the computer.
In this context you can view the operating system as a resource allocator

A different view of the os emphasized the need to control the various I/O devices and user programs. An
operating system is a control program. A control program manages the execution of the user programs to
prevent errors and improper use.
The term OS covers many roles and functions.
Operating systems were created when a military connected a network of computers into a multi function
mainframe.

Operating systems are hard to define because their needs are very different and the OS needs to adapt to the
hardware and the hardware is different between computers.
- many hardware ➔ many use-cases.
- Bare hardware is hard to control the OS acts as an api layer of abstraction for IO devices
- Allocating resources is a hardware thing.

The common functions of controlling and allocating resources are then brought together into one piece of
software: the operating system.
There is no accepted definition of what is part of the operating system. (some have bloatware, some are just
a terminal)
The operating system is the one programs running at all times on the computer. (This is usually called the
kernel)
System programs: Programs associated with the operating system but not necessarily part of the kernel.
Mobile operating systems often include middleware. a set of software frameworks that provide additional
services to application developers.
This middleware can include; databases, multimedia, and graphics.

1.2 Computer-System Organization.


A modern general-purpose computer system consists of one or more CPUs and a number of device controllers
connected through a common bus that provides access to shared memory

Each device controller is in charge of a specific type of device.


The CPU and the device controllers can execute in parallel, competing for memory cycles. To ensure orderly
access to the shared memory, a memory controller synchronizes access to the memory.
The CPU and device controllers can execute in parallel.

bootstrap program.

For a computer to start running it needs to have an initial program to run.


This initial program. or bootstrap program. tends to be simple.

Stored in ROM
Must know how to load in the operating system program.
On unix the first system process is 'init' it starts many other daemons.
Interrupt: signal from hardware or software. Event that triggers something to happen.
Software can trigger an interrupt with sys-calls.
Each computer design has its own interrupt mechanism
The interrupt must transfer control to the appropriate interrupt service routine.
The interrupt architecture must also save the address of the interrupted instruction.

1.2.2

The CPU can load instructions only from memory so any programs to run must be stored there.
RAM is typically DRAM, there are other types of memory like ROM and EEPROM. ROM cannot be changed.
EEPROM can be changed but infrequently.

A typical instruction–execution cycle, as executed on a system with a von Neumann architecture, first fetches an
instruction from memory and stores that instruction in the instruction register. The instruction is then decoded
and may cause operands to be fetched from memory and stored in some internal register. After the instruction
on the operands has been executed, the result may be stored back in memory.

1.2.3 I/O Structure

This section explains how the operating system handles IO


A device controller has some local buffer storage and a set of special purpose registers.
You can have the device controller completing work WHILE the CPU is accomplishing other work.

1.3 Computer-System Architecture


There are many different types of computer system organization. They can be roughy categorized by the number
of general-purpose processors used.

Single Processor Systems

One main CPU, that can execute a general purpose instruction set
There are some special-purpose microprocessors.

Multi Processor Systems

Advantages
- Increased throughput. But there is some overhead that comes with ensuring the processors work together
correctly.
- Economy of scale: multiprocessor systems cost less.
- Increased reliability.
The ability to continue providing service proportional to the level of surviving hardware is called graceful
degradation
some systems go beyond this. These systems are called fault tolerant.

Two different ways of multiprocessing


1. Asymmetric multiprocessing: A boss processor controls the system. the others look for the boss for
instruction or they already have predefined tasks.
2. Symmetric multiprocessing: all processors are peers. N processes can run if there are N CPU's.
Multiprocessing add's CPU's to increase computing power.

None all multiprocessor systems are multicore.

blade servers are a relatively recent development in which multiple processor boards, I/O boards, and
networking boards are placed in the same chassis. The difference between these and traditional multiprocessor
systems is that each blade-processor board boots independently and runs its own operating system

1.3.3 Clustered Systems.

Clustered system is a type of multiprocessor system which gathers together multiple CPUs.
composed of two or more individual systems—or nodes—joined together
clustering can be asymmetric or symmetric.
parallelization, which divides a program into separate components that run in parallel on individual computers in
the cluster.
You can cluster over a network or a single computer system.

Clustered systems are loosely coupled more linked via LAN and can consist of multicore systems or single
core systems.
- Clustering can be used to provide high availability services.
Many systems can attach to the same storage medium in a clustered network.

1.4 operating system structure

Provides the environment within which programs are executed.


Multiprogramming: increases CPU utilization by organizing jobs (code and data) so that the CPU always has
one to execute.
Jobs are stored on the disk, in the job pool.
Job pool contains processes on disk waiting to be moved into main memory.

The set of jobs in memory can be a subset of the jobs kept in the job pool.

If a process needs to wait for I/O

current executing process needs I/O


Switch to another job
The other job needs I/O
Switch to another job
As long as there is at least one job queued, the CPU will never be idle.
in a time sharing or multitasking system the CPU executed multiple jobs by switching between them so
frequently that the users can interact with each program while it is running.
Time sharing requires an interactive computer system.
A program loaded into memory and executing is called a process.
When a process executes it typically executes for only a short time before it either finishes or needs to
perform I/O.
Job Scheduling decided which process out of all ready processes should be brought into memory.
Virtual Memory allows for execution of a process that is not completely in memory. it enables users to run
programs that are larger than actual physical memory. It abstracts main memory ino

1.5 Operating-System Operations. pg. 21 important section

Events are signaled by the occurrence of an interrupt or a trap.


For each type of interrupt, separate segments of code in the OS determine which action should be taken.
an interrupt service routing is provided to deal with the interrupt.
The OS and the users share the same hardware and software.
If something gets stuck in an infinite loop, you don't want it to mess up the rest of the system.

Dual mode and multimode operation

OS must make sure it can tell the difference between OS code and user defined code.
Most computer systems provide hardware support for this.

Two separate modes.


User mode
Kernel mode, Also called:
supervisor mode.
system mode.
privileged mode.

The mode bit is added to the hardware of the computer


kernel (0)
user (1)
When a user program uses a sys-call the system must transition from user to kernel mode to fulfill the
request.
Dual mode protects the operating system
Interrupt, Trap, or System call starts the operating system.
Timer, the os is constantly timing out operations, sending and interrupt and switching to the next process.

Process management
A program in execution is a process.
A multithreaded process has many program counters.

Memory management

Questions
Are device controllers
Uniform memory access vs Non uniform memory access.
What is the difference between Multiprogrammed, Multithreaded, Multiprocessing, Multicore, multitasking.

You might also like