"Using a program, demonstrate how the memory behaves when the user inputs 4 jobs of different size, showing:
- Available memory space
- Unused space after assigning each job
- Resulting space after each job is freed
Using the First Fit and Best Fit algorithms.
The user must input a minimum of 4 Jobs inside a 1024 KB memory, 24KB which are used for the OS itself. The jobs are stored in an array.
If the sum of all these jobs is bigger than the maximum capacity, it shows an error and the program closes.
After inputting the 4 jobs, you have the option to release a job out of the memory or insert a new job. (<- I'm here.)
If you choose to release a job, the program asks for which job to release, in which case if you choose the 3rd Job, the program will leave a 'hole' in memory in which to use later (array_job[2] = 0), and that memory will be 'freed'. However, that hole cannot be expanded or contracted, and the capacity of that hole will be the same as the 3rd Job's size. (I don't know how to define this.)
If you choose to insert a new job, the program will ask for the size of the job, and depending on the algorithm, it will insert the job into one of the 'freed' slots:
First Fit: It iterates through all the blocks in memory and finds the first 'hole' (from what I can tell, the first 0 it finds through the job arrays) of unallocated space in which the job will fit.
Best Fit: It iterates through all the blocks in memory and finds a 'hole' with the smallest unallocated space in which the job will fit. (While I do understand this algorithm, I don't know how to input it in code. I heard you have to sort the arrays and treat it as First Fit, but I'd need to revert it back afterwards, which I can't seem to do right.)
It needs the average validation methods, the most important ones being 'out of range' ones like if(used_memory>1000) and if(jobsize>block_capacity). I'm working on the code right now and it's a mess, but any help on getting my words into code would suffice.
>>95359
You're only simulating 1024k of "memory", for fuck's sake.
You do not need to be efficient.
A 1024 element array used as a bytemap would be perfectly acceptable: you're fannying about (and probably trying to invent sparse techniques from first principles) over allocating 4k.
int[1024] memory_map;
void fill_memory_map (int start, int size, int val) {for (i=start; i <= start+size; i++) memory_map[i]=val;}
int remove_process(int process) {int j=0;for (i=0; i<=1023; i++){if (memory_map[i]==process){memory_map[i]=0; j++}
return j; }
fill_memory_map(0,1023,0); //initialise
fill_memory_map(0,23,1); // "os"
fill_memory_map(blah)
remove_process(3)
fill_memory_map(find_first_fit(123),123,3);
fill_memory_map(find_best_fit(234),234,4); //bored now. You write this bit. It's possible to find both first and best fit in linear time, using a state machine. You should do this.
>>95359
Best fit is just first fit, but you keep a shadow of the result you were going to return, you keep chugging through memory seeing how much free space is after, and if it's less than the shadow you overwrite the shadow.
int find_free_space(int size){
int sh_start;
int sh_waste=1023;
int start;
int waste;
int state=0;
for (i=0;i<=1023; i++) {
if (state==0) { // searching
start = i;
if (memory_map[i]==0) {state=1;}}
if (state == 1) { // seeking
waste = i-start;
if (memory_map[i] != 0) {state=0; if (waste<sh_waste) {sh_waste = waste; sh_start=start;}}}
return (sh_start);} // error handling and edge conditions are your problem.
>>95402
You should probably also check that the block is larger than size; I'm just back from the pub, so I'm not really on top form for first-year CS questions.
Last thread: >>84032 https://archive.is/6Ynkg
>>84143
>I too have become a meme against my will and tried to find the source (no luck there though).
>>84742
>I would probably find it.
I found it.
OP picture is a composite of this picture...
...with this picture.
The former was shot on 16 February 2006, then resized with Photoshop in 2011.
Here’s a copy that’s slightly cropped but contains EXIF data.
Can anyone help me find an artist? His stuff looks like pic related. All his stuff looks like stills from movies, mostly scifi. I remeber one painting of a man in a phone booth?
google image search
Cornelius Dämmrich
https://zomax.net/gallery/52hz/
>>95381
No, artist I'm lookig for LOOKS like pic related. He had a lot more pictures though and I think his art was less photo realistic. They just both look like movie stills
sorry, don't know it. that style could be about a million different artists. http://www.this-is-cool.co.uk/tag/sci-fi-art/ here's a site that includes some of my favs. they all look like that.
hope someone else remembers seeing a sci-fi phone booth and can help you
/r/'ing the /a/ post where anon calls a loli a big breasted slut.
>>95343
Do you have any more like that picture?
Ecstacy is a hell of a drug.
>>95356
Sadly no, I can post more loli related things later tonight though.
Hey /wsr/, any tips for staying awake for two days straight, I am in a very shitty situation because of a work in groups for college.
preferably nothing lethal.
>>95340
don't
get at least a few hours nap in between
>>95340
I used to do that when I was in college. I just stayed awake out of pure willpower though, I didn't even drink caffeinated beverages.
If you want it badly enough, you'll be able to stay awake. Just don't drive or anything like that.
>>95340
Power naps and cold water.
Can anyone find the artist? Results only return wallpaper sites.
It's a fucking screenshot from the anime fooly cooly (flcl).
>>95341
It's not. The vespa from the show is there but the girl on top of it isn't from flcl at all. The artist just drew it in the same style.
here's the artist's pixiv, though he's removed almost all of his work from it:
http://www.pixiv.net/member.php?id=304812
and here's his site:
http://nikerabi.xii.jp/
Will someone translate the single speech bubble here? Thank you.
>>95267
The pleasure of being cummed inside...
[spoiler]Do that somewhere else...[/spoiler]
>>95278
Spoilers don't work here?
>>95279
spoilers are weird, sometimes they work sometimes they don't
[spoiler]test[/spoiler]
Can someone post the 9/11 version of this?
>>95238
They never did a 9/11 one, but they did do a Sandy hook one.
You know that's a fake right?
what does this phrase (in the red box) refer to?
That you strike B with the 5th finger
Dunno what finger will 5 be, you're the guitarist OP.
>>95351
Thanks. 'Strike' is a hammer on I assume?
Terribad sheet music mate. That doesn't appear in classical literature as far as I know.
I'm tired of /a/ calling me a faggot from reading from mangafox, where are you supposed to get it from?
lurk more
>>95198
anon, trust me on the following
I've been browsing /a/ for four fucking years
I never asked there because the people who do only get the answer "lurk more" because everyone expects you to come to the board already knowing
>>95201
It's a sekkrit club and it has been fucked over by reddit getting word on it and using up all the bandwidth so it doesn't get talked openly much, and I'm certainly not gonna post in /wsr/ of all places.
Here, I'll give you a hint.
Can someone make this image 3675 x 2175 so i can make a magic playmat with it?
You would have to vector this image first so the image wouldn't be pixelated when upscaled and it would likely not be possible to perfectly capture every detail in the background. /w/ might be able to help you with a vector of just the girl in the foreground but anything more than that would likely be too much to ask of someone. Sorry brah.
use waifu2x
/thread
>>95180
>1366x768
Firstly you need to learn how to use the internal screenshot feature of your player. Secondly you might want to give a better picture first. That one is pretty blurry and has artifacts when looked at closely (just look at the jaw line). Are you getting it from a BD rip? Also what ep and season? Or is it from the movie?
Can someone remove the background of this image?
>95170
I shouldn't be laughing over this but I am
>>95433
Thanks anon
Can you remove the background from this one as well to prevent me from making a new thread for it?
Does anyone know that one meme where a guy is walking down the sidewalk and then shitposts about it later, on 4chan? I need a template.
>>95133
Bump for you, I needed this the other day too.
>>95139
I am filled with hope.
I actually need this to make some OC and hopefully I can do it before the person I'm mocking gets banned
>>95142
http://knowyourmeme.com/memes/racists-on-4chan-niggerwalks
just found it!!!!!!!!!!
Lupin III
Cowboy Bebop
Outlaw Star
Trigun
Hellsing
Ghost in the Shell
Space Dandy
Eureka Seven; Holland
Wolf's Rain; Tsume
JoJo part 3; Joseph and Avdol
JoJo part 4; Jotaro
JoJo part 5; Jotaro
>>95117
Gintama
Gungrave
Darker than Black
The Legend of the Legendary Heroes
Monster
Speed Grapher
Shigurui
Black Jack
Welcome to the NHK
Nodame Cantabile
Usagi Drop
Sayonara Zetsubou Sensei
Wolf and Spice
Mushishi
Black Lagoon
Nana
Macross Plus
Space Brothers
Toriko
Cooking Papa
Kaiji
City Hunter
Rurouni Kenshin
Arakawa under the Bridge
Jesus, I could go on and on.
Berserk
Samurai Champloo
Fist of the North Star
Dead Leaves
Bubblegum Crisis (i think?)
JoJo, up until Diamond is Unbreakable
Strait Jacket
Perfect Blue
Blue Gender
Welcome to the NHK
Steins;Gate
There's a literal truckload. The "anime is all highschool" meme is just a meme.
Macross plus
Rakugo
Joker game
Mobile Suit Gundam CCA
Dai-Guard
I'm pretty sure the guy from Aoi Bungaku is over 20, but he's around college aged from what I remember.
Rage of Bahamut
Osomatsu-san
Dimension W
Gate
Death Parade
Ninja Slayer
Shirobako
Turning Girls
Sayonara Zetsubou Sensei
One Outs
Paprika
Patlabor
Golgo 13
So I finished watching Yu Yu hakusho and now i want more. Any recommendations on similar type of anime? Like where the characters start kind of normal but acquire more power in a step by step manner.
I've watched
>Dbz
>Bleach
>HunterXhunter
>Shaman king
Thanks.
So... something with action, decent characters and related to the paranormal then?
>>95102
Well yeah, and it would not hurt if they had a lot of episodes.
>>95105
Well, a few come to mind... and I know there are way more out there, but I personally don't know them. I can't say if they're good or bad since that's really up to personal taste so I'll just list the few I'm aware of.
>Hellsing
>Ghost Sweeper Mikami
>Ghost Stories (intentionally bad English dub)
>Witch Hunter Robin
>Kekkaishi
>Blood of the Immortal
>JoJo's Bizarre Adventure (technically)
>Mushishi
There's an entire list online that you can find and even further narrow down if you'd like. I haven't really seen all of what I've listed outside of a few... but those are the ones I'm familiar with at least.
Not the best of help, I know, but I tried. There was this weird anime I saw several years ago that dealt with black magic and humans who had to wear power suits called Molds, or something. Thought that was neat, but for the life of me I can't remember what the damn thing was called. Took place in a sort of alternate Victorian England.