Operating System Fundamentals: Processes and Memory
Process Management and Execution
Process: A program in execution.
Thread (Strand): The point of execution within a process.
States of a Process
Processes can exist in the following states: Running, Ready (standby or active), or Blocked.
Process Transitions
- Transition A: Running this program requires some element or signal to continue to run.
- Transition B: The program has used the CPU time allocated for its implementation and must make way for the next process.
- Transition C: This preparation process enters the implementation (execution) phase.
- Transition D: A blocked process transitions to the ready state.
CPU Scheduling Algorithms
- Round-Robin (Wheel Algorithm): Assigns relative execution times for different processes.
- FCFS Algorithm: Resources are allocated according to a FIFO (First-In, First-Out) queue. The first process is assigned time or CPU cycles until it ends completely.
- STR Algorithm: Runtime assigns a priority to the shortest processes in order to execute them in the shortest time possible.
- SRTF Algorithm: The allocation process is a function of having the fewest outstanding cycles to finish.
Memory Management Techniques
Virtual Memory: A technique that allows only the portion of the program currently running to remain in memory, while the rest remains on the disk.
Paging: A technique that involves splitting the RAM into equal frames and programs into parts of the same size called pages.
Segmentation: A technique similar to paging that allows you to define variable-size memory. Each segment can vary from 0 up to a maximum allowed limit.
Swapping: A technique similar to virtual memory management.
Software Characteristics
- Relocatable: Once loaded into RAM to run, its position may vary depending on the situation. It can change position when an operation is being performed on the computer.
- Reentrant: If they are running, they leave memory free for other processes. When released, they are typically stored temporarily on the hard disk.
- Reusable: They are normally used by several users at once in memory, regardless of how many users will use the software.
User Interface Types
Text-Based Interface: Allows the user to enter commands where the OS responses are entered or displayed using character strings (e.g., DOS, UNIX).
Graphical User Interface (GUI): Features on-screen displays in windows or independent displays. These windows contain components and objects used to send or receive information without manual typing.