0% found this document useful (0 votes)
38 views

Introduction To Operating Systems

This document provides an outline and overview of key topics related to operating systems. It begins with an introduction to the course instructor and then outlines topics that will be covered loosely following the textbook. These include what operating systems do from the user and system perspective, computer system organization involving I/O structure, storage and interrupts, computer system architecture involving single-processor, multi-processor and distributed systems. It also covers operating system operations involving bootstrapping, events, multiprogramming and multitasking. Finally, it discusses resource management involving process, memory and file system management.

Uploaded by

BISHAL
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Introduction To Operating Systems

This document provides an outline and overview of key topics related to operating systems. It begins with an introduction to the course instructor and then outlines topics that will be covered loosely following the textbook. These include what operating systems do from the user and system perspective, computer system organization involving I/O structure, storage and interrupts, computer system architecture involving single-processor, multi-processor and distributed systems. It also covers operating system operations involving bootstrapping, events, multiprogramming and multitasking. Finally, it discusses resource management involving process, memory and file system management.

Uploaded by

BISHAL
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Introduction

Instructor: Dr. Vinicius Prado da Fonseca ([email protected])

1
Outline
● Loosely following the textbook
○ What Operating Systems Do?
○ 1.2 Computer-System Organization
○ 1.3 Computer-System Architecture
○ 1.4 Operating-System Operations
○ 1.5 Resource Management
○ 1.6 Security and Protection
○ 1.7 Virtualization
○ 1.8 Distributed Systems
○ 1.10 Computing Environments

2
What Operating Systems Do?
● User view
○ PC, mouse, keyboard, touch
screen, buttons…
○ Connected, Networks
○ Voice recognition
○ OS maximizes the work (or play)
user is performing
○ No user view
■ Embedded computers
■ Smart lamps
■ Smart power outlets

3
What Operating Systems Do?
● System View
○ Operating system as a resource
allocator
○ Many resources may be required
to solve a problem
■ CPU time
■ memory space
■ storage space
■ I/O devices
○ The operating system acts as the
manager of these resources

4
What Operating Systems Do?
● Defining Operating Systems
○ Everything that comes with the
computer
○ The one program running at all
times on the computer
■ Kernel
■ Microkernel
■ Multikernel
■ System programs and application
programs
○ Mobile, middleware
○ Firmware

5
What Operating Systems Do?
● Defining Operating Systems
○ No completely adequate
definition of an operating system
○ Create a usable computing system
○ Execute programs
○ Make solving user problems
easier
● Study OS is important
● Every software will probably run
in a OS

6
1.2 Computer-System Organization
● A modern general-purpose computer system
○ One or more CPUs
○ A number of device controllers
○ Connected through a common bus
○ Provides access between components and shared memory
● I/O structure, Storage, and Interrupts

7
Computer-System Organization - I/O Structure
● Device driver for each device controller
○ Understands the device controller
○ Provides a uniform interface to the device
■ Linux: /dev/sdXY, sda1, sdb3

8
Computer-System Organization - I/O Structure
● A large portion of operating system
code is dedicated to managing I/O
● Multiple devices exchange data via
a common bus
● Interrupt-driven I/O
○ moving small amounts of data
● Direct memory access ( DMA )
○ An entire block of data
○ Directly to or from the device and
main memory
○ No intervention by the CPU
○ Only one interrupt is generated per
block

9
Computer-System Organization - Storage
● The CPU can only load
instructions from memory
● Any programs must first be
loaded into memory to run
○ RAM
○ DRAM
○ Volatile
● CPU place instructions in
registers, fast
● Secondary storage
○ Hold large quantities of data
○ Permanently

10
Computer-System Organization - Interruptions
● Key part of how operating systems
and hardware interact
● It stops what it is doing and
immediately
● Transfers execution to a fixed
location
○ Starting address where the service
routine for the interrupt is located.
● Interrupt service routine executes
● CPU resumes the interrupted
computation

11
Computer-System Organization - Interruptions
● Must be handled quickly
● A table of pointers to interrupt
routines, low memory
○ Hold the addresses of the interrupt
service routines for the various
devices
● Operating systems as different as
Windows and UNIX dispatch
interrupts in this manner
● If the interrupt routine needs to
modify the processor state
○ Register values
○ It must explicitly save the current
state, registers

12
1.3 Computer-System Architecture
● Single-Processor Systems
○ Old organization, one CPU with a single processing core
○ The core is the component that executes instructions and registers for storing
data locally
○ These systems have other special-purpose processors as well
○ They may come in the form of device-specific processors
■ disk, keyboard, and graphics controllers
○ Not considered multiprocessor

13
1.3 Computer-System Architecture
● Multiprocessor Systems
○ Now dominate the landscape of computing
○ Two (or more) processors, each with a single or multi-core CPU
○ Share the bus, and sometimes the clock, memory, and peripheral devices
○ Increased throughput
■ Get more work done in less time
■ Speed-up ratio with N processors is not N, however; it is less than N
■ Overhead
■ Contention for shared resources
○ Asymmetric multiprocessing
○ Symmetric multiprocessing (SMP) most common

14
Computer-System Architecture
● Multiprocessor has evolved over time and now includes multicore
systems
○ Multiple computing cores reside on a single chip
○ On-chip communication is faster than between-chip communication
○ Appears to the OS as processors

15
Clustered Systems, Distributed Systems
● Interconnected via I/O
components, Network
● Do not share resources via bus
● Sharing a resource is more
complicated
● Requires cooperation
● Cooperate to accomplish
network-wide objective
● Also called nodes

16
1.4 Operating-System Operations
● We need an initial program to run
○ bootstrap program, simple
○ stored within the computer hardware in firmware
○ how to load the operating system
○ start executing that system
○ locate the operating-system kernel and load it into memory

17
1.4 Operating-System Operations
● Daemons
○ System programs that are loaded into memory at boot time
● The OS will sit quietly
○ No processes to execute
○ No I/O devices to service
○ No users to whom to respond something to happen, events
● Events
○ Interruption
○ Trap (or exception)
■ software-generated interrupt caused either by an error
○ System call
■ specific request from a user program

18
1.4 Operating-System Operations
● Multiprogramming and Multitasking
○ User run multiple programs
○ A program in execution is a process
○ OS keeps several processes in memory
simultaneously
○ OS picks one and begins to execute
○ The process may have to wait
■ such as an I/O operation
○ In a multiprogrammed system
■ OS simply switches to, and executes, another
process
○ As long as at least one process needs
to execute, the CPU is never idle

19
1.4 Operating-System Operations
● Multiprogramming and Multitasking
○ Memory management
○ CPU scheduling
○ Virtual memory

20
1.4 Operating-System Operations
● Dual-Mode and Multimode Operation
○ Distinguish between the execution of OS code and user-defined code
○ Two modes of operation
○ User mode and kernel mode (also called supervisor mode, system mode, or privileged mode)
○ A bit, called the mode bit, is added to the hardware of the computer to indicate the current
mode: kernel (0) or user (1)
○ User request a service from the operating system (via a system call)
○ Timers

21
1.5 Resource Management
● OS is a resource manager
● Process Management
○ Creating and deleting both user and system processes
○ Scheduling processes and threads on the CPUs
○ Suspending and resuming processes
○ Providing mechanisms for process synchronization
○ Providing mechanisms for process communication

22
1.5 Resource Management
● Memory Management
○ Keeping track of which parts of memory are currently being used and which
process is using them
○ Allocating and deallocating memory space as needed
○ Deciding which processes (or parts of processes) and data to move into and
out of memory

23
1.5 Resource Management
● File-System Management
○ Creating and deleting files
○ Creating and deleting directories to organize files
○ Supporting primitives for manipulating files and directories
○ Mapping files onto mass storage
○ Backing up files on stable (nonvolatile) storage media

24
1.5 Resource Management
● Mass-Storage Management
○ Mounting and unmounting
○ Free-space management
○ Storage allocation
○ Disk scheduling
○ Partitioning
○ Protection

25
1.5 Resource Management
● Cache Management
○ Hierarchical storage structure
○ Cache coherency

26
1.5 Resource Management
● I/O System Management
○ A memory-management component that includes buffering, caching, and
spooling
○ A general device-driver interface
○ Drivers for specific hardware devices

27
1.6 Security and Protection
● User, group, others (file access)
● Privileges

28
1.7 Virtualization
● Abstract the hardware of a single
computer into several different execution
environments
● Guest/host systems
● Advantage:
○ Complete protection/isolation of system
resources between VMs
○ Perfect vehicle for operating-systems
research and development
○ If the OS you are developing crashes, just
restart the VM
○ Useful when you have applications for
different OSs
● Disadvantage
○ No direct sharing of resources between
different VMs
○ Difficult to implement completely

29
1.8 Distributed Systems
● Collection of physically separate, possibly heterogeneous computer
systems that are networked to provide users with access to the
various resources that the system maintains
● Access to a shared resource increases computation speed,
functionality, data availability, and reliability
● Operating systems generalize network access as a form of file access
● Networks are characterized based on the distances between their
nodes
○ Local-area network ( LAN )
○ Wide-area network ( WAN )
○ Metropolitan-area network ( MAN ) could link buildings within a city
○ Personal-area network ( PAN ) Bluetooth
● Network operating system
30
1.10 Computing Environments
● How operating systems are used in a variety of computing
environments
● Traditional Computing
○ “typical office environment” is kind of blurry
○ web technologies are stretching the boundaries of traditional computing
● Mobile Computing
○ smartphones and tablet computers
○ Apple iOS and Google Android
● Client – Server Computing
○ compute-server system (API) and file-serve system (docs, videos)

31
1.10 Computing Environments
● Peer-to-Peer Computing
○ Torrent, blockchain
○ No centralized node
● Cloud Computing
○ Amazon, SaaS
● Real-Time Embedded Systems
○ IoT
○ Linux, specific OS, application-specific integrated circuits ( ASIC s)

32
Questions?

33

You might also like