Operating Systems
Introduction
Timothy Kivumbi
06/10/2024 Uganda Technology and Management University
Introduction
Week 1 Introduction to Operating Systems Basic concepts, functions of OS, history,
components
Week 2 Operating System Structures Interrupts, system calls, memory structure
Week 3 Process Management -Threads Types, benefits, creation, user and kernel threads
Week 4 Process Management- Scheduling CPU Scheduling
Week 5 Process Management- Synchronization Process Synchronization
Week 6 Storage Management- Deadlocks Deadlocks, introduction, locking, prevention, detection,
handling, recovery
Week 7 Storage Management-Memory management, swapping, multi programming, paging, allocation
Virtual memory virtual memory, segmentation, thrashing, caching,
replacements
Week 8 Device management: I/O Systems, serial and parallel devices, abstracting,
buffering, performance, DMA, recovery, hand-held
devices
Week 9 Other topics, Course revision and summary.
Introduction
Computer applications today require a single machine to perform many
operations and the applications may compete for the resources of the machine.
This demands a high degree of coordination
This coordination is handled by system software known as the operating
system
06/10/2024
Operating system
A program that acts as an intermediary between a user of a computer and the
computer hardware.
An OS is a program which acts as an interface between computer system users
and the computer hardware.
Without an operating system, a computer is just a collection of components
heating up the room as no-one would be able to make any practical use of the
machine.
An OS is a special computer program (software) that controls the computer
(hardware).
06/10/2024
Quite a number
06/10/2024
Operating system goals
Execute user programs and make solving user problems easier.
Make the computer system convenient to use.
Use the computer hardware in an efficient manner.
06/10/2024
Operating System Definition
OS is a resource allocator
Manages all resources
Decides between conflicting requests for efficient and fair resource
use
OS is a control program
Controls execution of programs to prevent errors and improper use of
the computer
Types of Operating Systems:
• Single-User, Single-Tasking:
• Supports one user and allows running only one program at a time (e.g., early personal
computers).
• Single-User, Multi-Tasking:
• Supports one user and allows running multiple programs concurrently (e.g., modern desktop
operating systems like Windows or macOS).
• Multi-User:
• Supports multiple users simultaneously, each running multiple programs (e.g., server operating
systems).
• Real-Time:
• Designed for time-sensitive applications where quick response is critical (e.g., embedded
systems, aerospace systems).
06/10/2024 Academic Editing Proofreading Service
Examples of Mainstream Operating Systems:
According to the application fields:
desktop OS, server OS, and embedded OS
According to the number of supported users:
single user OS (MSDOS) and multiple user OS (Unix, Linux, and Windows)
According to the openness of source code:
open-source OS (Linux and Unix) and non-open-source OS (Windows and Mac
OS)
According to the handling modes:
batch processing system (DOS), time-sharing system (Linux, UNIX, Mac OS,
and Windows), real-time OS
06/10/2024 Academic Editing Proofreading Service
Computer Startup
bootstrap program is loaded at power-up or reboot
Typically stored in ROM or EPROM, generally known as
firmware
Initializes all aspects of system
Loads operating system kernel and starts execution
Computer system Structure
Computer system can be divided into four components
1. Hardware – provides basic computing resources (CPU, memory, I/O devices).
2. Operating system – controls and coordinates the use of the hardware among the various
application programs for the various users.
3. Applications programs – define the ways in which the system resources are used to solve
the computing problems of the users (compilers, database systems, video games, business
programs).
4. Users (people, machines, other computers).
06/10/2024
Computer system components
06/10/2024
Parts of an operating system
The operating system has four main parts:
1. The kernel
2. The device drivers
3. The user interface
4. The system utilities
06/10/2024
The kernel
The OS program running at all times is the kernel, starts when OS
is loaded
This has the task of loading the applications into memory, making
sure they do not interfere with one another and allowing them to
share use of the CPU efficiently.
The kernel also handles file storage to and from secondary storage
devices such as hard disks and optical drives.
In other words the kernel handles:
Loading / Unloading applications from memory
Scheduling tasks to run on the CPU
Memory management
File management
Data security
06/10/2024
The device drivers
Every piece of hardware that makes up the computer or connected
to it, will have a device driver that allows the operating system to
control and communicate with it.
There could be hundreds of device drivers pre-installed with the
operating system, and the right ones for that particular computer
set-up is loaded on boot-up.
Manufacturers of printers, graphics tablets, scanners, digital
cameras and so on, will normally provide device drivers for each
make of operating system.
A device driver for Windows is different from the device driver for
Linux
06/10/2024
The user interface
This part of the operating system is directing what you see on the
screen (via the device driver) and reacting to your key presses and
other inputs.
The user interface could be a basic command line interface, as you
might find on a server, or it might be a full blown Graphical User
Interface (GUI) such as the Mac OS X, Windows or perhaps Gnome
on Linux.
06/10/2024
The system utilities
System utilities are software tools or programs that help manage and maintain various aspects
of an operating system. They provide functionality to perform tasks such as system monitoring,
diagnostics, optimization, and troubleshooting
This part of the operating system provides all the basic facilities that run in the background
without user interaction.
For example,
Print spool services
Cryptographic password management.
File management services
06/10/2024
OS importance
The operating system is the most important program that runs on
a computer.
Operating systems perform basic tasks, such as
recognizing input from the keyboard, sending output to the display
screen, keeping track of files and directories on the disk, and
controlling peripheral devices such as disk drives and printers.
Every general-purpose computer must have an operating system to
run other programs and applications.
06/10/2024
Evolution of processing systems
Batch systems
Multiprogramming and Time-sharing systems
Personal systems
Parallel systems
Distributed systems
Cluster and Grid Computing Systems
Real time systems
06/10/2024
Read about these systems and write a
short description for submission as
indicated on the platform
Be clear to indicate the pros and cons in
each category.
06/10/2024 Academic Editing Proofreading Service
Operating System Components
Process Management,
Memory Management,
Secondary Storage Management,
File Management,
Protection System,
Networking,
User interface
Process Management
Process - fundamental concept in OS
Process is a program in execution.
Process needs resources - CPU time, memory, files/data and I/O devices.
OS is responsible for the following process management activities.
Process creation and deletion
Process suspension and resumption
Process synchronization and interprocess communication
Process interactions - deadlock detection, avoidance and correction
22
Memory Management
Main Memory is an array of addressable words or bytes that is quickly
accessible.
Main Memory is volatile.
OS is responsible for:
Allocate and deallocate memory to processes.
Managing multiple processes within memory - keep track of which parts of
memory are used by which processes. Manage the sharing of memory
between processes.
Determining which processes to load when memory becomes available.
23
Secondary Storage and I/O Management
Since primary storage is expensive and volatile, secondary storage is
required for backup.
Disk is the primary form of secondary storage.
OS performs storage allocation, free-space management and disk scheduling.
I/O system in the OS consists of
Device driver interface that abstracts device details
Drivers for specific hardware devices
24
File System Management
File is a collection of related information defined by creator - represents
programs and data.
OS is responsible for
File Creation and Deletion: The OS provides APIs to create, delete, and manipulate files.
File Access and Permissions: The OS controls file access rights and permissions,
ensuring data security.
File System Navigation: The OS allows traversal of file directories and provides utilities for
file and directory management.
File I/O Operations: The OS facilitates reading from and writing to files, handling data
transfer between memory and storage devices.
25
Protection and Security
Protection mechanisms control access of programs and processes to user and
system resources.
Protect user from himself, user from other users, system from users.
Protection mechanisms must:
Distinguish between authorized and unauthorized use.
Specify access controls to be imposed on use.
Provide mechanisms for enforcement of access control.
Security mechanisms provide trust in system and privacy
authentication, certification, encryption etc.
26
Network Services
OS is responsible for
Network Configuration: The OS allows configuration of network settings, including IP
addresses and DNS.
Network Security: The OS includes firewall, encryption, and authentication
mechanisms for secure network communication.
27
User Interface
The OS provides user interaction within a computer system.
Command-Line Interface (CLI): The OS provides a text-based interface
for executing commands and interacting with the system.
Graphical User Interface (GUI): The OS offers a visual interface with
windows, icons, menus, and pointers (WIMP interface).
Window Management: The OS manages windows, allowing users to
manipulate and organize application windows.
Input Handling: The OS processes user input from devices like
keyboards, mice, and touchscreens.
28
End of lecture
06/10/2024 Uganda Technology and Management University