Operating Systems

Without an Operating System

  • Program instructions must be loaded by hand

  • No user interface is provided

  • System remains idle while waiting for user input

  • System is unable to interact with files

  • Peripheral devices must be self-sufficient

  • No “background”, only one program can run at a time

To Define an Operating System

  • A collection of programs, collectively serve the purposes

    • Manage & integrate hardware resources of a computing system

    • Make resources available to user & their programs

    • Keep track of user & supporting tasks; moving resources between them as needed

    • Timely, efficient, & productive

    • Prioritize user’s ability to be productive & efficient

Operating System Basic Services

  • Accept commands/requests from users & respond appropriately

  • Manage, load, & execute programs

  • Control access to & manage all hardware resources of the computer

Categorizing Operating Systems

  • Hardware

  • Organization

  • Degree of interaction

Hardware & the OS

  • Given hardware platform may support a variety of operating systems

  • Given operating system may work on wide variety of underlying hardware

  • For an operating system to function without a prescribed platform, needs to

    • Support program & file portability

    • Provide an easily recognizable interface for ease of use

    • Be implemented through a systems programming language that also supports a variety of platforms

Role of the Operating System

Expanded View of OS Services

  • Effectively functions as a middleman for any & all interactions between user & hardware

Operating System Components

  • Memory resident

    • Kernel

    • Remains in memory as long as OS is active

    • Contains essential services req by other parts of OS & applications

    • Responsible for managing memory, processes, tasks, & secondary storage

  • Memory non-resident

    • Infrequently used programs, software tools, commands, etc

    • Not critical to operation

  • Bootstrap program

    • Assist in getting OS up & going

Operating System Configurations

  • Monolithic (Modular)

    • Traditional kernel task

    • Unix & Linux

    • All OS services run in kernal mode & part of kernal

    • A single, static program capable of handling every kernel-related task

    • Anything a program may need that it cannot provide itself (via libraries) is included

      • Device drivers, memory management, file systems, schedulars, etc

    • Performance is maximized, everything runs in same memory space with same permissions

    • One program effectively responsible for everything, leads to them becoming quite large & difficult to maintain

    • If there is a bug or major error, whole system is going down with it

    • Assist somewhat with issues

      • Reduce size of “core” kernal, non-essential modules called as needed

      • Once module has been called, integrated for duration of the system being on

  • Microkernal

    • Every kernal task not direct hardware access or inter-process communication (IPC) is delegated to “server” in user space

      • IPC, memory management, multitasking ^ process scheduling, I/O initialization ^ similar remain in “microkernal” in kernal space, require elevated level of access

      • File systems, network stacks, full device drivers, complete process & memory handling all handled by servers in user space

      • Sharply reduces “surface area” for small bug or error to bring down entire system

      • System becomes more agile

        • Replacement/new services can be enabled & patches applied “live” with no need to restart

      • Spreading of services, tasks used to be handled within kernal now involve 2+ separate serves, requires IPC & increased number of steps

      • Can lead to hefty drop in performance, depend on underlying hardware & efficiency of messaging

  • Hybrid

    • Compromise between performance of monolithic & safety of micro

    • Basis is as a microkernal

    • Additional functionality returned to kernal space

    • Servers in user space still utilized for device drivers & other “less popular” & higher vulnerability services

Degree of Interaction

  • Interactive

    • What likely to expect; system responds to inputs, you respond to outputs, back & forth continues

    • Aka conversational systems

  • Batch-processing

    • User submits program or large set of jobs to processed

    • No interaction during processing, only at initial input & final output

  • Event-driven

    • Typically zero direct user interaction

    • OS tasks initiated by interrupts or service req generated by sensors or other systems

7 Types of Operating Systems

  • Single-user systems & workstations

    • Predominant systems in use

    • Laptop & desktop computers & workstations

    • Mac OS, most versions of Windows & Linux

  • Mobile operating systems

    • Designed for small hand-held devices (smartphones)

    • Features of single-user multitasking systems with constraints on memory, storage, CPU execution speed, & electrical power

    • Touch screen capability, special keyboard handling, GPS, handwriting, & voice recognition

    • IOS, Android, E-readers, tablets

  • Mainframe systems

    • Designed to manage large scale computing resources

    • Externsive I/O capability to handle large numbers of transactions

    • Support batch data processing operations, cloud computing & large Web services & database processing

    • Consist of clusters made up of multiprocessor units

  • Network servers

    • Focused on supporting clients connected to the server

    • Web services, file services, print services, application services, and/or database services to clients

    • Improved security, high reliability, backup facilities

  • Real-time systems

    • One or more processes must be able to access the operating system immediately

    • Multitasking system where real-time program’s interrupts have very high priority

  • Embedded control systems

    • Specialized systems designed to control a single piece of equipment

    • Software usually provided in ROM

    • Real-time system dedicated to particular application

  • Distributed systems

    • Growing in prominence & importance

    • Processing power distributed among computers in cluster or network

    • Program components may be stored on different systems & executed upon requires using CORBA standards

Process Control & Management

  • Processes are how the OS keeps track of tasks to execute; each active program will generate at least one

  • User processes will rely on OS processes

  • Requires Inter-Process Communication (IPC) & messaging services

    • Direct comms between processes will be handled by the OS

    • User can also force 2 processes to interact through use of pipes “I” & similar tools

  • Some process will also have multiple sub-tasks that can or should be worked on simultaneously

    • OS can threat the process

    • Allows more than one step to be completed at a time which collecting all threads under one process & PID

Memory Management

  • Track usage & availability of memory (primary storage)

  • Will constantly observe

    • Programs loaded into memory

    • Amount of space each program uses

    • Remaining space available (unallocated)

  • Handles the allocation & deallocation of space when a program is loaded ^ then completed

  • Prevents programs from accessing memory outside of their assigned space

  • Often implemented with a virtual memory/storage system for periods of high demand

I/O Services

  • Blanket term for a group of features that allow devices outside the core to be integrated

  • Device drivers - special programs that tell an OS how to use a piece of hardware (device)

    • Some will be bundled with the OS; these are often generic or for very common devices

    • All drivers will include techniques for handling I/O operations

      • Most important are Interrupts, special type of IPC

  • Plug- and-play support

    • Allows the OS to interact with unknown devices

Scheduling

Concurrent Processing

  • Multitasking/multiprogramming

    • Uses contact switching & other techniques to allow multiple processes to share limited resources

    • Can offer the appearance of simultaneous execution on even a single CPU

  • Multiprocessing

    • True simultaneous processing of multiple processes

    • Requires more than one CPU (logical CPU; includes both separate chips & separate cores on one chip)

Achieving Multitasking

Time-Slicing/Time-Sharing


173.jpg

CPU Sharing during I/O Break


171.jpg

Secondary Storage Management

  • Long-term storage systems (HDDs, SSDs, etc.) require both physical & logical management

    • Keep track of free secondary storage space

    • Maintain file system(s) & directories

    • Optimize completion of I/O tasks for efficient disk usage

    • Organize the combination of hardware & software that makes up the storage system

File Management

  • Basic file Management system provides

    • Directory structures for each I/O device

    • Tools to copy, move, store, retrieve, & manipulate files

    • Information about each file in the system & tools to access that information

    • Security mechanisms to protect files & control access

  • Additional file management features

    • Backup, emergency retrieval, & recovery

    • File compression

    • Journaling

    • Transparent network file access

    • Auditing

Network & Communication Services

  • TCP/IP protocol suite

    • Locate & connect to other computers

    • Pass application data in packets to other systems

    • Access files, I/O devices, & programs from remote systems

    • Support distributed processing

  • Network Applications

    • Email, remote login, Web services, streaming multimedia, VOIP telephony, VPN

  • Communication services

    • Interface between communication software & OS I/O control system that provides network access

Security & Protection Services

  • Protect OS from user processes

  • Protect processes from each other

  • Protect processes from the outside world

  • Prevent unauthorized entry to the system

  • Prevent unauthorized system use by authorized users

User Interface & Command Execution Services

  • Types of user interfaces

    • CLI: command line interface (terminal, TTL)

    • GUI: graphical user interface

  • Shell

    • User interface & command processor that interacts with the kernel

    • UNIX/Linux: C, Bourne, bash, Kom, zsh shells

  • Command Languages

    • MS Windows: .BAT files, Windows Powershell

    • UNIX/Linux: shell scripts

    • IBM Platforms: JCL

System Tools

  • Windows

    • Control panel

    • Task manager

  • Linux

    • Superuser (root): system administrator account

    • Adduser/deluser: administer user accounts

    • Mount/umount: Mount & unmount a file system

    • Fsck: check & repair a file system

    • Ufsdump/ufsrestore: create & restore backups

System Administration Support

  • Network administration

  • Backups

  • Software installations & upgrades

  • OS installations (system generation), patches, & upgrades

  • System tuning & optimization

  • Monitoring performance

  • Recovering lost data

  • System configuration & setting group configuration policies

  • Adding & deleting users

  • Controlling & modifying user privileges

  • System security

  • Files systems management