Professional Documents
Culture Documents
Operating System
Chapter Two
Operating System Structure
Agenda Chapter Two
OS Structure
• Single User OS
• Multi User OS
• Buffering
Chapter Two
Operating-System Structure OS Structure
• Such operating systems do not have well defined structure and are
monolithic, small and simple systems.
• A system can be made modular in many ways and one method is the
layered approach.
• In Layered Approach the operating system is broken into a number of
layers (levels).
• The bottom layer (layer 0) is the hardware; the highest (layer N) is the
user interface.
• Operating systems can be broken into pieces that are smaller and more
appropriate.
Chapter Two
2. Layered Approach (Con..) OS Structure
• The operating system can then retain much greater control over the
computer and over the applications.
• The main advantage of the layered approach is simplicity of
construction and debugging.
• The major difficulty with the layered approach involves appropriately
defining the various layers.
Chapter Two
2. Layered Approach (Con..)
OS Structure
Chapter Two
View of OS Services OS Structure
Chapter Two
3. Hybrid Systems OS Structure
1. Single-User
2. Multi-User
Chapter Two
Single User OS OS Structure
1. Single-User Single-Tasking OS
• It is cost-effective.
Types of Single-User OS Chapter Two
OS Structure
2. Single-User Multi-Tasking OS
• For example, you can write any text while surfing the internet,
downloading images, watching movies, etc., on Windows, Linux, Mac
OS.
Types of Single-User OS Chapter Two
OS Structure
• Time-saving.
Tasks take longer to complete: As you know, many tasks are waiting
for the CPU if no multiple tasks run at a time.
This will make the system slow, and response time is higher.
Idle time is higher: If only one task is running and this task doesn't
require memory or I/O use, these devices remain idle. But other tasks
need those devices.
Chapter Two
Multi-User Operating System
OS Structure
• These systems are quite complex, and they must manage the tasks
that the various users connected to them require.
• These servers allow several users to access the operating system, kernel,
and hardware at the same time.
Chapter Two
Characteristics of Multi-User OS OS Structure
Resource Sharing: Several devices, like printers, fax machines and hard
drives, can be shared in a multi-user operating system.
Bootloader The bootloader loads all the resources of the The bootloader distributes the resources of the CPU
CPU in the profile of a single superuser. based on the priority of the users.
Complexity Single-User Operating System is simple and The Multi-User OS are complicated as they have to
easy to design. apply complex techniques to share the resources
among various users.
Performance Only one task at one time gets performed. Schedules different tasks for performance at any
rate.
Example MS-DOS, Windows 95, Windows NT, Windows Mainframes, Linux & Unix Distributed OS, etc.
2000, etc.
Chapter Two
Buffering in Operating System OS Structure
• Buffers are typically used when there is a difference between the rate
of received data and the rate of processed data, for example, in a
printer spooler or online video streaming.
There are three main types of buffering in the OS, such as:
1. Single Buffer
2. Double Buffer
3. Circular Buffer
Chapter Two
1. Single Buffer OS Structure
• Only when the buffer is empty, the processor again produces the
data.
Chapter Two
1. Single Buffer (con…) OS Structure
Chapter Two
2. Double Buffer OS Structure
• In Double Buffering, two schemes or two buffers are used in the place
of one.
• In this buffering, the producer produces one buffer while the
consumer consumes another buffer simultaneously.
• So, the producer not needs to wait for filling the buffer.
• When more than two buffers are used, the buffers' collection is called
a circular buffer.
• The data transfer rate will increase using the circular buffer rather
than the double buffering.
• The producer can only fill up to buffer x-1 while data in buffer x is
waiting to be consumed
3. Circular Buffer Chapter Two
OS Structure
Chapter Two
OS Structure