Posts

Round Robin implementation in C

Image
Simulate the following RR CPU scheduling algorithms to find turnaround time and waiting time Round Robin is a  CPU scheduling algorithm  where each process is assigned a fixed time slot or quanta in a cyclic way. Things to remember RR is always used in preemptive way Commonly used in CPU its simple and starvation free since every process is given a fair share of time has a Overhead context switch problem   Program Output

SJF (non-preemptive) implementaion in C

Image
Simulating SJF non-preemptive CPU scheduling algorithms to find turnaround time and waiting time We are given with n processed with there arrival time and burst time, task is to find average waiting time and average turn around time. This algorithm is similar to that of the FCFC  but we need to sort the processes to obtain minimum waiting time or based on burst time while executing a process Things to remember SJF results in minimum waiting time since all processes are sorted based on burst time Chance of Starvation (A process may be keep on postponed can be solved by using Aging) Impractical to be used in an Operating System since the burst time cant be predicted Program Output

FCFS implementation in C

Image
Simulation of FCFS CPU scheduling algorithms to find turnaround time and waiting time We are given with n processed with there arrival time and burst time, task is to find average waiting time and average turn around time. Algorithm is simple as waiting in lines for our order in a burger shop where the first person is served first from where we get the FCFS as First Come First Serve also known as First in First out. Things to remember FCFS is a non-pre-emptive scheduling  Avg waiting time is not optimum compared to other scheduling Has Convay effect  Program Output

Integrating Bash on Windows(Linux subsystem) into VSCode

Image
VSCode is the best code editing software, which has a lot of useful features for increasing productivity Now i am gonna say how we can integrate Bash on Ubuntu on Windows in VSCode step 1: open your VSCode step 2:open the settings from (File => Preferences => User Settings) or use command pallet for windows (ctrl+shift+p) open the settings json file step 3: add the following line and save “terminal.integrated.shell.windows”: “C:\\Windows\\sysnative\\bash.exe”

A Day with Manjaro

Image
Finally spend a full day with Manjaro Linux At least got rid of my unstable ubuntu and tried to install new liux and deleted all my important files by mistake thanks for my cloud backup (i can install without physical backup :) ). Thought that it would be same as ubuntu forgot that it has packman now i am tring hard to install all my software again :( .Anyways manjaro is a good linux distro. Anyways vscode is one of the most used software so to find how to install click here However My friend just told me that we can do it easily with paman(Package Manager) by just enabling AUR and install VS-Code. :) Find my friends blog  here

Install VS-Code in Manjaro Linux

Image
VS-Code is one of my favorate code editing software Following steps are to install vs code in Manjaro distro step 1:Downloading Visual Studio Code Package download the Visual Studio Code Package for 64-bit Linux Operating System from the Microsoft server # mkdir /tmp/vscode; cd /tmp/vscode/ # wget https://az764295.vo.msecnd.net/public/0.3.0/VSCode-linux-x64.zip step 2:Extract the Package Now, after we have successfully downloaded the zipped package of Visual Studio Code, we'll gonna extract it using the unzip command to /opt/directory. To do so, we'll need to run the following command in a terminal . # unzip /tmp/vscode/VSCode-linux-x64.zip -d /opt/ step 3:Running Visual Studio Code we can launch code from out terminal this line will change the permission to run vscode # sudo chmod +x /opt/VSCode-linux-x64/Code this is actually to run # sudo /opt/VSCode-linux-x64/Code If we want to launch Code and want to be available globally via termina

Running (pre-loaded)Virtual Machine on VirtualBox

Image
Running Linux systems on Virtual Box is more safer for Beginner.Virtual Box is a free software from oracle which can be downloaded from  here The pre installed Linux Image for Machine Learning can be downloaded from from following link The following steps are to load the virtual machine in Virtual box which is preloaded step 1  Make a new Virtual machine:       open the virtual box software and click on new  Name the VM(virtual machine) set the name and type as Linux/windows and choose the distribution you use or set as other as default set the suitable memory size for the vm: its better to keep at least 1 GB if possible for hard disk choose use existing hard disk and use the file button to navigate to the folder where the  vm is downloaded and hit create start the machine there we have  Don't feel crazy with this  Just wait a while :) Hears the vm successfully running :) leave a comment for any further support