Overview of the
Operating System
CPE 312L – Operating Systems
Operating System
An operating system (OS) is a component of system software
that controls computer hardware and software whilst also offering
common functions to programs.
• Activities are planned and scheduled to optimize system
efficiency in time-sharing OS.
• There is software that are accountable for the distribution of
processing time, mass storage, printing, and other services
How OS Interacts with Hardware?
• Application code interacts with
hardware via the OS.
• OS provides functions like
input/output handling and memory
utilization.
Some Important Functions of an OS
• Memory Management
• Device Management
• File Management
• Processor Management
• Security
• Control over system performance
• Job Accounting
• Error-detecting aids
• Coordination between other software and users
Memory Management
• Memory management is a sort of resource management that is
used to keep track of how much memory a computer has.
• Memory management must contain techniques for efficiently
allocating memory to programs on request and releasing it for
use when it is no longer needed.
Memory Management
Virtual Memory
Virtual memory separates a process’s memory addresses from
its physical addresses.
• It increases address space beyond physical RAM by using
paging and auxiliary storage.
• Enables processes to be isolated, improving system stability.
Memory Management
Virtual Memory
OS/360 and successors – the OS manages the memory
Unix-like OSs – handle the memory at the application level
Memory Management
2 Types of Memory Management in an Address Space
1. Manual Memory Management
The programmer is responsible for allocating and freeing memory.
2. Automatic Memory Management
The OS automatically handles memory allocation and deallocation (e.g.,
garbage collection).
Memory Management
Heap Memory
A large pool of memory is used for dynamic allocation.
Free Store
The unoccupied sections of the heap are available for new allocations.
Memory Management
Challenges
External Fragmentation
• Small gaps between memory blocks cause inefficiency in memory
allocation.
• These gaps are too small to satisfy new allocation requests.
• Impact: Can lead to wasted memory, reducing overall system efficiency.
Memory Management
Chunking
A method to manage memory more effectively by grouping smaller allocations
into larger "chunks" to reduce fragmentation.
Allocator’s Role
The memory management system tracks allocations to avoid overlaps and
memory leaks.
Memory Management
Memory Leaks
Memory leaks occur when memory is allocated but never deallocated, leading
to wasted memory resources.
Memory Management
Device Management
Device management refers to controlling and managing
input/output (I/O) devices and their associated resources within
the operating system.
• Manages I/O devices such as keyboards, printers, USB ports,
camcorders, etc.
• Accompanying support units and control channels for managing
devices.
Device Management
Process Required Resources
• Main Memory
• File Access
• Disk Drive Access
If resources are available, the process can be executed by the CPU.
If resources are unavailable, the process must wait until enough resources
are available.
Device Management
Device Controller
• Manages both physical and virtual devices.
• Determines the availability of the desired devices in the system.
Device Management
Types of I/O Devices
1. Boot Device
• It organizes data into fixed-size blocks, with every single one of them having its own
unique address. Disks, for example.
2. Character Device
• It sends or receives a continuous stream of characters, none of which may be
addressed individually. For example, keyboards, printers, and so on.
3. Network Device
• It is used for data packet transmission.
Device Management
Device Management
The communication with the devices is handled by the OS via
their drivers. The Operation Systems elements offer a
harmonious interface for accessing devices with varying physical
characteristics
Device Management
Peripheral Devices Classification
1. Dedicated Devices
• Dedicated devices are hardware resources that are used by only one
process or user at any given time.
2. Shared Devices
• Shared devices are hardware resources that multiple processes or
users can access simultaneously or in a time-shared manner.
3. Virtual Devices
• Virtual devices are not physical hardware but are created and managed
by the OS to simulate the behavior of physical devices.
Device Management
The following are some device management features:
• The OS links up with device controllers through device drivers
when directing the device to the various processes running on
the system;
• Device drivers are also system software applications that
connect processes and device controllers;
• Another critical purpose of the device management function is
to implement the API;
Device Management
The following are some device management features: (cont.)
• Device drivers are software programs that enable an OS to
properly regulate the operation of multiple devices;
• The device controller, which is utilized in device management
operations, consists primarily of three types of registers:
command, status, and data.
File Management
• Also known as a file manager.
• It’s a computer application that manages data files in a system.
• Has limited functionality and is designed to manage individual
or group files, such as specific office papers and records.
• Each computer’s data is kept in a complex hierarchical file
system with directories and subdirectories beneath them.
File Management
• Many other data, such as images, videos, and documents, are
organized by the user at his or her leisure. A file management
system is essentially the software that is used to organize,
move, and operate these files.
• In reality, file management systems are concerned with how
files are structured as opposed to just how they are saved.
File Management
• The tracking component of a file management system is critical
to the construction and maintenance of this system, in which
documents in different phases of processing are distributed and
interchanged continuously. It comprises a simple interface that
displays stored files.
• It enables the user to explore, transfer, and sort them based on
several criteria such as date of last modification, date of
creation, file type/format, size, and so on
File Management
The system may include elements such as:
• The procedure of assigning queued document numbers for processing;
• Ownership and process mapping are used to track the many phases of
processing;
• Report generation;
• Notes
• Status
• Create, modify, move, copy, and delete files, as well as do other file
operations;
• Basic metadata can be added or edited.
File Management
File Management
Advanced file management systems, such as document
management software (DMS), may be able to do
additional tasks, such as arranging important documents.
To establish a searchable database for faster retrieval,
files are tagged or indexed depending on their properties
File Management
A file management system is not the same as a file system,
which stores all types of data and files in an OS, or a database
management system, which includes relational database features
and a scripting language for data processing.
Processor Management
A process is a job that falls under the category of Execution.
Process is often referred to as the Running Job. A system call
must be made that calls the Processor or CPU to perform any
operation for execution.
Processor Management
Process ID (ID Number)
• The CPU assigns a process ID when we request an operation.
Name of the Process
• Identify the process description. The name of the operation carried out
by the Process.
Process Status (Ready, Active, Wait, or Suspend)
• The process has some states, state specify the process state implies
whether a process is operating or not, whether a process waits for
CPU, and so on
Processor Management
Process States
Ready
• When we have completed all of the Inputs and Outputs, the process
will enter the Ready State.
Active
• A process that is active is one that is executing on the CPU.
Wait
• When a process is waiting for user input and output, it is said to be in
the wait state.
Processor Management
Process Resources
Many resources are employed when running a process. To input
information for instance, we have to use the keyboard, and to
send data to the computer, we must use the CPU.
Processor Management
Scheduling Information
Scheduling is utilized when multiple processes are executing at
the same time in which the following processes will be executed
by the CPU. So, we use scheduling to calculate CPU time, which
means CPU time is divided among several processes.
Brief History of OS
Operating System Types
Batch Operating System
A batch operating is designed for a specific purpose and does
not have any of its processes controlled directly by the user.
Each user presents a designated task to the computer operator
through an off-line means like punch cards.
Operating System Types
Time-Sharing Operating System
Time-sharing is a technique of letting multiple users to use a
computer system at the same time from different stations or
terminals. Multitasking or time-sharing is a natural variation of
multiprogramming.
Operating System Types
Network Operating System
A network operating system (NOS) operates on a server and
allows it to deal with data, users, groups, security, applications,
and other networking operations.