Skip to main content

Posts

Showing posts with the label dotclu

How to run a C/C++ program in Linux mint/ubantu/other

Run A C/C++ program in mint / ubantu / other linux Hello friends, here we are going to run a c program file in linux mint. Here is some step which return below the video , You can simply watch the video or follow the step .... VIDEO Steps for Run C program file in terminal first open software manager/ store and download the " G++ " or you can also " apt get" for install g++. Open any editor and make a c/c++ file and save it on any location. Now open terminal and go to your file location (lets say it "Desktop" then go to Desktop by  cd Desktop command). Now Type g++ filename.c -o outputfilename then press enter. (filename = your file name  and  outputfilename = what output name you want)

Program to convert Birth Date or Any Date into a Name.or Find Day or Month name of Any Date.

WAP to find Any Day or Month Name of Any Date About Program: This program helps you to find the Day and Month of any Date / Any Year. Here i'm using Simple Algorithm to find the Exact Day And Month name of Date. Things which I have to Remember Before Creating a program: Check the Year is Leap or Normal Year Days of the Month some month have 30 and some have 31  Also include the Feb month condition for both 28 and 29 days last is creating a user Friendly Input Here one thing to notice that i'm used a software for that program is Dev C++ . Below you get Direct Downloading Link of Dev C++ Downloads Button  Download Dev C++ Download Source Code #Note : when you click on Downloading link You get An ad, Don't worry just skip it from upper right Corner Button (Button show after 5 sec). It just for help us, we make more and more easy and understandable content for you regularly. Or watch Video How you download the Source code...

Program and Algorithm of Best Fit in C++ || dot clu

Program  and Algorithm of Best Fit in C++ || dot clu Best Fit Algorithm in C and C++ Memory Management is one of the services provided by OS which is needed for Optimized memory usage of the available memory in a Computer System. Suggestion: 1. First Fit 2.  Best Fit 3.  Worst Fit What is Best Fit Memory Management Scheme? Best fit uses the best memory block based on the Process memory request. In best fit implementation the algorithm first selects the smallest block which can adequately fulfill the memory request by the respective process. Because of this memory is utilized optimally but as it compares the blocks with the requested memory size it increases the time requirement and hence slower than other methods. It suffers from Internal Fragmentation which simply means that the memory block size is greater than the memory requested by the process, then the free space gets wasted. Once we encounter a process that requests a memory which is hi...

First Fit Program and Algorithm in C++ || dot clu

First Fit Program and Algorithm in C++ || dot clu First Fit Algorithm in C and C++ Here you will learn about first fit algorithm in C and C++ with program examples. There are various memory management schemes in operating system like first fit, best fit and worst fit. In this section we will talk about first fit scheme. Suggestion: 1. First Fit 2.  Best Fit 3.  Worst Fit What is First Fit Memory Management Scheme? In this scheme we check the blocks in a sequential manner which means we pick the first process then compare it’s size with first block size if it is less than size of block it is allocated otherwise we move to second block and so on. First Fit Algorithm Get no. of Processes and no. of blocks. After that get the size of each block and process requests. Now allocate processes if(block size >= process size) //allocate the process else //move on to next block Display the processes with the blocks that are allocated to a respective...

Shortest Remaining Time First (SRTF) Program in C++ || dot clu

Shortest Remaining Time First (SRTF) Program in C++ || dot clu Shortest Remaining Time First (SRTF) Shortest Remaining Time First (SRTF) Algorithm is preemptive version of Shortest Job First Algorithm. In this current process is executed until it is completed or a new process is added having lower burst time compare to the the remaining time for current process. SRTF algorithm may lead to starvation, if processes with lower burst time continues to add to cpu scheduler then the current process will never get a chance to get executed. For example consider the following table Process Arrival Time Burst Time P1 0 10 P2 1 6 P3 2 9 P4 3 4 At time t=0, Process P1 will start get executing as it is only the process present at that time. Then at t=1, Process P2 added to the CPU scheduler, at this time remaining time(Burst time) for Process P1 gets 9, as Burst time of P2 is less than the remaining time of other processes (for now there is only process P1) therefore pro...