100% found this document useful (1 vote)
78 views12 pages

III BCA B OS Unit I

The document defines operating systems and describes their main components and functions. It discusses different types of operating systems including batch systems, mainframe systems, desktop systems, multiprocessor systems, distributed systems, clustered systems, real-time systems, and handheld systems. The key components common to most operating systems are process management, main memory management, file management, I/O system management, secondary storage management, networking, and protection systems. The operating system acts as an intermediary between the computer hardware and users to allocate resources, control programs and devices, and make the computer system efficient and easy to use.

Uploaded by

Testing Fun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
78 views12 pages

III BCA B OS Unit I

The document defines operating systems and describes their main components and functions. It discusses different types of operating systems including batch systems, mainframe systems, desktop systems, multiprocessor systems, distributed systems, clustered systems, real-time systems, and handheld systems. The key components common to most operating systems are process management, main memory management, file management, I/O system management, secondary storage management, networking, and protection systems. The operating system acts as an intermediary between the computer hardware and users to allocate resources, control programs and devices, and make the computer system efficient and easy to use.

Uploaded by

Testing Fun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

UNIT I - INTRODUCTION

Definition – Mainframe system – Desktop Systems – Multiprocessor systems –


Distributed systems – clustered systems – Real time and Hand held systems – System
components – Os Services – System Calls – Programs – Structures

What is an Operating System?


 Operating System is system software that controls and manages the resources
and acts as an intermediary between a user of a computer and the computer
hardware.

Operating System Definitions


 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).

Operating system goals:


 Efficiently 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 System Components


1. Hardware – provides basic computing resources (CPU, memory, I/O devices).
2. Operating system – controls and coordinates the use of the hardware among the
various application programs for the various users.
3. Applications programs – define the ways in which the system resources are
used to solve the computing problems of the users (compilers, database
systems, video games, business programs).
4. Users (people, machines, other computers).

Abstract View of System Components

1
Types of Operating System
 Batch Systems
 Mainframe Systems
 Desktop Systems
 Multiprocessor Systems
 Distributed Systems
 Clustered System
 Real -Time Systems
 Handheld Systems

Batch Systems
 The users of batch operating system do not interact with the computer directly.
 Each user prepares his job on an off-line device like punch cards and submits it
to the computer operator. To speed up processing, jobs with similar needs are
batched together and run as a group. Thus, the programmers left their programs
with the operator. The operator then sorts programs into batches with similar
requirements.
 The problems with Batch Systems are following.
 Lack of interaction between the user and job.
 CPU is often idle, because the speeds of the mechanical I/O devices is slower
than CPU.
 Difficult to provide the desired priority

 Memory Layout for a Simple Batch System

Mainframe Systems
 Reduce setup time by batching similar jobs
 Automatic job sequencing – automatically transfers control from one job to
another. First rudimentary operating system.
 Resident monitor
o initial control in monitor
o control transfers to job
o when job completes control transfers pack to monitor

2
Desktop Systems
 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)

Multiprogrammed Systems
 Multiprogramming is the ability to execute more than one programs to keep the
CPU or the I/O devices busy.
 Several jobs are kept in main memory at the same time, and the CPU is
multiplexed among them.
 It increases CPU utilization and thus increases throughput.
 OS Features Needed for Multiprogramming
o I/O routine supplied by the system.
o Memory management – the system must allocate the memory to several
jobs.
o CPU scheduling – the system must choose among several jobs ready to
run.
o Allocation of devices.

Time-Sharing Systems–Interactive Computing


 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) and the user
can interact with each program while running.
 A job swapped in and out of memory to the disk.
 Interactive computer system provides direct communication between the
system and the user.
 On-line communication between the user and the system is provided; when the
operating system finishes 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.

Multiprocessor Systems
 Multiprocessor systems have more than on CPU in close communication.
 Tightly coupled system – processors share memory and a clock; communication
usually takes place through the shared memory.
 Advantages of Multiprocessor system:
o Increased throughput - More work is done in less time

3
o Economical – saves money by sharing peripherals
o Increased reliability – failure of one processor will no halt the system.
 graceful degradation
 Fault tolerant systems
 Symmetric multiprocessing (SMP)
o Each processor runs and identical copy of the operating system.

o Many processes can run at once without performance deterioration.


o Most modern operating systems support SMP
 Asymmetric multiprocessing
o Each processor is assigned a specific task; master processor schedules
and allocated work to slave processors.
o More common in extremely large systems

Distributed Systems
 Distribute the computation among several physical processors.
 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 of distributed systems.
o Resources Sharing
o Computation speed up – load sharing
o Reliability
o Communications
 Distributed Systems Requires networking infrastructure.
 Local area networks (LAN) or Wide area networks (WAN)
 May be either client-server or peer-to-peer systems.

Client-server system
 Client-server system can be classified as Compute-server system that executes
action and File-server system which provide file system interface where clients
can create update, read and delete files.

4
Clustered Systems
 Clustering allows two or more systems coupled together to share storage and
linked via LAN.
 Clustered system provides high reliability.
 A layer of clustered software runs on the cluster nodes.
 Each node can monitor one or more of the others.
 Asymmetric clustering: one server runs the application while other servers
standby.
 Symmetric clustering: all N hosts are running the application.

Real-Time Systems
 Often used as a control device in a dedicated application such as controlling
scientific experiments, medical imaging systems, industrial control systems,
and some display systems.
 It has a Well-defined fixed-time constraints.
 Real-Time systems may be either hard or soft real-time.
 Hard real-time: guarantees that critical tasks to be completed on time.
o Secondary storage limited or absent, data stored in short term memory,
or read-only memory (ROM)
o Conflicts with time-sharing systems, not supported by general-purpose
operating systems.
 Soft real-time : a critical task gets priority over other tasks , and retains that
priority until it completes
o Limited utility in industrial control of robotics
o Useful in applications (multimedia, virtual reality) requiring advanced
operating-system features.

Handheld Systems
 Personal Digital Assistants (PDAs)
 Cellular telephones
 Issues:
o Limited memory
o Slow processors
o Small display screens.

Common System Components


1. Process Management
2. Main Memory Management
3. File Management
4. I/O System Management
5. Secondary Management
6. Networking
5
7. Protection System
8. Command-Interpreter System

1. Process Management
 A process is a program in execution. A process needs certain resources,
including CPU time, memory, files, and I/O devices, to accomplish its task.
 The operating system is responsible for the following activities in connection
with process management.
 Process creation and deletion.
 process suspension and resumption.
 Provision of mechanisms for:
 process synchronization
 process communication
2. Main-Memory Management
 Memory is a large array of words or bytes, each with its own address. It is a
repository of quickly accessible data shared by the CPU and I/O devices.
 Main memory is a volatile storage device. It loses its contents in the case of
system failure.
 The operating system is responsible for the following activities in connections
with memory management:
 Keep track of which parts of memory are currently being used and by
whom.
 Decide which processes to load when memory space becomes available.
 Allocate and deallocate memory space as needed.
3. File Management
 A file is a collection of related information defined by its creator. Commonly,
files represent programs (both source and object forms) and data.
 The operating system is responsible for the following activities in connections
with file management:
 File creation and deletion.
 Directory creation and deletion.
 Support of primitives for manipulating files and directories.
 Mapping files onto secondary storage.
 File backup on stable (nonvolatile) storage media.

4. I/O System Management


 The I/O system consists of:
 A buffer-caching system
 A general device-driver interface
 Drivers for specific hardware devices

5. Secondary-Storage Management

6
 Since main memory (primary storage) is volatile and too small to
accommodate all data and programs permanently, the computer system must
provide secondary storage to back up main memory.
 Most modern computer systems use disks as the principle on-line storage
medium, for both programs and data.
 The operating system is responsible for the following activities in connection
with disk management:
 Free space management
 Storage allocation
 Disk scheduling

6. Networking (Distributed Systems)

 A distributed system is a collection processors that do not share memory or a


clock. Each processor has its own local memory.
 The processors in the system are connected through a communication network.
 Communication takes place using a protocol.
 A distributed system provides user access to various system resources.
 Access to a shared resource allows:
 Computation speed-up
 Increased data availability
 Enhanced reliability

7. Protection System

 Protection refers to a mechanism for controlling access by programs,


processes, or users to both system and user resources.
 The protection mechanism must:
 distinguish between authorized and unauthorized usage.
 specify the controls to be imposed.
 provide a means of enforcement.

8. Command-Interpreter System

 Many commands are given to the operating system by control statements which
deal with:
 process creation and management
 I/O handling
 secondary-storage management
 main-memory management
 file-system access
 protection
 networking

7
Operating System Services
 Program execution – system capability to load a program into memory and to
run it.
 I/O operations – since user programs cannot execute I/O operations directly,
the operating system must provide some means to perform I/O.
 File-system manipulation – program capability to read, write, create, and delete
files.
 Communications – exchange of information between processes executing
either on the same computer or on different systems tied together by a network.
Implemented via shared memory or message passing.
 Error detection – ensure correct computing by detecting errors in the CPU and
memory hardware, in I/O devices, or in user programs.
 Additional Operating System Functions
Additional functions exist not for helping the user, but rather for ensuring efficient
system operations.
• Resource allocation – allocating resources to multiple users or multiple
jobs running at the same time.
• Accounting – keep track of and record which users use how much and
what kinds of computer resources for account billing or for
accumulating usage statistics.
• Protection – ensuring that all access to system resources is controlled.

System Calls
 System calls provide the interface between a running program and the
operating system.
 Generally available as assembly-language instructions.
 Languages defined to replace assembly language for systems
programming allow system calls to be made directly (e.g., C, C++)
 Three general methods are used to pass parameters between a running program
and the operating system.
 Pass parameters in registers.
 Store the parameters in a table in memory, and the table address is
passed as a parameter in a register.
 Push (store) the parameters onto the stack by the program, and pop off
the stack by operating system.
 Passing of Parameters As A Table

8
Types of System Calls
1. Process control
2. File management
3. Device management
4. Information maintenance
5. Communications

1. Process control System Calls

 Create process and terminate process


 Load and execute
 End and abort
 Get process attributes and set process attributes
 Wait for time
 Wait event , signal event
 Allocate and free memory
 MS-DOS Execution

 UNIX Running Multiple Programs

2. File Management System Call


 Create File and delete file
 Open, close
9
 Read, write and reposition
 Get file attributes , set file attributes

3. Device Management System Calls

 Request device , release device


 Read, write , reposition
 Get device attributes, set device attributes
 Logically attach or detach devices

4. Information Maintenance System Calls


 Get time or date, set time or date
 Get system data , set system data
 Get process, file or device attributes
 Set process, file or device attributes
5. Communications System Calls

 Create , delete communication connection


 Send, receive messages
 Transfer status information
 Attach or detach remote devices
 Communication Models

Message Passing Shared Memory

10
System Programs
 System programs provide a convenient environment for program development
and execution. They can be divided into:
 File management – These programs create , delete, copy, rename, print,
list and manipulate files/directories.
 Status information – Maintains the date, time, number of users or similar
status information
 File modification – Text editors are available for editing text.
 Programming language support – Assemblers, Compilers, interpreters
for common PLs.
 Program loading and execution – Loads program for execution.
 Communications – Provides mechanism for creating virtual connections
and sending and receiving messages.
 Application programs – DBMS, Spread sheets, games and etc.,.
 Most users’ view of the operation system is defined by system programs, not
the actual system calls.

System Structure
MS-DOS System Structure
 MS-DOS – written to provide the most functionality in the least space
 not divided into modules
 Although MS-DOS has some structure, its interfaces and levels of
functionality are not well separated
 MS-DOS Layer Structure

UNIX System Structure

 UNIX – limited by hardware functionality, the original UNIX operating system


had limited structuring. The UNIX OS consists of two separable parts.
 Systems programs
 The kernel
 Consists of everything below the system-call interface and above
the physical hardware
11
 Provides the file system, CPU scheduling, memory management,
and other operating-system functions; a large number of
functions for one level.
 UNIX System Structure

 Layered Approach
 The operating system is divided into a number of layers (levels), each
built on top of lower layers. The bottom layer (layer 0), is the hardware;
the highest (layer N) is the user interface.
 With modularity, layers are selected such that each uses functions
(operations) and services of only lower-level layers.
 An Operating System Layer

12

You might also like