Operating System Notes for BCA 4th Semester

Operating System     


What is Operating System ?

Overview
An operating system (OS) is a software program that acts as an intermediary between computer hardware and the applications that run on a computer. It manages and coordinates various hardware and software components to provide a user-friendly and efficient environment for computing. 

Key functions of an operating system includes:

  1. Process Management: The OS handles the execution of processes (programs) by allocating CPU time, managing process synchronization, and controlling process communication.
  2. Memory Management: It manages the computer's memory, allocating and deallocating memory space for different programs and ensuring efficient utilization of available memory resources.
  3. File System Management: The OS manages files and directories on storage devices, facilitating reading, writing, and organization of data on storage media such as hard drives, solid-state drives, and removable devices.
  4. Device Management: It communicates with hardware devices such as printers, keyboards, displays, and network adapters to ensure proper functioning and coordination of these devices.
  5. User Interface: The OS provides a user interface through which users can interact with the computer system. This interface can take the form of a command-line interface (CLI) or a graphical user interface (GUI).
  6. Security and Access Control: The OS implements security measures to protect the system and user data from unauthorized access, viruses, and other malicious activities.
  7. Networking: For systems connected to networks, the OS manages network communication, allowing processes to send and receive data over networks.
  8. File and Data Management: It oversees the creation, storage, retrieval, and organization of files and data, maintaining data integrity and facilitating data sharing between different applications.
  9. Resource Allocation: The OS allocates system resources such as CPU time, memory, and I/O operations among various processes and applications to ensure fair and efficient resource utilization.
  10. Error Handling and Fault Tolerance: The OS detects and handles errors that can occur during operation, taking measures to recover from errors and minimize system downtime.

Operating systems come in various types, including desktop operating systems (e.g., Windows, macOS, Linux), mobile operating systems (e.g., Android, iOS), and server operating systems (e.g., Windows Server, Linux distributions). 


Advantage of OS: 

  • Allow you to hide details of hardware by creating an abstraction
  • Easy to use with a GUI
  • User can execute many program/application 
  • It make sure that the computer system convenient to use
  • Keeps Your Stuff Safe: Stops bad guys from stealing your things and helps fix problems when they happen.
  • Handles Files: Helps organize your files like photos and documents, so you can find them later.
  • Makes Devices Work: Talks to devices like printers and screens, so you can use them without any trouble.
  • Fixes Mistakes: If something goes wrong, it tries to fix it and gets your computer back on track.
  • Connects to Others: Helps you talk to other computers and share things like files and pictures.


Disadvantage of OS: 

  • Can be Slow: Sometimes, the operating system makes your computer a bit slower because it needs to manage everything.
  • Could Crash: If something goes wrong with the operating system, your computer might suddenly stop working and you'll need to restart it.
  • Takes Space: The operating system and its updates can take up space on your computer's storage.
  • Can Get Viruses: Bad software called viruses can sometimes sneak into the operating system and cause problems.
  • Not Always Compatible: New programs might not work on older operating systems, so you might need to update or change things.
  • Learning Curve: Figuring out how to use a new operating system might take some time and learning.
  • Can Be Expensive: Some operating systems, like those for fancy computers, can cost money.
  • Might Need Powerful Hardware: Some newer operating systems need faster and newer computers to work well.

Two Main Function Of An Operating System :

OS as an Extended Machine

"Operating System as an Extended Machine" is a concept that helps understand how an OS makes a computer easier to use. Here it is explained in simple, point-wise terms:

  • Like a Helper: The operating system is like a helpful assistant that makes your computer more usable.
  • Makes Complex Simple: It takes the complicated stuff your computer does and simplifies it so you can understand and use it easily.
  • Virtual Buttons: Just like buttons on a real machine, the OS gives you virtual buttons and tools to control your computer.
  • Handles Details: It manages all the tiny details of your computer's work, so you don't need to worry about them.
  • Talks to Hardware: The OS talks to your computer's parts (like screen, keyboard, and memory) to make sure they work together.
  • Hides Technical Stuff: You don't need to know the technical stuff – the OS hides it and shows you only what you need.
  • Helps Software: It helps software (like apps and games) run smoothly, so you can enjoy them without any trouble.
  • Keeps You Safe: It guards your computer against bad things like viruses and keeps your personal stuff safe.
  • Saves Your Work: The OS helps you save and find your files easily, just like organizing your stuff in real life.
  • Updates and Improves: Just as a machine gets better over time, the OS gets updates to add new features and fix problems.
In short, think of the operating system as a magical helper that turns your computer into a simple, organized, and safe place where you can do all sorts of amazing things.


OS as resource manager

An operating system acts as a resource manager, presented in a simple list:

  • Shares CPU Time: The OS divides the computer's "thinking" time among different programs so that they can all get a turn to run.
  • Manages Memory: It decides how much memory each program needs and keeps track of which parts of memory are being used.
  • Controls Files: The OS helps store, organize, and retrieve files on the computer, making sure they don't get mixed up.
  • Handles Devices: It talks to devices like printers, screens, and keyboards, making sure they work correctly with programs.
  • Balances Resources: The OS ensures that each program gets a fair share of resources like CPU, memory, and storage.
  • Schedules Tasks: It plans when different tasks will run, making sure everything gets done efficiently.
  • Responds to Requests: When programs need something, like reading a file or connecting to the internet, the OS helps them do it.
  • Manages User Access: It controls who can use the computer, what they can do, and what information they can access.
  • Handles Errors: If something goes wrong, the OS steps in to fix it or at least minimize the impact.
  • Optimizes Performance: It aims to make the best use of resources to keep the computer running smoothly and responsively.
Resource management includes multiplexing (sharing) resources in two different ways:

1. Time Multiplexing
2. Space Multiplexing

Time Multiplexing
When the resource is time multiplexed, different programs or users take turns using it. First one
of them gets to use the resource, then another, and so on.

Space Multiplexing
In space multiplexing, instead of the customers taking turns, each one gets part of the resource.

Types of OS: 

Batch operating system

The users of a 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. The
programmers leave their programs with the operator and the operator then sorts the programs
with similar requirements into batches.


The problems with Batch Systems are as follows:-

 Lack of interaction between the user and the job.
 CPU is often idle, because the speed of the mechanical I/O devices is slower than the
    CPU.
 Difficult to provide the desired priority.

Spooling Systems –

 SPOOL is an acronym for simultaneous peripheral operations on-line.

 It is a kind of buffering mechanism or a process in which data is temporarily held
to be used and executed by a device, program or the system.

 Data is sent to and stored in memory or other volatile storage until the program
or computer requests it for execution.

 In a computer system peripheral equipment, such as printers and punch card
readers etc. (batch processing), are very slow relative to the performance of the
rest of the system.

 Getting input and output from the system was quickly seen to be a bottleneck.
Here comes the need for spool.

 Spooling works like a typical request queue where data, instructions and
processes from multiple sources are accumulated for execution later on.

 Generally, it is maintained on computer’s physical memory, buffers or the I/O
device-specific interrupts.

 The spool is processed in FIFO manner i.e. whatever first instruction is there in
the queue will be popped and executed.

Advantage
  • Improves throughput and utilization

Disadvantage: 
  • Single job must wait during I/O for data
  • New OS feature: Buffering, DMA and Interrupt handling
Time-Sharing Operating Systems –

Each task is given some time to execute, so that all the tasks work smoothly. Each user gets time
of CPU as they use single system. These systems are also known as Multitasking Systems. The
task can be from single user or from different users also. The time that each task gets to execute
is called quantum. After this time interval is over OS switches over to next task.


Advantages of Time-Sharing OS:

 Each task gets an equal opportunity
 Less chances of duplication of software
 CPU idle time can be reduced

Disadvantages of Time-Sharing OS:

 Reliability problem
 One must have to take care of security and integrity of user programs and data
 Data communication problem

Examples of Time-Sharing OSs are:  Multics, Unix etc.

Distributed Operating System

These types of operating system are a recent advancement in the world of computer technology
and are being widely accepted all-over the world and, that too, with a great pace. Various
autonomous interconnected computers communicate each other using a shared communication
network. Independent systems possess their own memory unit and CPU. These are referred
as loosely coupled systems or distributed systems. These system’s processors differ in size and
function. The major benefit of working with these types of operating system is that it is always
possible that one user can access the files or software which are not actually present on his
system but on some other system connected within this network i.e., remote access is enabled
within the devices connected in that network.


Advantages of Distributed Operating System:

 Failure of one will not affect the other network communication, as all systems are
    independent from each other
 Electronic mail increases the data exchange speed
 Since resources are being shared, computation is highly fast and durable
 Load on host computer reduces
 These systems are easily scalable as many systems can be easily added to the network
 Delay in data processing reduces

Disadvantages of Distributed Operating System:

 Failure of the main network will stop the entire communication
 To establish distributed systems the language which are used are not well defined yet
 These types of systems are not readily available as they are very expensive. Not only that
the underlying software is highly complex and not understood well yet

Examples of Distributed Operating System are- LOCUS etc.

Network Operating System

These systems run on a server and provide the capability to manage data, users, groups, security,
applications, and other networking functions. These type of operating systems allow shared
access of files, printers, security, applications, and other networking functions over a small
private network. One more important aspect of Network Operating Systems is that all the users
are well aware of the underlying configuration, of all other users within the network, their
individual connections etc. and that’s why these computers are popularly known as tightly
coupled systems.



Advantages of Network Operating System:

 Highly stable centralized servers
 Security concerns are handled through servers
 New technologies and hardware up-gradation are easily integrated to the system
 Server access are possible remotely from different locations and types of systems

Disadvantages of Network Operating System:

 Servers are costly
 User has to depend on central location for most operations
 Maintenance and updates are required regularly

Examples of Network Operating System are: Microsoft Windows Server 2003, Microsoft
Windows Server 2008, UNIX, Linux, Mac OS X, Novell NetWare, and BSD etc.

Real-Time Operating System

These types of OSs serves the real-time systems. The time interval required to process and
respond to inputs is very small. This time interval is called response time.
Real-time systems are used when there are time requirements are very strict like missile
systems, air traffic control systems, robots etc.



Advantages of RTOS:

 Maximum Consumption: Maximum utilization of devices and system, thus more output
    from all the resources
 Task Shifting: Time assigned for shifting tasks in these systems are very less. For example
    in older systems it takes about 10 micro seconds in shifting one task to another and in latest
    systems it takes 3 micro seconds.
 Focus on Application: Focus on running applications and less importance to applications
    which are in queue.
 Real time operating system in embedded system: Since size of programs are small,
    RTOS can also be used in embedded systems like in transport and others.
 Error Free: These types of systems are error free.
 Memory Allocation: Memory allocation is best managed in these type of systems.

    Disadvantages of RTOS:

 Limited Tasks: Very few tasks run at the same time and their concentration is very less
    on few applications to avoid errors.
 Use heavy system resources: Sometimes the system resources are not so good and the are expensive     as well.
 Complex Algorithms: The algorithms are very complex and difficult for the designer to
    write on.
 Device driver and interrupt signals: It needs specific device drivers and interrupt
    signals to response earliest to interrupts.
 Thread Priority: It is not good to set thread priority as these systems are very less prone
    to switching tasks.

Examples of Real-Time Operating Systems are: Scientific experiments, medical imaging
systems, industrial control systems, weapon systems, robots, air traffic control systems, etc.

Comments

Popular Posts

Contact Us

Name

Email *

Message *

Followers