Please enable JavaScript.
Coggle requires JavaScript to display documents.
CHAPTER 1 (INTRODUCTION OS) - Coggle Diagram
CHAPTER 1 (INTRODUCTION OS)
WHAT IS OPERATING SYSTEM
A program that acts as an intermediary between a user of a computer and the computer hardware.
OS is a powerful, and usually large, program that controls and manages the hardware and other software on a computer.
PURPOSE
: to provide an environment in which user can execute program in a convenient & efficient manner.
GOAL
Execute user programs and make solving user problems easier.
Make the computer system convenient to use.
a part of pc machine (software program)
Manages all hardware and software
Controls every report, tool, each section of primary memory and nanosecond of processing time
Controls who can use the machine
Controls how gadget is used
Hardware – provides basic computing resources (CPU, memory, I/O devices).
Operating system – controls and coordinates the use of the hardware among the various application programs for the various users.
Applications 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, office applications, etc).
Users (people, machines, other computers).
USER POINT OF VIEW
PC 🡺 single user ( to monopolize resources & maximize the work);
->OS designed for ease of use, attention to performance not to resource utilization
Mainframe 🡺 other users are accessing through other terminals;
-> OS designed to: maximize resource utilization (e.g: CPU time, memory & I/O)
Workstations 🡺 connect to networks of other workstations and server;
-> OS designed to compromise between individual usability & resource utilization.
SYSTEM POINT VIEW
Resources Allocator.
Computer system has many resources.
OS act as the manager of these resources
OS manages and allocates resources.
DEFINITION
->Resource allocator – manages and allocates resources.
->Control program – controls the execution of user programs and operations of I/O devices .
->Kernel – the one program running at all times (all else being application programs).
ESSENTIAL SUBSYSTEM MANAGERS
Memory Manager
Random Access Memory
Responsible:
Preserving space in main memory occupied by operating system
Checking validity and legality of memory space request
Setting up memory tracking table
Tracks usage of memory by sections
Needed in multiuser environment
Deallocating memory to reclaim it
Processor Manager
In charge of allocating Central Processing Unit (CPU)
2 Level
Handle jobs as they enter the system
Handled by Job Scheduler
Device Manager
In charge of monitoring all resources
Devices, channels, and control units
Responsibilities include:
Choosing most efficient resource allocation method
Printers, ports, disk drives, etc.
Based on scheduling policy
Allocating the device
Starting device operation
Deallocating the device
File Manager
In charge of tracking every file in the system
Data files, program files, compilers, application programs
Responsibilities include:
Enforcing user/program resource access restrictions
Uses predetermined access policies
Controlling user/program modification restrictions
Read-only, read-write, create, delete
Allocating resource
Opening the file
Deallocating file (by closing it)
Network Manager (all modern OS)
Control Program
Manages the execution of user program to prevent error and improper use of the computer
Concerned with the operation and control of I/O devices
Kernel 🡺 one program running at all time on the computer
Types of OS
Five categories
Batch
->Input relied on punched cards or tape
->Efficiency measured in throughput
Interactive
Faster turnaround than batch systems
Slower than real-time systems
Introduced to provide fast turnaround when debugging programs
Time-sharing software developed for operating system
Real-time
Reliability is key
Fast and time limit sensitive
Used in time-critical environments
Space flights, airport traffic control, high-speed aircraft
Industrial processes
Sophisticated medical equipment
Distribution of electricity
Telephone switching
Must be 100% responsive, 100% of the time
Hybrid
Combination of batch and interactive
Accept and run batch programs in the background
Interactive load is light
Embedded
Computers placed inside other products
Adds features and capabilities
Operating system requirements
Perform specific set of programs
Not interchangeable among systems
Small kernel and flexible function capabilities
Two distinguishing features
Response time
How data enters into the system
Evolution of Operating Systems
Early Systems (1950)
Mainframe Machine
Structure:
Single user system.
Large machines run from console.
Programmer/User as operator.
Paper Tape or Punched cards.
No tapes/disks in computer.
Early software: Assemblers, Libraries of common subroutines, Device Drivers, Compilers, Linkers.
Significant amount of setup time.
Low CPU utilization.
But very secure
Simple Batch Systems (1960)
Multiprogrammed Batch Systems (1970)
Time-Sharing and Real-Time Systems (1970)
Personal/Desktop Systems (1980)
Multiprocessor Systems (1980)
Networked/Distributed Systems (1980)
Handheld Systems (1990); Mobile computing (2000)
MAINFRAME
MAINFRAME
4 IMPOERTANT
Reliable single-thread performance, which is essential for reasonable operations against a database.
Maximum I/O connectivity, which means mainframes excel at providing for huge disk farms.
Maximum I/O bandwidth, so connections between drives and processors have few choke-points.
Reliability--mainframes often allow for "graceful degradation" and service while the system is running.
2 PROCESSING
time sharing (Online (Interactive) Transaction Processing)
the computer give each user a tiny slice of time in a round-robin fashion
batch mode processing (Batch Processing)
the computer gives its full attention to your program
Simple Batch Systems (1960)
Problems
Mainframe Machine
Early computer 🡺 physically enormous machine run from a console
Input Device 🡺 card reader & tape drives
Output Device 🡺 line printer, tape drives & punch cards
User did not interact directly with the computer system
A job (a single program + associated data + control information) usually on the punch cards submitted to the operator.
The output consisted of the results of the program or memory dump in case of error.
The operator used to batch together similar programs and run as a group to reduce setup time.
->Slow Performance – I/O and CPU could not overlap; card reader very slow.
->CPU was often idle.
Time Sharing Systems (Interactive Systems) (1970)
TSS extends Batch multiprogramming to handle multiple interactive jobs – It’s Interactive Multiprogramming - waited for input from users
Multiple users simultaneously access the system through terminals.
Processor’s time is shared among multiple users, that is, the CPU is multiplexed among several jobs that are kept in memory and on disk (the 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 the operating system finished the execution of one command, it seeks the next “control statement” from the user’s keyboard.
On-line system must be available for users to access data and code.
Multitasking
->TSS eventually supports multitasking.
->A time share system that supports multiple processes (program in execution) per user is called a multitasking system.
How Does Time Sharing Work?
->Because of slow human reaction time, a typical user needs 2 seconds of processing time per minute.
->Then many users should be able to share the same system without noticeable delay in the computer reaction time.
OS Features Needed for Time Sharing Systems
On-line file system must be available for users to access data and code.
Should do memory management
Should do CPU scheduling
Should do job synchronization and have communication facilities.
Should ensure that dead lock and indefinite waiting does not occur.
Should allow sharing of computer resources.
Multiprocessor Systems (1980)
Multiprocessor systems / Parallel systems / Multicore:
Multiprocessor systems has more than one CPU in close communication.
Tightly coupled system – processors share memory and a clock; communication usually takes place through the shared memory.
Advantages of parallel system: Increased throughput; Economical; Increased reliability - graceful degradation - The ability to continue providing service (maintain limited functionality) proportional to the level of surviving hardware
Symmetric multiprocessing (SMP)
Each processor can perform the same functions and share same main memory and I/O facilities (symmetric).
The OS schedules processes/threads across all the processors (real parallelism).
Robustness: a single CPU failure does not halt the system, only the performance is reduced.
Asymmetric multiprocessing
Each processor is assigned a specific task; master processor schedules and allocated work to slave processors.
More common in extremely large systems
Multiprogrammed Batch Systems (1970)
Memory Layout for a Simple Batch System / Uniprogramming
I/O operations are exceedingly slow (compared to instruction execution).
A program contains even a very small number of I/O operations will spend most of its time waiting for them.
Problem: poor CPU usage when only one program is present in memory.
How it works
Several jobs are kept in main memory at
the same time, and the CPU is
multiplexed among them.
If memory can hold several programs, then
CPU can switch to another one whenever a
program is waiting for an I/O to complete –
This is multiprogramming.
o/s keeps several jobs in memory
simultaneously in “job pool”.
o/s pick and begins to execute 1 of the
job in memory.
o/s can simply switch to another job (2nd job) if job 1 must wait for some task (e.g., wait for I/O to complete).
If job 1 finished waiting, it will get back
the CPU.
CPU will never in “idle”.
OS FEATURES NEEDED FOR MULTIPROGRAMMING
I/O routine 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.
Device management - allocation of devices to process in execution.
Clustered Systems
Another type of multiprocessor system.
Clustering allows two or more computer systems to share (external and/or) storage and are closely linked via a local-area network LAN; and balance CPU load.
Advantage: Provides high reliability - service will continue even if one or more systems in the cluster fail.
2 Structures
->Asymmetric clustering: one server runs the application while other servers standby. The standby host machine does nothing but monitor the active server.
->Symmetric clustering: all N hosts are running the application.
Distributed Systems
->Distribute the computation among several physical processors.
->collection of physically separate, possibly heterogeneous, computer systems that are networked to provide users with access to the various resources that the system maintains.
->Loosely coupled system – each processor has its own local memory; processors communicate with one another through various communications lines, such as high-speed buses or telephone lines
Advantages
Resources Sharing
Computation speed up – load sharing
Reliability
Real-Time embedded Systems
The use of electronics and software within a product that is designed to perform a dedicated function
2 approaches OS
Take an existing OS and adapt it for the embedded application;
Design and implement an OS intended solely for embedded use (e.g. eCos; TinyOS)
controlling scientific experiments, medical imaging systems, industrial control systems, and some display systems
functions correctly only if it returns the correct result within its time constraints
Handheld Systems
->mobile computing - computing on handheld smartphones and tablet computers.
Apple IOS
Google Android
Personal Desktop Systems (1980)
Personal computers – computer system dedicated to a single user.
I/O devices – keyboards, mouse, display screens, small printers.
User convenience and responsiveness.
Can adopt technology developed for larger operating system’ often individuals have sole use of computer and do not need advanced CPU utilization of protection features.
May run several different types of operating systems (Windows, MacOS, UNIX, Linux)
Two Categories of Computer Systems
Single Instruction Single Data (SISD)
Single processor executes a single instruction sequence to operate on data stored in a single memory.
This is a Uniprocessor.
Multiple Instruction Multiple Data (MIMD)
A set of processors simultaneously execute different instruction sequences on different data sets.
This is a Multiprocessor.
Open Source & Closed Source
->Open-source operating systems are those available in source-code format rather than as compiled binary code. Linux is the most famous open source operating system
->Closed-source operating system proprietary software distributed under a licensing agreement to authorized users with private modification, copying, and republishing restrictions.