Bcai 204 Os Unit 1
Bcai 204 Os Unit 1
The purpose of an operating system is to provide an environment in which a user can execute
programs in convenient and efficient manner.
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
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.
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.
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.
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.
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.”
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.
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.
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.
•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.
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.
• 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.
• 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.