Operating Systems: Elements, Structure, and Functions
Unit 2: Operating System Elements and Structure
2.1 Introduction to the OS
OS Definition: A set of programs, services, and functions that manage and coordinate the operation of hardware and software.
User Interaction: Through an Interface
- Interface Types:
- Text mode (Prompt)
 - Graphic Mode (Mouse, Touchscreen, Voice)
 
 
Types of OS (Based on Hardware and Software Management):
- Single-User OS: Only one simultaneous user (e.g., XP, Vista, MS-DOS).
 - Multi-User OS: Multiple users can use software and hardware resources of one computer.
 
Data Server vs. Application Server:
- Data Server: Applications run on the client PC; data is saved on the server. Examples: DBMS (Oracle, SQL Server, Access, MySQL), Accutype.
 - Application Server: The application runs on the server; the client accesses it through a small program (browser). Examples: Web applications (PHP, ASP, ASPX), eBay, Amazon, Google.
 
2.2 Resource Functions of an OS
- Coordinate basic OS hardware use by applications (the OS itself or the user).
 - Layered structure of hardware, software, and users.
 - Interface: A set of programs that run on your computer and relate levels so the end-user can access the hardware and implement its programs.
 - Service: A background application that allows:
- Managing access to peripherals.
 - Managing access to files.
 - Monitoring hardware and software errors.
 - Storing information about events.
 
 - Services can be installed. Examples:
- Web listening services (Apache server).
 - Provision of access to databases (Oracle).
 - Virus Verification Service (AVG Free).
 
 
2.3 Management of Resources in an OS
2.3.1 Memory
- Memory Manager Functions:
- Keep track of free and occupied memory areas.
 - Manage the swap disk.
 
 - Memory Allocation Methods:
- Fixed Partitions: Easy management but can lead to wasted space.
 - Variable Partitions: More complex management but less wasted space.
 
 
2.3.2 Process and Processor
- Process Definition: A running program (task).
 - Features:
- To be executed, it must reside in memory and be adequately funded.
 - Each process is protected from other processes.
 - There are user processes (UP) and system processes (SP):
- UP: Restricted Mode
 - SP: Privileged Mode (Kernel Mode)
 
 - Each process has its Process Control Block (PCB).
 - Processes can compete or collaborate.
 
 
2.4 Architecture and Components
- OS Architecture: Layers (4+1) (Refer to 2.1, p. 46).
 - VMware virtual machines 6.X, VirtualBox.
 
2.5 Operating Modes of OS
- Definition: The way in which the user utilizes the resources that make up the hardware, software, and information system.
 - Two Main Forms:
- Batch: Processes (P1, P2, etc.) are executed sequentially, with logs generated. Uses .bat files.
 - Real-Time: Processes (P1, P2, P3, etc.) interact with the processor and generate results.
 
 
Classification of Real-Time Systems:
- By Number of Users:
- Single-User (simultaneous) on one computer (e.g., MS-DOS, XP).
 - Multiuser (e.g., Windows 2003 Server).
 
 - By Number of Processes (Simultaneous):
- Monoprogramming (single-tasking, e.g., MS-DOS).
 - Multiprogramming (multitasking, e.g., WinXP).
 
 - By Number of Processors:
- Uniprocessor (1 single processor).
 - Multiprocessor (2 or more processors):
- SMP (Symmetric Multiprocessing): Balances the load between processors.
 - AMP (Asymmetric Multiprocessing): Demands more processors only if necessary.
 
 
 - By Response Time:
- Real-Time (immediate): 1 process, 1 process/processor, priority-based.
 - Time-Sharing: Each process uses a few CPU cycles to complete.
 
 
