You are on page 1of 4

1

Introduction
References:

1. Abraham Silberschatz, Greg Gagne, and Peter Baer Galvin, "Operating System
Concepts, Ninth Edition ", Chapter 1

1.1 What Operating Systems Do - For Users, For Applications, etc.

Fig 1.1 Abstract view of the components of a computer system

 Computer = HW + OS + Apps + Users


 OS serves as interface between HW and ( Apps & Users )
 OS provides services for Apps & Users
 OS manages resources ( Government model, it doesn't produce anything. )
 Debates about what is included in the OS - Just the kernel, or everything the
vendor ships?

Operating system goals:


 Make the computer system convenient and efficient to use
 Execute user programs and make solving user problems easier
 Use the computer hardware in an efficient manner
2

operating systems can be explored from two viewpoints: that of the user and that of the system.

1. User View
 Ease of use
 good performance
 Reliability
 Don’t care about resource utilization

2. System View
 OS works as a resource allocator
 OS works as a control program

Operating System Modes of Operation

1. User Mode
2. Kernel Mode / Monitor Mode / Supervised Mode

A bit, called the Mode Bit is added to the hardware of the computer to indicate the current mode: kernel mode
(0) or user mode (1). With the mode bit we are able to distinguish between a task that is executed on behalf of
the operating system and one that is executed on behalf of the user.

Transition from user to kernel mode


At system boot time, the hardware starts in kernel mode. The operating system is then loaded and starts user
applications in user mode. Whenever a trap or interrupt or system call occurs, the hardware switches from
user mode to kernel mode(that is, changes the state of the mode bit to 0). Thus, whenever the operating system
gains control of the computer, it is in kernel mode. The system always switches to user mode (by setting the
mode bit to 1) before passing control to a user program.

Main Functions or Task Performed by an Operating System

1. Process management
2. Memory management
3. Job scheduling
4. Resource allocation strategies
5. Swap space / virtual memory in physical memory
6. Interrupt handling
3

7. File system management


8. Protection and security
9. Inter-process communications

1. Process Management

An OS is responsible for the following tasks with regards to memory management:

 Creating and deleting both user and system processes


 Ensuring that each process receives its necessary resources, without interfering
with other processes.
 Suspending and resuming processes
 Process synchronization and communication
 Deadlock handling

2. Memory Management

An OS is responsible for the following tasks with regards to memory management:

 Keeping track of which blocks of memory are currently in use, and by which processes.
 Determining which blocks of code and data to move into and out of memory, and when.
 Allocating and deallocating memory as needed. ( E.g. new, malloc )

3. Job scheduling
 FCFS
 Shortest Job First
 Round Robin
 Priority Scheduling

4. Resource Allocation Strategies


 Allocation of resources to the process
 De-Allocation of Resources from process
 Resource Allocation Table or graph is used to track the resources
 It ensures better resource utalization

5. Swap Space / Virtual Memory Management


 Maintaining the virtual memory with a reasonably current copy of memory.
 Keeping the page tables current.
 Responding to page faults by loading the requested memory frames into physical memory.
6. Mass-Storage Management
 Free-space management
 Storage allocation
 Disk scheduling
7. File System Management

 Creating and deleting files and directories


 Supporting primitives for manipulating files and directories. ( open, flush, etc. )
4

 Mapping files onto secondary storage.


 Backing up files onto stable permanent storage media.

8. Protection and Security

 Protection involves ensuring that no process access or interfere with resources to which they are
not entitled, either by design or by accident. ( E.g. "protection faults" when pointer variables are
misused. )
 Security involves protecting the system from deliberate attacks, either from legitimate users of
the system attempting to gain unauthorized access and privileges, or external attackers attempting
to access or damage the system.

Types of Operating Systems


Following are some of the most widely used types of Operating system.

 Simple Batch Operating System


 Multiprogrammed Operating System
 Time Sharing Operating System
 Multiprocessor System
 Distributed Operating System
 Real-Time Operating System

You might also like