0% found this document useful (0 votes)
28 views11 pages

Bcai 204 Os Unit 1

Uploaded by

raghav gour
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views11 pages

Bcai 204 Os Unit 1

Uploaded by

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

UNIT 1

Introduction to Operating System

An Operating System can be defined as an interface between user and hardware. It is


responsible for the execution of all the processes, Resource Allocation, CPU management, File
Management and many other tasks.

The purpose of an operating system is to provide an environment in which a user can execute
programs in convenient and efficient manner.

Structure of a Computer System


A Computer System consists of:

o Users (people who are using the computer)


o Application Programs (Compilers, Databases, Games, Video player, Browsers, etc.)
o System Programs (Shells, Editors, Compilers, etc.)
o Operating System ( A special program which acts as an interface between user and
hardware )
o Hardware ( CPU, Disks, Memory, etc)
Components of Operating System
There are the following components of an operating system, such as:

1. Process Management
2. File Management
3. Network Management
4. Main Memory Management
5. Secondary Storage Management
6. I/O Device Management
7. Security Management
8. Command Interpreter System

Operating System Structure


o Simple Structure
o Monolithic Structure
o Layered Approach Structure
o Micro-Kernel Structure
o Exo-Kernel Structure

SIMPLE STRUCTURE
It is the most straightforward operating system structure, but it lacks definition and is only
appropriate for usage with tiny and restricted systems. Since the interfaces and degrees of
functionality in this structure are clearly defined, programs are able to access I/O routines,
which may result in unauthorized access to I/O procedures.

This organizational structure is used by the MS-DOS operating system:

o There are four layers that make up the MS-DOS operating system, and each has its
own set of features.
o These layers include ROM BIOS device drivers, MS-DOS device drivers, application
programs, and system programs.
o The MS-DOS operating system benefits from layering because each level can be
defined independently and, when necessary, can interact with one another.

MONOLITHIC STRUCTURE

The monolithic operating system controls all aspects of the operating system's operation,
including file management, memory management, device management, and operational
operations.

The core of an operating system for computers is called the kernel (OS). All other System
components are provided with fundamental services by the kernel. The operating system
and the hardware use it as their main interface. When an operating system is built into a
single piece of hardware, such as a keyboard or mouse, the kernel can directly access all
of its resources.
The monolithic operating system is often referred to as the monolithic kernel. Multiple
programming techniques such as batch processing and time-sharing increase a
processor's usability. Working on top of the operating system and under complete
command of all hardware, the monolithic kernel performs the role of a virtual computer.
This is an old operating system that was used in banks to carry out simple tasks like batch
processing and time-sharing, which allows numerous users at different terminals to access
the Operating System EX- CP/M is example of monolithic system.

LAYERED STRUCTURE

The OS is separated into layers or levels in this kind of arrangement. Layer 0 (the lowest
layer) contains the hardware, and layer 1 (the highest layer) contains the user interface
(layer N). These layers are organized hierarchically, with the top-level layers making use of
the capabilities of the lower-level ones. EX- Window NT is example of layer structure.
MICRO-KERNEL STRUCTURE
The operating system is created using a micro-kernel framework that strips the kernel of any
unnecessary parts. Systems and user applications are used to implement these optional
kernel components. So, Micro-Kernels is the name given to these systems that have been
developed.

The image below shows Micro-Kernel Operating System Structure

Each Micro-Kernel is created separately and is kept apart from the others. As a result, the
system is now more trustworthy and secure. If one Micro-Kernel malfunctions, the
remaining operating system is unaffected and continues to function normally.

EX- L4Linux , QNX , Mac OS X etc

EXOKERNEL

An operating system called Exokernel was created at MIT with the goal of offering
application-level management of hardware resources. The exokernel architecture's goal
is to enable application-specific customization by separating resource management from
protection. Exokernel size tends to be minimal due to its limited operability.
Because the OS sits between the programs and the actual hardware, it will always have an
effect on the functionality, performance, and breadth of the apps that are developed on
it. By rejecting the idea that an operating system must offer abstractions upon which to
base applications, the exokernel operating system makes an effort to solve this issue. The
goal is to give developers as few restriction on the use of abstractions as possible while
yet allowing them the freedom to do so when necessary. Because of the way the exokernel
architecture is designed, a single tiny kernel is responsible for moving all hardware
abstractions into unreliable libraries known as library operating systems. Exokernels differ
from micro- and monolithic kernels in that their primary objective is to prevent forced
abstraction.

EX- The Cheetah Web Server etc

System Calls in Operating System (OS)

A system call is a way for a user program to interface with the operating system. The program
requests several services, and the OS responds by invoking a series of system calls to satisfy the
request. A system call can be written in assembly language or a high-level language
like C or Pascal.

“System calls are predefined functions that the operating system may directly invoke if a
high-level language is used.”

What is a System Call?


A system call is a method for a computer program to request a service from the kernel of
the operating system on which it is running. A system call is a method of interacting with
the operating system via programs. A system call is a request from computer software to
an operating system's kernel.

The Application Program Interface (API) connects the operating system's functions to
user programs. It acts as a link between the operating system and a process, allowing
user-level programs to request operating system services. The kernel system can only be
accessed using system calls. System calls are required for any programs that use
resources.

How are system calls made?


When a computer software needs to access the operating system's kernel, it makes a
system call. The system call uses an API to expose the operating system's services to user
programs.

system call varies from a user function.

1. A system call function may create and use kernel processes to execute the
asynchronous processing.
2. A system call has greater authority than a standard subroutine. A system call with
kernel-mode privilege executes in the kernel protection domain.
3. System calls are not permitted to use shared libraries or any symbols that are not
present in the kernel protection domain.
4. The code and data for system calls are stored in global kernel memory.

Why do you need system calls in Operating System?


There are various situations where you must require system calls in the operating system.
Following of the situations are as follows:

1. It is must require when a file system wants to create or delete a file.


2. Network connections require the system calls to sending and receiving data
packets.
3. If you want to read or write a file, you need to system calls.
4. If you want to access hardware devices, including a printer, scanner, you need a
system call.
5. System calls are used to create and manage new processes.
How System Calls Work
The Applications run in an area of memory known as user space. A system call connects
to the operating system's kernel, which executes in kernel space. When an application
creates a system call, it must first obtain permission from the kernel. It achieves this using
an interrupt request, which pauses the current process and transfers control to the kernel.

If the request is permitted, the kernel performs the requested action, like creating or
deleting a file. As input, the application receives the kernel's output. The application
resumes the procedure after the input is received. When the operation is finished, the
kernel returns the results to the application and then moves data from kernel space to
user space in memory.

A simple system call may take few nanoseconds to provide the result, like retrieving the
system date and time. A more complicated system call, such as connecting to a network
device, may take a few seconds. Most operating systems launch a distinct kernel thread
for each system call to avoid bottlenecks. Modern operating systems are multi-threaded,
which means they can handle various system calls at the same time.

SYSTEM PROGRAMS:
System programs provide a convenient environment for program development &
execution. They are divided into the following categories.

•File manipulation : These programs create, delete, copy, rename, print & manipulate
files and directories.

•Status information : Some programs ask the system for date, time & amount of
available memory or disk space, no. of users or similar status information.

• File modification :Several text editors are available to create and modify the contents
of file stored on disk.

•Programming language support : compliers, assemblers & interpreters are


provided to the user with the OS.

•Programming loading and execution : Once a program is assembled or compiled,


it must be loaded into memory to be executed.
•Communications : These programs provide the mechanism for creating virtual
connections among processes users 2nd different computer systems.

•Application programs : Most OS are supplied with programs that are useful to solve
common problems or perform common operations. Ex: web browsers, word processors
& text formatters etc.

What is a virtual machine (VM)?


A virtual machine (VM) is an operating system (OS) or application environment installed
on software that imitates dedicated hardware. The end user's experience when using a
VM is equivalent to that of using dedicated hardware.

How do VMs work?

1) A VM provides an isolated environment for running its own OS and


applications, independent from the underlying host system or other VMs on
that host.

2) A VM's OS, commonly referred to as the guest OS, can be the same as or
different from the host OS and the OSes of other VMs on the host.

3) A single computer can host multiple VMs running different OSes and
applications without affecting or interfering with each other.

4) Although the VM is still dependent on the host's physical resources, those


resources are virtualized and distributed across the VMs and can be
reassigned as necessary.

5) This makes it possible to run different environments simultaneously and


accommodate fluctuating workloads.

6) From the user's perspective, the VM operates much like a bare-


metal machine. In most cases, users connecting to a VM are not aware that
they are using a virtual environment.
7) Users can configure and update the guest OS and its applications as necessary and
install or remove new applications without affecting the host or other VMs.

8) Resources such as CPUs, memory and storage appear much as they do on a


physical computer, although users might run into occasional glitches, such as not
being able to run an application in a virtual environment.

Operating System Services


An operating system provides an environment for the execution of the program. It
provides some services to the programs.

The various services provided by an operating system are as follows:

• Program Execution: The system must be able to load a program into memory
and to run that program. The program must be able to terminate this execution
either normally or abnormally.

• I/O Operation: A running program may require I/O. This I/O may involve a file
or a I/O device for specific device. Some special function can be desired. Therefore
the operating system must provide a means to do I/O.
• File System Manipulation: The programs need to create and delete files by
name and read and write files. Therefore the operating system must maintain each
and every files correctly.

• Communication: The communication is implemented via shared memory or by


the technique of message passing in which packets of information are moved
between the processes by the operating system.

• Error detection: The operating system should take the appropriate actions for
the occurrences of any type like arithmetic overflow, access to the illegal memory
location and too large user CPU time.

• Research Allocation: When multiple users are logged on to the system the
resources must be allocated to each of them. For current distribution of the
resource among the various processes the operating system uses the CPU
scheduling run times which determine which process will be allocated with the
resource.

• Accounting: The operating system keep track of which users use how many and
which kind of computer resources.

• Protection: The operating system is responsible for both hardware as well as


software protection. The operating system protects the information stored in a
multiuser computer system.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy