1-Introduction To Operating System

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 21

Introduction to Operating

System
DR. NELSON C. RODELAS
Operating System
• A program that acts as an intermediary between a user of a computer
and the computer hardware.
• An operating System is a collection of system programs that together
control the operations of a computer system.
• Some examples of operating systems are UNIX, Mach, MS-DOS, MS-
Windows, Windows/NT, Chicago, OS/2, MacOS, VMS, MVS, and VM.
Operating System Goal
• Execute user programs and make solving user problems easier.
• Make the computer system convenient to use.
• Use the computer hardware in an efficient manner.

Computer Systems Components


1. Hardware
2. Operating System
3. Application Programs
4. Users
Abstract View of the System Components
Operating System Definition
• Resource Allocator
Manage and allocate 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).
Components of Operating System
• Kernel
Kernel is an active part of an OS i.e., it is the part of OS running at all
times. It is a programs which can interact with the hardware. Ex: Device
driver, dll files, system files etc.

• Shell
Shell is called as the command interpreter. It is a set of programs
used to interact with the application programs. It is responsible for
execution of instructions given to OS (called commands).
Viewpoints of Operating System
• User View:
From the user’s point view, the OS is designed for one user to
monopolize its resources, to maximize the work that the user is
performing and for ease of use.

• System View:
From the computer's point of view, an operating system is a control
program that manages the execution of user programs to prevent
errors and improper use of the computer. It is concerned with the
operation and control of I/O devices.
Functions of Operating System
• Process Management
• Memory Management
• File Management
• I/O System Management
• Secondary Storage Management
• Networking (Distributed System)
• Protection System
• Command-Interpreter System
Operating System Structure
• System Components
• Operating System Services
• System Calls
• System Programs
• System Structure
• Virtual Machines
• System Design and Implementation
• System Generation
Evolution of Operating System

1. Mainframe System
2. Batch Processing Operating System
3. Multiprogramming Operating System
4. Time Sharing/Multitasking Operating
Systems
5. Multiprocessor Operating System
6. Distributed Operating System
Operating System Services

• Program Execution
• I/O Operations
• File System Manipulation
• Communications
• Error Detection
System Calls
• System calls provide an interface between the process and the
operating system.
• System calls allow user-level processes to request some services from
the operating system which process itself is not allowed to do.
• For example, for I/O a process involves a system call telling the
operating system to read or write particular area and this request is
satisfied by the operating system.
Types of System Calls
1. Process Control
2. File Management
3. Device Management
4. Information Maintenance
5. Communications
Computer System Architecture
Compute System Operation
• I/O devices and the CPU can execute concurrently.
• Each device controller is in charge of a particular device type.
• Each device controller has a local buffer.
• CPU moves data from/to main memory to/from local buffers
• I/O is from the device to local buffer of controller.
• Device controller informs CPU that it has finished its operation by
causing an interrupt.
Common Functions of Interrupts
• Interrupt transfers control to the interrupt service routine generally,
through the interrupt vector, which contains the addresses of all the
service routines.
• Interrupt architecture must save the address of the interrupted
instruction.
• Incoming interrupts are disabled while another interrupt is being
processed to prevent a lost interrupt.
• A trap is a software-generated interrupt caused either by an error or a
user request.
• An operating system is interrupt driven.
Interrupt Handling
• The operating system preserves the state of the CPU by storing
registers and the program counter.
• Determines which type of interrupt has occurred: polling, vectored
interrupt system
• Separate segments of code determine what action should be taken
for each type of interrupt
I/O Structure
• After I/O starts, control returns to user program only upon I/O
completion.
• Wait instruction idles the CPU until the next interrupt
• Wait loop (contention for memory access).
• At most one I/O request is outstanding at a time, no simultaneous I/O processing.
• After I/O starts, control returns to user program without waiting for I/O
completion.
• System call – request to the operating system to allow user to wait for I/O
completion.
• Device-status table contains entry for each I/O device indicating its type, address,
and state.
• Operating system indexes into I/O device table to determine device status and to
modify table entry to include interrupt.
Direct Memory Access Structure
• Used for high-speed I/O devices able to transmit information at close
to memory speeds.
• Device controller transfers blocks of data from buffer storage directly
to main memory without CPU intervention.
• Only on interrupt is generated per block, rather than the one
interrupt per byte.
Storage Structure
• Main memory
Only large storage media that the CPU can access directly.
• Secondary storage
Extension of main memory that provides large nonvolatile storage
capacity.
• Magnetic disks
Rigid metal or glass platters covered with magnetic recording
material
• Disk surface is logically divided into tracks, which are subdivided into sectors.
• The disk controller determines the logical interaction between the device and the
computer.
Storage-Device Hierarchy
• Caching
Copying information into
faster storage system; main
memory can be viewed as a last
cache for secondary storage.
Hardware Protection
• Dual-Mode Operation
• I/O Protection
• Memory Protection
• CPU Protection

You might also like