Programming C 1.4
Programming C 1.4
An operating system (OS) is crucial system software that acts as an intermediary between computer
hardware and user interactions. It manages computer resources, performs fundamental duties, and
provides a user-friendly interface for applications to interact with the hardware.
• Resource Management: Manages hardware resources such as CPU, memory, storage, and
input/output devices.
• File Management: Organizes and controls file operations, including creation, deletion, and
access.
• Memory Management: Allocates and deallocates memory space for processes and manages
memory usage.
• Device Management: Manages peripheral devices and their interactions with the computer
system.
• User Interface: Provides a user interface (UI) for user interactions, such as graphical user
interfaces (GUIs) or command-line interfaces (CLIs).
Process Concept
A process is defined as an instance of a program in execution. It includes the program code, data, and
the context in which it executes.
• Instruction Set: A process executes a set of instructions within its address space.
The evolution of operating systems reflects the advancement in computing technology and user
needs:
• 1950s: Early computers, like calculators, could only run one program at a time.
•
1960s: IBM developed the first operating systems for its mainframe computers. The oN-Line
System (NLS) was an early example of a desktop-like OS.
• 1970s: The development of Unix by MIT, AT&T Bell Labs, and General Electric marked a
significant advancement. Unix evolved into various derivatives, including FreeBSD.
• 1981: Microsoft acquired and renamed QDOS to MS-DOS. MS-DOS was eventually replaced
by newer operating systems.
• Process Management: How processes are created, scheduled, and managed by the CPU.
• I/O Operations: How input and output devices interact with the operating system.
• System Design: Insights into OS functionality contribute to designing and developing better
software applications.
Memory management is crucial for the efficient operation of a computer. The operating system
manages the computer’s primary or main memory, ensuring that each process receives the
necessary memory resources without interference.
Key Functions:
• Monitoring: Tracks memory usage by each program, including allocated and free memory
addresses.
• Protection: Prevents processes from accessing memory reserved for other processes.
Figure: Memory Management
2. Processor Management
Processor management, or process scheduling, involves managing the CPU’s time and resources
among various processes.
Key Functions:
• Task Assignment: Allocates CPU time to different processes, ensuring fair and efficient
processing.
• State Monitoring: Tracks the status of processes to manage their execution effectively.
• Process Scheduling: Determines the order and duration for each process to use the CPU.
3. Device Management
The operating system manages hardware devices through device drivers, handling their operations
and interactions with the system.
Key Functions:
• Device Monitoring: Keeps track of all connected devices and their status.
• Driver Identification: Uses device drivers to manage input/output operations for each
device.
• Allocation: Selects processes for device access and manages device usage efficiently.
• Device Management: Handles the operation of input and output devices, processing
requests and providing responses to requesting processes.
4. File Management
File management involves organizing and controlling the storage and retrieval of files.
Key Functions:
• File Organization: Manages directories and the file system structure for efficient file storage
and access.
• Status Monitoring: Tracks file status, user access rights, and storage locations.
• Integrity Protection: Ensures data integrity and prevents unauthorized access to files.
The operating system provides a user interface, enabling users to interact with the computer system.
Key Functions:
•
• User Interaction: Facilitates interaction with the system through a graphical user interface
(GUI) or command-line interface (CLI).
Command Processing: Interprets and executes user commands, providing feedback and
managing system resources accordingly.
Key Functions:
7. Security
The operating system employs various strategies to protect user data and system integrity.
Key Functions:
• Intrusion Prevention: Uses firewalls and other security measures to protect against external
threats.
The operating system plays a critical role in managing and enhancing system performance.
Key Functions:
• Resource Allocation: Distributes memory, CPU time, and I/O devices across processes for
efficient use.
• Process Scheduling: Manages process execution to prevent CPU overload and facilitate
multitasking.
9. Job Accounting
The operating system tracks the time and resources used by various jobs and users.
Key Functions:
• Resource Tracking: Records resource utilization to monitor and manage usage effectively.
• Job Prioritization: Determines which processes to execute and how much time to allocate to
each.
10. Error-Detecting Aids
The operating system continuously checks for system errors and malfunctions.
Key Functions:
• Error Notifications: Alerts users to system problems and provides guidance for resolution.
The operating system manages the distribution of software and ensures smooth interaction between
different programs and users.
Key Functions:
• Resource Sharing: Prevents software conflicts and ensures smooth operation of multiple
programs.
The operating system manages peripheral devices and their interactions with the system.
Key Functions:
Key Functions:
• Data Transmission: Manages the packaging and transmission of data over networks.
• Network Configuration: Sets up and monitors network connections, such as Ethernet or Wi-
Fi.
A Batch Operating System processes jobs in batches without user interaction during the job
execution. Jobs with similar requirements are grouped together by an operator.
Advantages:
•
Efficient for handling large volumes of similar tasks.
Disadvantages:
A Multi-Programming Operating System allows multiple programs to reside in memory and execute
concurrently. This enhances resource utilization and system efficiency.
Advantages:
Disadvantages:
Advantages:
Disadvantages:
A Multi-Tasking Operating System allows multiple tasks or programs to run concurrently. It uses
scheduling algorithms to manage task execution.
Types:
•
•
• Preemptive Multi-Tasking: The OS can interrupt tasks to switch to another.
• Cooperative Multi-Tasking: Tasks voluntarily yield control to allow other tasks to run.
Advantages:
Disadvantages:
Time-Sharing Operating Systems allocate CPU time to multiple tasks or users in a round-robin
fashion, ensuring fair access to resources.
Advantages:
Disadvantages:
• Reliability issues.
Advantages:
Disadvantages:
•
•
• Complex coordination and management.
Network Operating Systems manage network resources, including user access, security, and shared
files and applications. They operate over a network, providing centralized control.
Advantages:
Disadvantages:
Real-Time Operating Systems are designed to process data and respond to inputs within a strict time
frame, crucial for applications with stringent timing requirements.
Types:
Advantages:
Disadvantages:
•
• Needs specialized device drivers and interrupt signals.
Summary
Computer systems integrate hardware and software to perform tasks efficiently. Key hardware
components include the CPU, memory, storage devices, and input/output devices. Software is
categorized into system software (operating systems) and application software. Operating systems
manage hardware resources, provide a user interface, and support multitasking, security, and
resource management. Understanding these systems is crucial for effective technology use and
development.