0% found this document useful (0 votes)
17 views6 pages

os-mod1

The document outlines the structure and components of computer systems, including hardware, operating systems, application programs, and users. It details the objectives and functions of operating systems, such as memory management, process management, and security, as well as the evolution and types of operating systems. Additionally, it explains processes and threads, their states, and inter-process communication methods.

Uploaded by

Asheeqa Kp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views6 pages

os-mod1

The document outlines the structure and components of computer systems, including hardware, operating systems, application programs, and users. It details the objectives and functions of operating systems, such as memory management, process management, and security, as well as the evolution and types of operating systems. Additionally, it explains processes and threads, their states, and inter-process communication methods.

Uploaded by

Asheeqa Kp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

### **Short Notes: Unit 1 - Computer System Structure**

---

### **1. Components of a Computer System**

- **Hardware**:
- Physical resources: CPU, memory, I/O devices.
- **Operating System (OS)**:
- Manages hardware and provides an interface for applications and users.
- **Application Programs**:
- Examples: Word processors, compilers, browsers, games.
- **Users**:
- Humans, machines, or other computers interacting with the system.

| Component | Role | Examples |


| ---------------- | -------------------------------------- | ------------------------- |
| **Hardware** | Provides physical resources | CPU, memory, I/O devices |
| **OS** | Manages resources, interface provision | Linux, Windows, MacOS |
| **Applications** | Solves user problems using resources | Browsers, word processors |
| **Users** | Interacts with the system | Humans, other computers |

---

### **2. OS Objectives**

- **Convenience**: Simplifies computer use.


- **Efficiency**: Optimizes resource usage.
- **Evolvability**: Facilitates updates and new feature integration.

---

### **3. Functions of the OS**

#### **3.1 Memory Management**


- Refers to the management of primary memory.
- Activities include:
1. Allocating and deallocating memory to processes.
2. Keeping track of memory locations and whether they are free or allocated.
3. Distributing memory during multiprocessing and sharing memory space.
4. Protecting the memory address space of processes to avoid unauthorized access.
5. Performing **swapping** to move data between primary and secondary memory.

#### **3.2 Process Management**


- Manages processes running in the system.
- Activities include:
1. Scheduling processes using algorithms to ensure optimal CPU utilization.
2. Maintaining the status of processes through a **process scheduler**.
3. Allocating and deallocating the CPU for processes.
4. Keeping track of processor usage and traffic control.

#### **3.3 Device Management**


- Coordinates communication between processes and I/O devices.
- Activities include:
1. Allocating and deallocating devices for processes.
2. Maintaining records of devices in use.
3. Managing access to devices through their respective drivers.

#### **3.4 File Management**


- Responsible for the organization and security of files.
- Activities include:
1. Keeping track of file locations, creation, deletion, and modifications.
2. Enforcing user access settings to ensure security.
3. Maintaining file directory structures and data integrity.

#### **3.5 Protection and Security**


- Ensures the safety of system resources and data.
- Key features include:
1. **Access Control**: Enforces authentication and permissions to prevent unauthorized access.
2. **Data Encryption**: Protects sensitive information from interception.
3. **Malware Detection**: Identifies and mitigates malicious software threats.

#### **3.6 Other Important Functions**


- **Control Over System Performance**:
- Monitors and optimizes the performance of hardware, software, and networks.
- Ensures efficient system operation to meet user expectations.
- **Error Detection and Response**:
- Detects errors during operations and provides responses to minimize impact.
- Responses may include retrying operations, reporting errors, or halting affected processes.
- **Job Accounting**:
- Tracks resource usage and performance metrics for processes, users, or applications.
- Facilitates optimization, capacity planning, and performance analysis.
- **Coordination Between Software and Users**:
- Manages interpreters, compilers, and other tools for seamless user interaction.
- Ensures efficient resource allocation and process management for various applications.

| Function | Key Activities |


| ------------------------- | --------------------------------------------------- |
| **Memory Management** | Allocates, tracks, protects, and swaps memory. |
| **Process Management** | Schedules and manages process lifecycle. |
| **Device Management** | Allocates devices and tracks usage. |
| **File Management** | Manages file creation, security, and organization. |
| **Protection** | Access control, encryption, and malware detection. |
| **System Performance** | Monitors and optimizes overall system efficiency. |
| **Error Handling** | Detects and responds to operational errors. |
| **Job Accounting** | Tracks resource usage and provides performance metrics.|
| **Software Coordination** | Ensures efficient interaction between software tools. |

---

### **4. Evolution of Operating Systems**

- **First Generation (1940s-1950s)**:


- No OS, direct hardware programming.
- **Second Generation (1955-1965)**:
- Batch processing introduced.
- **Third Generation (1965-1980)**:
- Multiprogramming and minicomputers.
- **Fourth Generation (1980-Present)**:
- GUI-based systems, PCs (e.g., Windows, MacOS).
| Generation | Characteristics | Examples |
| ---------- | ---------------------------- | -------------- |
| **First** | No OS, manual programming | Plug-boards |
| **Second** | Batch processing | GMOS |
| **Third** | Multiprogramming | UNIX |
| **Fourth** | GUI-based personal computers | Windows, MacOS |

---

### **5. Types of Operating Systems**

#### **5.1 Serial Processing**


- Earliest computers (1940s-1950s) lacked an OS.
- Programs were run directly on hardware using consoles with toggle switches and input/output devices.
- **Challenges**:
1. **Scheduling**:
- Users reserved computer time via hardcopy sign-up sheets.
- Inefficient usage: unused time when tasks finished early or abrupt termination if time ran out.
2. **Setup Time**:
- Each job required manual setup (e.g., loading programs and linking functions).
- Time-intensive process before execution.

#### **5.2 Batch Systems**


- Introduced **batch monitors** to automate job execution.
- **Working**:
- Jobs were grouped into batches and processed sequentially.
- Users submitted jobs to an operator, who fed them into the system.
- A monitor program controlled job execution and returned results.
- **Advantages**:
- Reduced setup time.
- Automated job scheduling.
- **Limitations**:
- No user interaction during execution.

#### **5.3 Multi-Programmed Batch Systems**


- Improved CPU utilization by allowing multiple jobs to reside in memory.
- **Mechanism**:
- Jobs waiting for I/O were suspended, and CPU switched to other jobs.
- Used **job scheduling** and **CPU scheduling** for optimized resource use.
- **Advantages**:
- Maximized CPU usage.
- Enabled efficient multitasking.

#### **5.4 Time-Sharing Systems**


- Allowed multiple users to interact with the system simultaneously.
- **Features**:
- Users accessed the system through terminals.
- Quick response times provided an interactive experience.
- **Advantages**:
- Reduced idle time.
- Improved user convenience.
- **Examples**: UNIX, Multics.

#### **5.5 Real-Time Systems**


- Designed for applications with strict timing requirements.
- **Types**:
1. **Hard Real-Time Systems**: Guarantees tasks complete within deadlines (e.g., medical devices).
2. **Soft Real-Time Systems**: Prioritizes critical tasks but allows deadline flexibility (e.g., multimedia).
- **Advantages**:
- Predictable behavior.
- **Disadvantages**:
- Limited secondary storage and advanced OS features.

#### **5.6 Distributed Systems**


- Consist of interconnected computers sharing resources over a network.
- **Features**:
- Enable remote file access and task distribution.
- Use protocols like TCP/IP for communication.
- **Advantages**:
- Enhanced scalability and fault tolerance.
- Resource sharing across systems.

#### **5.7 Multiprocessor Systems**


- Multiple processors share memory and peripherals.
- **Advantages**:
1. Increased throughput.
2. Economy of scale.
3. Enhanced reliability (failure of one processor doesn’t halt the system).
- **Types**:
1. **Symmetric Multiprocessing (SMP)**: All processors run the OS independently.
2. **Asymmetric Multiprocessing (AMP)**: One master processor controls others.

| OS Type | Key Features | Examples |


| -------------------------- | --------------------------------------------- | ----------------------- |
| **Serial Processing** | Manual scheduling, direct hardware access | Early 1940s computers |
| **Batch Systems** | Sequential automated processing | GMOS |
| **Multi-Programmed Batch** | Concurrent job execution, multitasking | IBM Mainframes |
| **Time-Sharing Systems** | Interactive multi-user environment | UNIX, Multics |
| **Real-Time Systems** | Timing constraints for critical applications | Medical imaging |
| **Distributed Systems** | Networked task and resource sharing | TCP/IP-based networks |
| **Multiprocessor Systems** | Parallel processing with multiple CPUs | Multi-core processors |

---

### **6. Processes**

#### **Definition**
- A **process** is a program in execution, which consists of the program code and its current activity.
- A process includes:
- **Program Code**: Also called the text section.
- **Program Counter**: Specifies the next instruction to execute.
- **Stack**: Contains temporary data like function parameters, return addresses, and local variables.
- **Heap**: Memory dynamically allocated during runtime.
- **Data Section**: Contains global variables.

#### **Process in Memory**


- A process in memory has the following parts:
1. **Text Section**: The code of the program.
2. **Program Counter**: Tracks the current execution point.
3. **Process Stack**: Stores temporary data, such as function parameters.
4. **Data Section**: Holds global variables.
5. **Heap**: Stores dynamically allocated memory during runtime.

#### **Process Control Block (PCB)**


- Each process is represented in the operating system by a **Process Control Block (PCB)**.
- Components of PCB include:
1. **Process ID (PID)**: Unique identifier for the process.
2. **Process State**: Current state (e.g., running, waiting).
3. **Program Counter**: Address of the next instruction to execute.
4. **Registers**: Tracks CPU register values.
5. **Memory Pointers**: Points to program and data memory.
6. **I/O Status**: Tracks I/O operations and devices allocated.
7. **Accounting Information**: Tracks resource usage and process metrics.

#### **Process States**


- A process can exist in one of the following states:
1. **New**: Process is being created.
2. **Ready**: Process is ready to be assigned to the CPU.
3. **Running**: Process is currently being executed.
4. **Waiting**: Process is waiting for an event (e.g., I/O completion).
5. **Terminated**: Process has finished execution.

| State | Description |
| ----------- | -------------------------------------------- |
| **New** | Process is being created. |
| **Ready** | Process is ready for CPU execution. |
| **Running** | Process is currently being executed. |
| **Waiting** | Process is waiting for an external event. |
| **Terminated** | Process has completed or been aborted. |

#### **State Transitions**


- **Ready → Running**: Scheduler assigns the CPU to the process.
- **Running → Waiting**: Process requests I/O or external event.
- **Waiting → Ready**: Event completion moves the process back to ready.
- **Running → Terminated**: Process finishes or is terminated by OS.

#### **Operations on Processes**


1. **Process Creation**:
- Parent processes create child processes using system calls (e.g., `fork()` in UNIX).
- Parent and child may share resources or execute independently.
2. **Process Termination**:
- Process releases allocated resources and is removed from scheduling.
- Parent can terminate child processes.
3. **Process Blocking**:
- Processes are blocked while waiting for resources or I/O operations.

#### **Inter-Process Communication (IPC)**


- **Shared Memory**:
- Processes communicate via a common memory area.
- Faster but requires synchronization.
- **Message Passing**:
- Processes communicate by sending/receiving messages.
- Useful for distributed systems.
| IPC Method | Key Features | Use Cases |
| ------------------- | ------------------------------------ | ---------------------------- |
| **Shared Memory** | Faster, needs synchronization | Processes on the same system |
| **Message Passing** | More flexible, involves system calls | Distributed environments |

---

### **7. Threads**

- **Definition**: Lightweight units of execution within a process.


- **Benefits**:
- **Responsiveness**: Continues execution despite blocked tasks.
- **Resource Sharing**: Threads share process resources.
- **Efficiency**: Lower overhead for creation and switching.
- **Multithreading Models**:
1. **Many-to-One**: Multiple user threads mapped to one kernel thread.
2. **One-to-One**: Each user thread has a corresponding kernel thread.
3. **Many-to-Many**: Multiple user threads share kernel threads.

| Model | Mapping Style | Advantages | Disadvantages |


| ---------------- | ------------------------ | --------------------- | ----------------------- |
| **Many-to-One** | Many user -> One kernel | Simple management | No parallel execution. |
| **One-to-One** | One user -> One kernel | High concurrency | Higher overhead. |
| **Many-to-Many** | Many user -> Many kernel | Optimized flexibility | Complex implementation. |

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy