Posts

#5- CPU SCHEDULING ALGORITHMS

Image
  CPU Scheduling Algorithms--   CPU Scheduling algorithms are used by the operating system to determine the order in which processes are executed on the CPU. 1. First come, first served(FCFS):  In the FCFS scheduling algorithm, the process that arrives first is executed first. it follows a non-preemptive approach, meaning that once a process starts running, it continues until it completes or voluntarily gives up the CPU.   FCFS is simple to understand but may lead to poor utilization of the CPU if long processes arrive before shorter ones. 2. Shortest Job Next(SJN) or Shortest Job First(SJF): SJN or SJF Scheduling selects the process with the shortest total execution time next. it can be either non-preemptive or preemptive. if a new process with a shorter burst time arrives, the currently running process may be preempted. *3. Round Robin(RR):  Round Robin is a preemptive scheduling algorithm that assigns a fixed time Quantum (e.g., 12 milliseconds) to each ...

#4- VARIOUS PROCESS STATES-

Image
  New(create): In this step, the process is about to be created but not yet created. It's the program that is present in secondary memory that will be picked up by OS to create the process.  Run: the process is chosen from the ready queue by the CPU for execution and the instruction within the process are executed by any one of the available CPU cores. Ready: New->  ready to run. after the creation of a process , the process enters the ready state that is the process is loaded into the main memory. the process here is ready to run and is waiting to get the CPU time for its execution . Blocked or Wait: whenever the process request access to I/O or needs input form the user or need access to a critical region the process continues to wait in the main memory and does require CPU. once the I/O operation is completed the process goes to the ready state. Terminated or Completed: process is killed as well as PCB is detected. the resources allocated to the process will be rele...

#3- Multiprogramming, multiprocessing, multitasking, and multithreading

Image
1. MULTIPROGRAMMING : Multiprogramming is a technique where multiple programs are loaded into memory simultaneously, and the CPU switches between them to execute instructions.      * On a single processor computer, a multiprogramming OS can run many programs . In a multiprogramming OS, if one program must wait for an input/output transfer, the other programs are ready to use the CPU. As a result, different jobs may have to split CPU time. 2. MULTIPROCESSING: Multiprocessing refers to the execution of multiple process on a system with multiple CPUs or CPU cores.  *the utilization of two or more central processing units (CPUs) in a single computer system . Its definition can vary depending on the context, but generally it refers to a system's ability to support multiple CPUs and its capacity to distribute work among them.     3.MULTITASKING:  Multitasking is a technique that allows multiple tasks or processes to run concurrently on a single CPU.  I...

#2- PROGRAMS vs PROCESS vs THREADS

Image
PROGRAMS   vs   PROCESSS  vs THREADS   *PROGRAM:   A Program is a set of instructions that a computer follows in order to perform a particular task.  it is typically stored in a file on disk and represents an executable entity. Programs can be compiled or interpreted, and they serve as a blueprint for the execution of tasks on a computer system.  *PROCESS: A series of actions or steps taken in order to achieve a particular end is called a process.           A Process is an instance of a program in execution. when a program is loaded into memory and  executed, it becomes a process. A process is an independent entity with its own memory space, resources, and execution context.  it has its own program counter, stack, and variables.        How to find Process:          * THREADS:   A thread is, fundamentally,  a clear, well-defined theme, subject, topic or...

#1- Operating system

Image
OPERATING SYSTEM-   An operating system (OS) is software that acts as an interface between computer hardware and user application. it manages the resources and provides services for the efficient and secure execution of program. *"they all need to access your computer's  central processing unit (CPU) ,  memory , and  storage . The operating system coordinates all of this to make sure each program gets what it needs" There are several types of operating systems, including: 1. windows: development by Microsoft, windows is a widely used operating system for personal computer. 2.macOS: development by Apple, macOS is the operating system used on apple Mac computers.  3. Android: development by Google, Android is an open-sources(including anything no security) operating system primarily designed for mobile devices such as smartphone and tablets.  4. iOS: development by Apple, iOS is the operating system used on  iPhone, iPad, iPods. it provides ...