The Student Room Group

Job queuing and file systems

Bit of help needed, since I cant currently get to the uni library.

Not 100% with job queuing. Can anyone suggest a circumstance when a job may be prioritised in an OS's run queue?

And with file systems I understand the concept of blocks of fixed size being used to organise them. However I'm not sure why choosing a small block size is any better than using one which is supposedly bigger.

If anyone could enlighten me I would be grateful.
Reply 1
steadyg
Bit of help needed, since I cant currently get to the uni library.

Not 100% with job queuing. Can anyone suggest a circumstance when a job may be prioritised in an OS's run queue?

And with file systems I understand the concept of blocks of fixed size being used to organise them. However I'm not sure why choosing a small block size is any better than using one which is supposedly bigger.

If anyone could enlighten me I would be grateful.


Think of the file system one like this.
You have 5x100ml cups. Imagine you fill all the cups up half way. You cannot use the extra space if they were blocks i.e. 250ml wasted.
If you had 10x50ml cups instead, you would be able to use that extra 250ml.
Pretty poor explanation...does it help at all?
Reply 2
Chrosson
Think of the file system one like this.
You have 5x100ml cups. Imagine you fill all the cups up half way. You cannot use the extra space if they were blocks i.e. 250ml wasted.
If you had 10x50ml cups instead, you would be able to use that extra 250ml.
Pretty poor explanation...does it help at all?


Erm so you're saying its better to use bigger ones because you can store more in less?
Or perhaps better to use smaller so that they are fully fulfilled?
The notes I have seem to suggest the opposite I believe?
Reply 3
steadyg
Erm so you're saying its better to use bigger ones because you can store more in less?
Or perhaps better to use smaller so that they are fully fulfilled?
The notes I have seem to suggest the opposite I believe?


Ok, my explanation was crap.
It's better to have small blocks.
When a file uses a block, any unused space at the end of the block is permanently lost (until the file is deleted).

With bigger blocks, there is more wasted space with small files. This is bad. With smaller blocks, less space is wasted.

With a (theoretical) block size of 1bit, there is no wasted space at all - you can use the whole content of the disk. With a block size of the whole disk, you can only store 1 file. The remainder is wasted.
Reply 4
Chrosson
Ok, my explanation was crap.
It's better to have small blocks.
When a file uses a block, any unused space at the end of the block is permanently lost (until the file is deleted).

With bigger blocks, there is more wasted space with small files. This is bad. With smaller blocks, less space is wasted.

With a (theoretical) block size of 1bit, there is no wasted space at all - you can use the whole content of the disk. With a block size of the whole disk, you can only store 1 file. The remainder is wasted.


Yeah i think this plus the resources found on the net does make this a lot more understandable, thank you. I dont suppose you have any insight on the job queue question as well?
Reply 5
steadyg
Yeah i think this plus the resources found on the net does make this a lot more understandable, thank you. I dont suppose you have any insight on the job queue question as well?


I'll think about it for tomorrow.
First I need to refresh my memory on 1) What exactly job queues are and 2) how the hell they work.
Reply 6
Chrosson
I'll think about it for tomorrow.
First I need to refresh my memory on 1) What exactly job queues are and 2) how the hell they work.

Ah ok well ta for the help so far anyways budd
Reply 7
steadyg
Not 100% with job queuing. Can anyone suggest a circumstance when a job may be prioritised in an OS's run queue?


Could you enlighten me as to what you mean by run queue?
Would http://en.wikipedia.org/wiki/Run_queue be what you've learnt (i.e. all processes sit on the run queue and take it in turns to give the processor a go)?

Latest

Trending

Trending