AmitTheInfinity's Profile
Reputation: 109
Stalwart
- Group:
- Authors
- Active Posts:
- 1,530 (0.66 per day)
- Joined:
- 25-January 07
- Profile Views:
- 10,752
- Last Active:
Feb 05 2013 04:45 AM- Currently:
- Offline
Previous Fields
- Country:
- IN
- OS Preference:
- Who Cares
- Favorite Browser:
- FireFox
- Favorite Processor:
- Who Cares
- Favorite Gaming Platform:
- XBox
- Your Car:
- Who Cares
- Dream Kudos:
- 125
Latest Visitors
-
HYK 
12 Apr 2013 - 23:52 -
totgeburt 
30 Jan 2013 - 12:11 -
Harin Sangha 
17 Jul 2012 - 21:35 -
Celerian 
25 Apr 2012 - 09:31 -
supercrazy101 
24 Apr 2012 - 20:15
Posts I've Made
-
In Topic: memory swapping first fit first come first serve
Posted 11 Apr 2012
From what you wrote there I understand that it's just a simulation so you don't need to play with actual processes.
The simplest thing that could be done is have one structure that simulates process and make a list data structure out of it. Have another structure which simulates memory blocks and make free blocks allocated blocks lists for it.
Now as First fit says, all you have to do is check how much memory your process is asking for, see which block in free memory list has equal to or more than memory required (you stop searching at first match) and allocate it. While releasing you do opposite of it.
This is just very basic idea of what it could be. Important thing is how you manage these memory lists and how you manage memory blocks.
No one is going to give you code or any specific help unless you come up with more details about what kind of help you want and what you have done till now. -
In Topic: Problem with sorting my array using bubble sort
Posted 10 Apr 2012
Please don't double post. It's not going to help you to get answers faster. -
In Topic: Problem cannot get return value in a coding
Posted 2 Apr 2012
multiple mistakes in there...
your variables "ave,aveb" both are local variables in 2 different functions. So even though you are calculating their values inside "store" function their scope finishes with that function itself. What you will get in "ave,aveb" of function "grade" is just garbage!
but even to get that, you didn't even called the "grade" function in main! How you are expecting to print a grade? (that too before calling "store" function which calculates "ave,aveb" variables. Then you are using them to calculate grade in "grade" function... which you didn't called.) -
In Topic: "cout" asterisk not showing properly[QUESTION]
Posted 30 Mar 2012
magicm00n, on 30 March 2012 - 05:29 PM, said:The codefor(int j=0; i<number; j++)
you gave me was not right but thank you for giving me the wrong code so I could learn by cracking my brain
Its solved now thanks
)
yes. Glad you could find it.
btw, If you have the solution then please post your final working code here so that when someone else searches for solution to similar problem; they will get it easily. -
In Topic: "cout" asterisk not showing properly[QUESTION]
Posted 30 Mar 2012
Never ask for anything until you show your efforts first.
Anyways...
It's adding for(int j=0; i<number; j++) and removing number increment.
I would also suggest to check if number is less than 1 instead of checking if it is equal to one in if statement.
There are other things to optimize as well, but let it be. Get this one running first.
My Information
- Member Title:
- C Surfing ∞
- Age:
- Age Unknown
- Birthday:
- June 24
- Gender:
-
- Years Programming:
- 9
- Programming Languages:
- C, C++, Java, J2EE, J2ME, .NET, PHP
Contact Information
- E-mail:
- Private
- Website URL:
-
http://
- LinkedIn:
- http://www.linkedin.com/in/patilamit
- Twitter:
- amittheinfinity
Friends
|
|


Find Topics
Find Posts
View Reputation Given

|
Comments
HYK
13 Apr 2013 - 01:24weblevi
22 Nov 2011 - 23:57Implement a C program that reads a string and prints a table with the number of occurrences of each character in the string. Ex: Rubber. r = 2, u = 1, b = 2, e = 1.
If you could save us in this one I would be very grateful! my e-mail is: levi_web@yahoo.com
weblevi
22 Nov 2011 - 23:35