Ch5 OS
Ch5 OS
12/27/2023 BY SHIMELIS A. 1
OUTLINES:
Operating System Operating System Structure
System & application software Operating System Security
Function of Os
File system in Os
Type of Os
Booting Process
Popular Os
Challenge in Os design
Evaluation of Os
Future Trends in OS
Advantage of Os
System call
Component of Os
12/27/2023 BY SHIMELIS A. 2
OPERATING SYSTEM
OS is a software that manages computer hardware and software resources and provides
common services for computer programs.
OS are crucial software that provides an interface for users.
A program that acts as an intermediary between a user of a computer and the computer
hardware
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
Controls execution of programs to prevent errors and improper use of the
computer
12/27/2023 BY SHIMELIS A. 3
FUNCTIONS OF AN OPERATING SYSTEM
Process Management:
The OS manages and allocates resources to different processes running on the computer.
Process Scheduling: Determines the order and priority in which processes are executed.
Process Synchronization: Ensures that processes cooperate and share resources without
conflicts.
Process Communication: Facilitates communication and data sharing between
processes.
Memory Management:
It allocates and tracks the memory space for processes and manages memory access.
Memory Allocation: Assigns memory to processes based on their requirements.
Memory Protection: Prevents one process from accessing or modifying another process's
memory.
Virtual Memory: Allows the execution of processes that are larger than the available
physical memory.
12/27/2023 BY SHIMELIS A. 4
FUNCTIONS OF AN OPERATING SYSTEM(CONT’D)
File System Management:
The OS provides a hierarchical structure for organizing and accessing files.
File Organization: Manages files and directories, including creation, deletion, and
renaming.
File Access: Controls permissions and ensures authorized access to files.
File Storage: Handles the physical storage of files on secondary storage devices.
Device Management:
It manages input/output devices, such as keyboards, printers, and disks.
Device Allocation: Assigns devices to processes and manages device queues.
Device Drivers: Provides software interfaces for devices to communicate with the OS.
Input/output Handling: Handles data transfer b/n devices and memory or processes.
12/27/2023 BY SHIMELIS A. 5
FUNCTIONS OF AN OPERATING SYSTEM(CONT’D)
User Interface:
The OS provides a user-friendly interface for users to interact with the computer
system.
Types of User Interfaces:
Command-Line Interface (CLI): Users enter commands through a text-based
interface.
Graphical User Interface (GUI): Users interact with visual elements, using windows,
icons, and menus.
12/27/2023 BY SHIMELIS A. 6
TYPES OF OPERATING SYSTEMS
Various types of operating systems exist to cater to different requirements.
Single-User, Single-Tasking:
Supports a single user and allows running only one program at a time.
Early personal computers such as Commodore 64 or early versions of MS-DOS.
Single-User, Multi-Tasking:
Supports a single user and allows running multiple programs simultaneously.
Examples: Windows, macOS, Linux distributions for personal computers.
12/27/2023 BY SHIMELIS A. 7
TYPES OF OPERATING SYSTEMS(CONT’D)
Multi-User:
Supports multiple users to log in and use the computer system concurrently.
Unix-based systems (Linux, macOS), mainframe systems.
Real-Time:
Designed for time-sensitive applications and guarantees a certain response time for
critical tasks.
Real-time operating systems used in aerospace, industrial automation, and medical
devices.
12/27/2023 BY SHIMELIS A. 8
Windows:
POPULAR OPERATING SYSTEMS
Developed by Microsoft.
Widely used on personal computers and servers.
Offers a graphical user interface and supports a vast array of applications.
macOS:
Developed by Apple.
Used on Apple Macintosh computers.
Known for its user-friendly interface and seamless integration with other Apple
products.
12/27/2023 BY SHIMELIS A. 9
Linux:
POPULAR OPERATING SYSTEMS(CONT’D)
Open-source operating system.
Widely used in servers, embedded systems, and Android devices.
Offers flexibility, security, and a vast range of distributions catering to different needs.
Android:
Open-source operating system based on the Linux kernel.
Primarily designed for mobile devices such as smartphones and tablets.
Supports a wide range of apps and offers customization options.
iOS:
Proprietary operating system developed by Apple.
Used on iPhones and iPads.
Known for its smooth performance, security features, and optimized user experience.
12/27/2023 BY SHIMELIS A. 10
EVOLUTION OF OPERATING SYSTEMS
Batch Processing Systems:
Early systems that executed jobs in batches without user interaction.
Users submitted jobs on punched cards or paper tape.
Examples: UNIVAC I, IBM 7090.
Time-Sharing Systems:
Introduced interactive computing, allowing multiple users to interact with the
computer system concurrently.
Users accessed the system through terminals.
Personal Computers:
Operating systems designed for individual users on personal computers.
Examples: MS-DOS, Windows, macOS.
Client-Server Architecture:
Distributed computing model with centralized servers and client machines.
Servers provide resources and services to client machines.
Examples: Windows
12/27/2023 BY SHIMELIS A. 11
EVOLUTION OF OPERATING SYSTEMS(CONT’D)
Cloud Computing:
Utilizes remote servers to store and process data, accessed through the internet.
Provides on-demand resources and scalability.
Examples: Amazon Web Services (AWS), Microsoft Azure, Google Cloud
Platform.
Mobile Operating Systems:
Operating systems designed for mobile devices.
Offer features such as touch-based interfaces, app stores, and optimized power
consumption.
Examples: Android, iOS.
Internet of Things (IoT) Operating Systems:
Operating systems tailored for IoT devices, enabling connectivity and data
exchange.
Examples: FreeRTOS, Contiki, Zephyr.
12/27/2023 BY SHIMELIS A. 12
ADVANTAGES OF USING AN OS
Improved Efficiency:
The OS optimizes resource allocation, manages processes, and reduces manual
intervention, resulting in improved system performance.
Resource Sharing:
Operating systems enable multiple users or applications to share hardware resources
efficiently.
Simplified User Interface:
The OS provides a user-friendly interface, making it easier for users to interact with
the computer system.
Enhanced Security:
Operating systems incorporate security measures to protect data and prevent
unauthorized access.
Application Development:
OS provides developers with a set of APIs and tools to create applications that can
run on the system.
12/27/2023 BY SHIMELIS A. 13
System Software And Application Software
System software
manage and control the basic operations of a computer system.
provides a platform for running application software
enables communication between hardware components.
Examples: Windows, macOS, Linux, device drivers…
Application software
programs that are designed to perform specific tasks for the user.
intended to fulfill user requirements and solve particular problems.
Example: word, spreadsheet, web browsers, graphic design software…
12/27/2023 BY SHIMELIS A. 14
Kernel:
COMPONENTS OF AN OS
The core component of the operating system that interacts directly with the hardware.
Manages memory, processes, and devices.
Provides essential services to other parts of the operating system.
running at all times on the computer.
Device Drivers:
Software components that enable the operating system to communicate with hardware
devices.
Provide an interface for the OS to control and manage device operations.
User Interface:
Enables users to interact with the operating system and access applications.
Can be command-line-based (CLI) or graphical (GUI) depending on the OS.
12/27/2023 BY SHIMELIS A. 15
CHALLENGES
Security:
IN OS DESIGN
Protecting the system from unauthorized access, malware, and other security threats.
Implementing access control mechanisms and encryption techniques.
Reliability:
Ensuring the operating system operates continuously without errors or failures.
Implementing error handling, fault tolerance, and recovery mechanisms.
Scalability:
Designing the OS to handle increasing workloads and system demands.
Supporting the addition of new hardware or software components without significant
disruptions.
Compatibility:
Ensuring the operating system is compatible with a wide range of hardware devices
and software applications.
Providing backward compatibility to support older hardware or software.
12/27/2023 BY SHIMELIS A. 16
FUTURE TRENDS IN OS
Virtualization:
Increasing adoption of virtualization technologies to optimize resource utilization and
enable efficient management of virtual machines.
Cloud Integration:
Operating systems are evolving to integrate seamlessly with cloud computing
platforms, enabling users to leverage cloud resources.
Internet of Things (IoT) Support:
Operating systems are being designed to support the unique requirements of IoT
devices, including low power consumption, real-time processing, and connectivity.
Artificial Intelligence (AI) Integration:
Operating systems are incorporating AI capabilities for tasks like resource
optimization, predictive maintenance, and security threat detection.
12/27/2023 BY SHIMELIS A. 17
OPERATING SYSTEM STRUCTURE
Multiprogramming (Batch system): needed for efficiency
Multiprogramming organizes jobs (code and data) so CPU always has one to execute
A subset of total jobs in system is kept in memory
One job selected and run via job scheduling
When it has to wait (for I/O for example), OS switches to another job
Timesharing (multitasking): needed for speed
Response time should be < 1 second
Each user has at least one program executing in memory process
If several jobs ready to run at the same time CPU scheduling
Virtual memory allows execution of processes not completely in memory
12/27/2023 BY SHIMELIS A. 18
OPERATING SYSTEM SECURITY
1. Authentication and Access Control:
Ensuring that only authorized users can access the system and its resources.
Techniques include passwords, biometrics, and multi-factor authentication.
2. Data Protection:
Protecting sensitive data from unauthorized access or modification.
Techniques include encryption, access control lists, and secure file systems.
3. Network Security:
Protecting the operating system and its communication channels from network-based
attacks.
Techniques include firewalls, intrusion detection systems, and secure protocols.
4. Malware Protection:
Detecting and preventing the execution of malicious software, such as viruses,
worms, and ransomware.
Techniques include antivirus software, intrusion prevention systems, and
sandboxing.
12/27/2023 BY SHIMELIS A. 19
FILE SYSTEMS IN OPERATING SYSTEM
A file system is a method an operating system uses to store, organize, and manage files
and directories on a storage device.
Some common types of file systems include:
FAT (File Allocation Table):
An older file system used by older versions of Windows and other operating
systems.
NTFS (New Technology File System):
A modern file system used by Windows.
supports features such as file and folder permissions, compression, and encryption.
ext (Extended File System):
A file system commonly used on Linux and Unix-based operating systems.
HFS (Hierarchical File System):
A file system used by macOS.
APFS (Apple File System):
A new file system introduced by Apple for their Macs and iOS devices.
12/27/2023 BY SHIMELIS A. 20
BOOTING PROCESS
is a critical stage in starting up an operating system, as it ensures that the hardware is
functioning correctly and prepares the system for the user to interact with it.
1. Powering on the computer:
When you press the power button or initiate a system restart, the computer's power
supply delivers electricity to the hardware components, causing them to start functioning.
the system's firmware (typically BIOS or UEFI) is activated.
The firmware is responsible for initializing and testing the hardware components of the
computer, including the CPU, memory, storage devices, and peripherals.
2. POST (Power-On Self-Test) and system initialization:
The POST is a series of diagnostic tests performed by the computer's firmware (BIOS
or UEFI) to ensure that the hardware components are working properly.
The POST checks the CPU, memory (RAM), storage devices (hard drives, solid-state
drives), graphics card, and other connected peripherals.
If any hardware component fails the POST, an error message or a series of beeps is
displayed to indicate the issue.
12/27/2023 BY SHIMELIS A. 21
BOOTING PROCESS(CONT’D)
3. Loading the boot loader:
The boot loader is a small program located in the boot sector of a storage device.
The boot loader's role is to locate and load the operating system's kernel into memory.
4. Loading the kernel and initializing the operating system:
Once the boot loader is executed, it reads the kernel image from the storage device and
loads it into the computer's memory (RAM).
The kernel is the core component of the operating system responsible for managing
system resources, such as the CPU, memory, and devices.
During the kernel initialization, device drivers are loaded and initialized to enable
communication with hardware devices.
The kernel also sets up the memory management system, establishes the initial process
(usually the init process), and configures system settings.
12/27/2023 BY SHIMELIS A. 22
BOOTING PROCESS(CONT’D)
5.Init process and user interaction:
The init process is the first user-space process spawned by the kernel. It is responsible
for starting and managing other processes, initializing system services, and launching the
user interface.
Depending on the operating system and its configuration, the init process may start a
command-line interface (CLI) or a graphical user interface (GUI) environment.
The user can then interact with the operating system, launch applications, and perform
various tasks.
Generally; the booting process ensures that
the hardware is functional
loads the operating system's kernel into memory and
initializes the necessary components for the operating system to run.
It is a critical step in starting up a computer and allows users to access the features
and functionality provided by the operating system.
BY SHIMELIS A.
12/27/2023 23
SYSTEM CALL
mechanism provided by the operating system that allows user-level programs to request
services from the operating system kernel.
acts as an interface between the user-level applications and the low-level functionalities
provided by the operating system.
request to the operating system to perform a specific action on behalf of the program.
include tasks such as creating or opening files, reading or writing data, allocating
memory, creating processes, managing input/output devices, and more.
Provide the service of Os to the process via API( application process interface)
When a process s being executed & it requires any resource:
It creates a system call (interrupt) and send to the kernel.
Nb: process executed in user space and system call is created in user space & get
executed in kernel space in memory
System call is the only entry point to the kernel space
BY SHIMELIS A.
12/27/2023 24
TYPE OF SYSTEM CALL
Process control system call:
Responsible for process management.
Creating, terminating…
File management system call
Responsible for file manipulation
File creation, reading, editing,…
Device management system call
Responsible for device manipulations.
Writing/ reading data to/ from buffer
Information maintenance system call
Responsible for managing information being shared b/n process and Os
Communication system call:
Responsible for IPC (inter process comminication
12/27/2023 BY SHIMELIS A. 25
12/27/2023 BY SHIMELIS A. 26