0% found this document useful (0 votes)
23 views30 pages

Os Unit-1

The document provides an overview of operating systems, detailing their functions, types, and architecture. It explains key concepts such as process management, memory management, storage management, and the various types of operating systems like batch, time-sharing, distributed, network, and real-time systems. Additionally, it discusses computer system architecture, including single-processor, multiprocessor, and clustered systems.

Uploaded by

Hemanth Atla
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
0% found this document useful (0 votes)
23 views30 pages

Os Unit-1

The document provides an overview of operating systems, detailing their functions, types, and architecture. It explains key concepts such as process management, memory management, storage management, and the various types of operating systems like batch, time-sharing, distributed, network, and real-time systems. Additionally, it discusses computer system architecture, including single-processor, multiprocessor, and clustered systems.

Uploaded by

Hemanth Atla
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/ 30

Operating systems

UNIT-1
Overview of operating Systems

What is an Operating System?


A program that acts as an intermediary between a user of a computer and the
computerhardware Operating system goals:
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 Structure

Computer system can be divided into four


components  Hardware
- Provides basic computing resources such as CPU, memory, I/O devices.
 Operating system
- Controls and coordinates use of hardware among various applications and
users.  Application programs
- Define the ways in which the system resources are used to solve the computingproblems of
the users.
- Word processors, compilers, web browsers, database systems, video games.
 Users
- People, machines, other computers

Figure: Abstract view of components of a computer system

1
OPERATING SYSTEM FUNCTIONS or Operating systems operations

Process Management

A process is a program in execution. It is a unit of work within the system. Program is


a passive entity, process is an active entity.
Process needs resources to accomplish its task
CPU, memory, I/O, files
Initialization data
Process termination requires reclaim of any reusable resources
Single-threaded process has one program counter specifying location of next instructionto
execute Process executes instructions sequentially, one at a time, until completion
Multi-threaded process has one program counter per thread
Typically system has many processes, some user, some operating system runningconcurrently on
one or more CPUs
Concurrency by multiplexing the CPUs among the processes / threads

Process Management Activities


The operating system is responsible for the following activities in connection with
processmanagement: Creating and deleting both user and system processes
Suspending and resuming processes
Providing mechanisms for process
synchronization Providing mechanisms for
process communication
2
Providing mechanisms for deadlock handling
Memory Management
All data in memory before and after
processing All instructions in memory in order
to execute
Memory management determines what is in memory when
Optimizing CPU utilization and computer response to
users

Memory management activities


Keeping track of which parts of memory are currently being used and by whom
Deciding which processes (or parts thereof) and data to move into and out of
memory Allocating and deallocating memory space as needed

Storage Management
OS provides uniform, logical view of information
storage Abstracts physical properties to logical storage
unit - file
Each medium is controlled by device (i.e., disk drive, tape drive)
Varying properties include access speed, capacity, data-transfer rate, access method(sequential
or random)
File-System management
Files usually organized into directories
Access control on most systems to determine who can access what

Storage Management activities


Creating and deleting files and directories
Primitives to manipulate files and
directories Mapping files onto secondary
storage
Backup files onto stable (non-volatile) storage media
Mass-Storage Management
Usually disks used to store data that does not fit in main memory or data that must be kept for
a “long” period of time
Proper management is of central importance
Entire speed of computer operation hinges on disk subsystem and its algorithms

Mass Storage activities


Free-space management
Storage allocation
Disk scheduling
Some storage need not be fast
Tertiary storage includes optical storage, magnetic
tape Still must be managed
Varies between WORM (write-once, read-many-times) and RW (read-write)
Multitasking environments must be careful to use most recent value, no matter where it isstored in
the storage hierarchy.
Multiprocessor environment must provide cache coherency in hardware such that all CPUs have
the most recent value in their cache
3
Distributed environment situation even more
complex Several copies of a datum can exist

I/O Subsystem
One purpose of OS is to hide peculiarities of hardware devices from the
user I/O subsystem responsible for
Memory management of I/O including buffering (storing data temporarily while it is being
transferred), caching (storing parts of data in faster storage for performance), spooling (the
overlapping of output of one job with input of other jobs)
General device-driver interface
Drivers for specific hardware devices

Protection and Security

Protection – any mechanism for controlling access of processes or users to resources definedby the OS.
Security – defense of the system against internal and external attacks
Huge range, including denial-of-service, worms, viruses, identity theft, theft of
service Systems generally first distinguish among users, to determine who can do
what
User identities (user IDs, security IDs) include name and associated number, one
peruser User ID then associated with all files, processes of that user to determine access
control
Group identifier (group ID) allows set of users to be defined and controls managed, thenalso
associated with each process, file.
Types of Operating Sysem or Computing environments:
An Operating System performs all the basic tasks like managing file,process, and
memory. Thus operating system acts as manager of all the resources, i.e. resource
manager. Thus operating system becomes an interface between user and machine.
Types of Operating Systems: Some of the widely used operating systems are as follows-
1. Batch Operating System –
This type of operating system does not interact with the computer directly. There is an operator which
takes similar jobs having same requirement and group them into batches. It is the responsibility of operator to
sort the jobs with similar needs.
4
Advantages of Batch Operating System:
It is very difficult to guess or know the time required by any job to complete. Processors of the batch
systems know how long the job would be when it is in queue
Multiple users can share the batch
systems The idle time for batch system is
very less
It is easy to manage large work repeatedly in batch
systems Disadvantages of Batch Operating System:
The computer operators should be well known with batch
systems Batch systems are hard to debug
It is sometime costly
The other jobs will have to wait for an unknown time if any job fails
Examples of Batch based Operating System: Payroll System, Bank Statements etc.

2. 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.
5
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.
3. Distributed Operating System –
These types of operating system is 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.
6
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.

4. 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
7
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.
5. 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.
Two types of Real-Time Operating System which are as follows:
Hard Real-Time Systems:
These OSs are meant for the applications where time constraints are very strict and even the shortest
possible delay is not acceptable. These systems are built for saving life like automatic parachutes or air bags
which are required to be readily available in case of any accident. Virtual memory is almost never found in these
systems. Soft Real-Time Systems:
These OSs are for applications where for time-constraint is less
strict. 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 they 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.

Computer-System Architecture or Operating system structure

A computer system may be organized in a number of different ways, which we can categorize roughly
according to the number of general-purpose processors used.
1. Single-Processor System
2. Multiprocessor System
3. Clustered System
8
1. Single-Processor System:-
Most systems use a single processor.
On a single-processor system, there is one main CPU capable of executing a general-purpose instruction
set, including instructions from user processes.
Almost all systems have other special-purpose processors as well. They may come in the form of
device-specific processors, such as disk, keyboard, and graphics controllers;
On mainframes, they may come in the form of more general-purpose processors, such as I/O processors
that move data rapidly among the components of the system.
All of these special-purpose processors run a limited instruction set and do not run user processes.
Sometimes they are managed by the operating system, in that the operating system sends them
information about their next task and monitors their status.
For example, a disk-controller microprocessor receives a sequence of requests from the main CPU
and implements its own disk queue and scheduling algorithm.
This arrangement relieves the main CPU of the overhead of disk scheduling.
PCs contain a microprocessor in the keyboard to convert the keystrokes into codes to be sent to the CPU.
In other systems or circumstances, special-purpose processors are low-level components built into the hardware.
The operating system cannot communicate with these processors; they do their jobs autonomously.
The use of special-purpose microprocessors is common and does not turn a single-processor system into
a multiprocessor.
If there is only one general-purpose CPU, then the system is a single-processor system.

2. Multiprocessor System:-
Although single-processor systems are most common, multiprocessor systems (also known as parallel
systems or tightly coupled systems) are growing in importance. Such systems have two or more processors
in close communication, sharing the computer bus and sometimes the clock, memory, and peripheral devices.
Multiprocessor systems have three main advantages:
1. Increased throughput. Throughput is increased by increasing the number of processors, we expect to get
more work done in less time. The speed-up ratio with N processors is not N, however; rather, it is less than N.
When multiple processors cooperate on a task, a certain amount of overhead is incurred in keeping all the parts
working correctly.
2. Economy of scale. Multiprocessor systems can cost less than equivalent multiple single-processor
systems, because they can share peripherals, mass storage, and power supplies. If several programs operate on
the same set of data, it is cheaper to store those data on one disk and to have all the processors share them than
to have many computers with local disks and many copies of the data.
3. Increased reliability. If functions can be distributed properly among several processors, then the failure of
one processor will not halt the system, only slow it down. If we have ten processors and one fails, then each
of the remaining nine processors can pick up a share of the work of the failed processor. Thus, the entire
system runs only 10 percent slower, rather than failing altogether.
The multiple-processor systems in use today are of two types.
i. Asymmetric multiprocessing
ii. Symmetric multiprocessing (SMP)
Asymmetric multiprocessing:-
In asymmetric multiprocessing which each processor is assigned a specific task.
A master processor controls the system; the other processors either look to the master for instruction or
have predefined tasks. This scheme defines a master-slave relationship.
The master processor schedules and allocates work to the slave processors.

9
Each processor has its own memory address space. Symmetric multiprocessing
(SMP) Each processor runs an identical copy of OS. These copies communicate with
each other.
Each processor performs all tasks within the operating system. SMP means that all processors are peers;
no master-slave relationship exists between processors.
The benefit of this model is that many processes can run simultaneously—N processes can run if there are
N CPUs—without causing a significant deterioration of performance.

Fig: Symmetric multiprocessing architecture


A multiprocessor system will allow processes and resources—such as memory—to be shared dynamically
among the various processors.
The difference between symmetric and asymmetric multiprocessing may result from either hardware or
software. Special hardware can differentiate the multiple processors, or the software can be written to allow only
one master and multiple slaves.

3. Clustered System
Another type of multiple-CPU system is the clustered system. Like multiprocessor systems, clustered
systems gather together multiple CPUs to accomplish computational work.
Clustered systems differ from multiprocessor systems, however, in that they are composed of two or
more individual systems coupled together
The generally accepted definition is that clustered computers share storage and are closely linked via a local-
area network (LAN) or a faster interconnect such as InfiniBand.
Clustering is usually used to provide high-availability service; that is, service will continue even if one or
more systems in the cluster fail. High availability is generally obtained by adding a level of redundancy in the
system. A layer of cluster software runs on the cluster nodes. Each node can monitor one or more of the
others (over the LAN). If the monitored machine fails, the monitoring machine can take ownership of its
storage and restart the applications that were running on the failed machine. The users and clients of the
applications see only a brief interruption of service.
Clustering can be structured asymmetrically or symmetrically.
In asymmetric clustering, one machine is in hot-standby mode while the other is running the applications.
The hot-standby host machine does nothing but monitor the active server. If that server fails, the hot-
standby host becomes the active server.
In symmetric mode, two or more hosts are running applications, and are monitoring each other. This mode
is obviously more efficient, as it uses all of the available hardware. It does require that more than one
application be available to run.

10
\

Open-Source Operating Systems


Open source refers to an openly distributed program code (including codes that are free of charge)
that can be utilized and modified by the end user without restriction.

advantages

Control. Many people prefer open source software because they have more control over that
kind of software. They can examine the code to make sure it's not doing anything they don't
want it to do, and they can change parts of it they don't like. Users who aren't programmers
also benefit from open source software, because they can use this software for any purpose
they wish—not merely the way someone else thinks they should.

Training. Other people like open source software because it helps them become
better progra mmers. Because open source code is publicly accessible, students can easily
study it as they learn to make better software. Students can also share their work with
others, inviting comment and critique, as they develop their skills. When people discover
mistakes in programs' source code, they can share those mistakes with others to help them
avoid making those same mistakes themselves.

Security. Some people prefer open source software because they consider it more secure
and stable than proprietary software. Because anyone can view and modify open source
software, someone might spot and correct errors or omissions that a program's original authors
might have missed. And because so many programmers can work on a piece of open source
software without asking for permission from original authors, they can fix, update, and
upgrade open source software more quickly than they can proprietary software.

11
Stability. Many users prefer open source software to proprietary software for important, long-
term projects. Because programmers publicly distribute the source code for open source software,
users relying on that software for critical tasks can be sure their tools won't disappear or fall into
disrepair if their original creators stop working on them. Additionally, open source software tends
to both incorporate and operate according to open standards.

Community. Open source software often inspires a community of users and developers to
form around it. That's not unique to open source; many popular applications are the subject of
meetups and user groups. But in the case of open source, the community isn't just a fanbase
that buys in (emotionally or financially) to an elite user group; it's the people who produce, test,
use, promote, and ultimately affect the software they love

Open source operating systems

 GNU/Linux (various versions or distributions include Debian, Fedora, Gentoo, Ubuntu and Red Hat)
-operating system
 FreeBSD - operating system
 Android - mobile phone platform

Operating-System Services

An operating system provides an environment for the execution of programs. It provides certain services
to programs and to the users of those programs. The specific services provided, of course, differ from one
operating system to Another. These operating-system services are provided for the convenience of the
programmer, to make the programming task easier.
One set of operating-system services provides functions that are helpful to the user.
User interface. Almost all operating systems have a user interface (UI). This interface can take
several forms. One is a command-line interface (CLI), which uses text commands and a method for
entering them (say, a program to allow entering and editing of commands). Another is a batch interface,
in which commands and directives to control those commands are entered into files, and those files are
executed. Most commonly a graphical user interface (GUI) is used. Here, the interface is a window
system with a pointing device to direct I/O, choose from menus, and make selections and a keyboard to
enter text. Some systems provide two or all three of these variations.

• Program execution. The system must be able to load a program into memory and to run that program.
The program must be able to end its execution, either normally or abnormally (indicating error).

12
• I/O operations. A running program may require I/O, which may involve a file or an I/O device. For
specific devices, special functions may be desired . For efficiency and protection, users usually cannot
control I/O devices directly. Therefore, the operating system must provide a means to do I/O.
• File-system manipulation. The file system is of particular interest. Obviously, programs need to read
and write files and directories. They also need to create and delete them by name, search for a given file,
and list file information. Finally, some programs include permissions management to allow or deny
access to files or directories based on file ownership.
• Communications. There are many circumstances in which one process needs to exchange information
with another process. Such communication may occur between processes that are executing on the same
computer or between processes that are executing on different computer systems tied together by a
computer network. Communications may be implemented via shared memory or through message
passing, in which packets of information are moved between processes by the operating system.
• Error detection. The operating system needs to be constantly aware of possible errors. Errors may occur
in the CPU and memory hardware (such as a memory error or a power failure), in I/O devices (such as a
parity error on tape, a connection failure on a network, or lack of paper in the printer), and in the user
program (such as an arithmetic overflow, an attempt to access an illegal memory location, or a too-great
use of CPU time).
Another set of operating-system functions exists not for helping the user but rather for ensuring the
efficient operation of the system itself. Systems with multiple users can gain efficiency by sharing the
computer resources among the users.
Resource allocation. When there are multiple users or multiple jobs running at the same time, resources
must be allocated to each of them. Many different types of resources are managed by the operating
system. Some (such as CPU cycles, main memory, and file storage) may have special allocation code,
whereas others (such as I/O devices) may have much more general request and release code. For instance,
in determining how best to use the CPU, operating systems have CPU-scheduling routines that take into
account the speed of the CPU, the jobs that must be executed, the number of registers available, and other
factors. There may also be routines to allocate printers, modems, USB storage drives, and other
peripheral devices.

Accounting. We want to keep track of which users use how much and what kinds of computer resources.
This record keeping may be used for accounting (so that users can be billed) or simply for accumulating
usage statistics. Usage statistics may be a valuable tool for researchers who wish to reconfigure the
system to improve computing services.

Protection and security. The owners of information stored in a multiuser or networked computer system
may want to control use of that information. When several separate processes execute concurrently, it
should not be possible for one process to interfere with the others or with the operating system itself.
Protection involves ensuring that all access to system resources is controlled. Security of the system from
outsiders is also important. Such security starts with requiring each user to authenticate himself or
herself to the system, usually by means of a password, to gain access to system resources. It extends to
defending external I/O devices, including modems and network adapters, from invalid access attempts
and to recording all such connections for detection of break-ins.

13
User and Operating-System Interface

An operating system is software that manages computer hardware and software. It supplies an interface for
the user and important utilities for managing the computer.

User interface

The OS provides a user interface (UI), an environment for the user to interact with the machine. The UI is
either graphical or text-based.

Graphical user interface (GUI)

The OS on most computers and smart phones provides an environment with tiles, icons and/or menus. This
type of interface is called the graphical user interface (GUI) because the user interacts with images through a
mouse, keyboard or touch screen.

Command line interface (CLI)

An OS also provides a method of interaction that is non-graphical, called the command line interface (CLI).
This is a text-only service with feedback from the OS appearing in text. Using a CLI requires knowledge
of the commands available on a particular machine.

Introduction to 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++)
Mostly accessed by programs via a high-level Application Program Interface (API) rather than direct
system call use
14
Three most common APIs are Win32 API for Windows, POSIX API for POSIXbased systems
(including virtually all versions of UNIX, Linux, and Mac OS X), and Java API for the Java virtual
machine (JVM).

Types of System Calls


System calls can be grouped roughly into five major categories:
Process control
File management
Device management
Information maintenance
Communications Process
Control
A running program needs to be able to halt its execution either normally (end) or abnormally (abort). If a
system call is made to terminate the currently running program abnormally, or if the program runs into a
problem and causes an error trap, a dump of memory is sometimes taken and an error message generated.
Types of system calls of Process control
end, abort
load, execute
create process, terminate process
get process attributes, set process attributes
wait for time
wait event, signal event
15
allocate and free memory
Under either normal or abnormal circumstances, the operating system must transfer control to the
invoking command interpreter. The command interpreter then reads the next command.

The standard C library provides a portion of the system-call interface for many versions of UNIX and
Linux. As an example, lot's assume a C program invokes the printf () statement. The C library intercepts
this call and invokes the necessary system call(s) in the operating system—in this instance, the write ()
system call. The C library takes the value returned by write () and passes it back to the user program. This
is shown in above Figure.

File Management
We first need to be able to create and delete files. Either system call requires the name of the file and
perhaps some of the file's attributes. Once the file is created, we need to open it and to use it. We may
also read, write, or reposition (rewinding or skipping to the end of the file, for example). Finally, we need
to close the file, indicating that we are no longer using it.
System calls in File management
create file, delete file
open, close
read, write, reposition
get file attributes, set file attributes
File attributes include the file name, a file type, protection codes, accounting information, and so on. At
least two system calls, get file attribute and set file attribute, are required for this function.
16
Device Management
A process may need several resources to execute—main memory, disk drives, access to files, and so on.
If the resources are available, they can be granted, and controlcan be returned to the user process.
Otherwise, the process will have to wait until sufficient resources are available. The various resources
controlled by the operating system can be thought of as devices. Some of these devices are physical
devices (for example, tapes), while others can be thought of as abstract or virtual devices (for example,
files). If there are multiple users of the system, the system may require us to first request the device, to
ensure exclusive use of it. After we are finished with the device, we release it. These functions
are similar to the open and close system calls for files.
Some System calls are:
request device, release device
read, write, reposition
get device attributes, set device attributes
logically attach or detach devices
Once the device has been requested (and allocated to us), we can read, write, and (possibly) reposition the
device, just as we can with files.
Information Maintenance
Many system calls exist simply for the purpose of transferring information between the user program and
the operating system. For example, most systems have a system call to return the current time and date .
Other system calls may return information about the system, such as the number of current users, the
version number of the operating system, the amount of free memory or disk space, and so on.
Communication
There are two common models of inter process communication:
The message passing model and the shared-memory model.
In the message-passing model, the communicating processes exchange messages with one another to
transfer information. Messages can be exchanged between the processes either directly or indirectly
through a common mailbox. Before communication can take place, a connection must be opened.
In the shared-memory model, processes use shared memory creates and shared memory attaches system
calls to create and gain access to regions of memory owned by other processes. Recall that, normally, the
operating system tries to prevent one process from accessing another process's memory. Shared memory
requires that two or more processes agree to remove this restriction. They can then exchange information
by reading and writing data in the shared areas.
Some System calls are
create, delete communication connection
send, receive messages
transfer status information
attach or detach remote devices

17
System Programs in Operating System

 System Programming can be defined as the act of building Systems Software using System
Programming Languages.

 Program Development and Execution can be done conveniently in System Programs.

 It traditionally lies between the user interface and system calls.

 System Programs can be divided into these categories :

1. File Management

2. Status Information

3. File Modification

4. Programming-Language support
5. Program Loading and Execution

Operating- System Structure

 Simple Structure

 Layered Structure
18
 Micro kernel Structure

 Modules Structure

Simple Structure

Layered Structure

 The UNIX OS consists of two separable parts

Systems programs

The kernel

19
20
Micro kernel Structure

 The user services and kernel services are implemented in different address space.

 It reduces the size of kernel and size of operating system as well.

e.g:-Mac OS, MS-Windows

Modules Structure

 Most modern operating systems implement kernel modules

 Uses object-oriented approach

 Each core component is separate

Eg:- Solaris

21
Operating System Debugging

Debugging is the process of finding the problems in a computer system and solving
them. There are many different ways in which operating systems perform debugging.

 Log Files

 Core Dump Files

 Crash Dump Files

 Trace Listings

 Profiling

Log Files

The log files record all the events that occur in an operating system.

 Event Logs These stores the records of all the events that occur in the execution of a
system.

 Transaction Logs store the changes to the data so that the system can recover from
crashes and other errors.

Message Logs These logs store both the public and private messages between the users.
They are mostly plain text files, but in some cases they may be HTML files.

 Core Dump Files

The core dump files contain the memory address space of a process that
terminates unexpectedly.

 Crash Dump Files

In the event of a total system failure, the information about the state of the operating
system is captured in crash dump files.

 Trace Listings

The trace listing record information about a program execution using logging.
This information is used by programmers for debugging.

 Profiling

Profiling is done by monitoring the source code of the required system program using a
code profiler.

22
System Boot

Booting the system is done by loading the kernel into main memory, and starting
its execution.

23
24

You might also like