Advanced Operating System: By: Dr. M. Alam
Advanced Operating System: By: Dr. M. Alam
Introduction
Grading
? Attendance
? 75% required
? Absence is marked after 10 minutes
? Assignments
? Late submission means 5% deduction per week
? Mid-term Exam.
? Presentation / Research Report
? Final Exam.
Course Outline
? Introduction
? Communication
? Synchronization
? Processes & Scheduling
? File System
? Specific OS
? Research Work
Example
Process Swapping in Time Sharing Systems
? System Calls
? Start process, Terminate process, Release memory, …
? Process Table Entry
Computer System
? Computer System Components
? Hardware – provides basic computing resources like
CPU, memory, I/O devices.
? OS – controls & coordinates the use of hardware
among the various application programs for the
various users.
? Application programs – define the ways in which the
system resources are used to solve the computing
problems of the users (Database systems, Video
games, Business programs).
? Users – (People, Machines, Other computers)
Advanced OS : Dr. M. Alam
Computer System
Application/Shell ? Functionality of OS
System ? Initializes H/W
Programs
? Provides device control
? Provides management, scheduling
Hardware & interaction of tasks
? Maintain system integrity
OS/KERNEL ? Error handling
? Converts user’s commands to
machine language
User
Parts of OS
Operating System
System View of OS
? Resource Allocation
? Computer System Resources- CPU, Clock, Memory,
Disks, Terminals, I/O devices, … … …
? OS acts as a manager of these resources
? Manages & allocates resources to specific users and
programs so that it can operate efficiently and fairly
? Control Program
? Controls the execution of user programs and operations
of I/O devices.
? Kernel
? The one program running at all times
? Process Control
? Memory Management
? File Systems & Management
? I/O Control
? Security
? Synchronization
? Communication
? Mainframe Systems
? Desktop Systems
? Multiprocessor Systems
? Clustered Systems
? Distributed Systems
? Real-Time Systems
? Handheld Systems
Mainframe Systems
512K Job 3
OS Features
? I/O routines supplied by the system.
? Memory management – the system must
allocate the memory to several jobs.
? CPU scheduling – the system must
choose among several jobs ready to run.
? Allocation of devices.
Advanced OS : Dr. M. Alam
Time-Sharing Systems
? The CPU is multiplexed among several jobs (CPU
is allocated to a job only if the job is in memory).
? A job swapped in and out of memory to the disk.
? On-line communication between the user and the
system is provided; when OS finishes the
execution of one command, it seeks the next
“control statement” from the user’s keyboard.
? These systems involves memory management and
protection, file system, CPU scheduling, Job
synchronization and communication, and avoiding
jobs to be deadlocked.
Advanced OS : Dr. M. Alam
Desktop Systems
Distributed Systems
? Distribute the computation among several
physical processors.
? Loosely coupled system
? Each processor has its own local memory
? Processors communicate with each other through high-
speed buses or switches or telephone lines.
? Requires networking infrastructure
? Local area networks (LAN) or
? Wide area networks (WAN)
? May be either client-server or peer-to-peer
systems.
Advanced OS : Dr. M. Alam
Distributed Systems (Conti… .)
? Advantages of distributed systems: Resource Sharing,
Computation Speedup, Load Sharing, Reliability, … …
? Network OS
? Provides file sharing
? Provides communication schemes that allows different
processes on different computers to exchange messages.
? Runs independently from the other computers on the network.
? Distributed OS
? Less autonomy between computers
? Give the impression there is a single OS controlling the
network.
Clustered Systems
? Combination of two or more systems (nodes)
connected through S/W and network infrastructure
? Shared resources
? Processors communicate using message passing
? Cheaper with respect to high processing power
? Homogeneous Cluster
? All nodes have similar architecture and similar OS
? Heterogeneous Cluster
? Nodes have different architecture or different OS
? No specific OS; OS is installed on all machines
? Unavailability of general-purpose distributed file
system
Advanced OS : Dr. M. Alam
Real Time Systems
Handheld Systems
Starting of OS
? Turn on or restart the computer system, activates the
bootstrap loader
? Bootstrap
? Initializes the hardware (Interrupts)
? Read OS from somewhere ( Memory or disk or network )
? OS loads and starts a user-level 'init' program
? ‘init’starts an original collection of processes,
usually specified by a configuration file
? typically including a login authorization program for each
terminal line or other input device
1. Monolithic System
2. Layered System
3. Virtual Machines
4. Client-Server Model
Monolithic System
Basic Organization
Layered System
Layer 1
? Allocate space for processes in main memory
? For larger process, extra part is placed on disk/drum
? Responsible to bring pages into memory when needed
Advanced OS : Dr. M. Alam
Layer 2 & Layer 3
Layer 2
? Communicate between process & operator
console
? Each process has its own operator console
Layer 3
? Manages I/O devices
Layer 4
? Contains user programs
? User program do not need to bother about
process, memory, console or I/O management
Layer 5
? Contains system operator process
Virtual Machines
? VM/370 based on observation that a time
sharing system provides
1. Multiprogramming and
2. An extended machine with more convenient interface
than the bare H/W
? Performs multiprogramming
? Runs on bare H/W
? Provides several virtual machines to next layer.
? These are not extended machines with files & other
nice features but these are exact copies of bare H/W
(including kernel / user mode, I/O interrupts, & … .
like real machine)
? Each virtual machine is identical, one can run any OS
that will run directly on H/W
? Different virtual machines may run different OS
Advanced OS : Dr. M. Alam
Client-Server Model
? Goal: Develop most OS functions in user
processes & leaving minimal kernel in OS
? Invoking a service:
? User process (client process) sends request to
server process
? Then server process performs the job & send
results
? Kernel
? Handle communication between clients and
servers
? provides low-level resource management
Advanced OS : Dr. M. Alam
Basic Organization
? Modular Approach:
? Divide OS into parts
? Each part handles one module (set of specific
services) of the system
? Such as file service, process service, terminal
service, memory service, …
Features
? Modular Approach is easier to understand
? Management is easier for smaller part
? Servers
? Run as user-mode process instead of kernel-mode
? Do not have direct access to H/W
? Any failure in a server will cause the crash in
that particular service not in the whole system
Messaging
Advanced OS : Dr. M. Alam
Summery
Research Topics
Choose a research paper/topic for writing the
report that you have to submit
? Deadlock Prevention
? Multiple Locks
? OS for Mobile Equipments
? Synchronization
? Scheduling
? … … … .