what is the difference b/n multi programming and multi tasking (time sharing) ?
From the best I can tell, the biggest difference is that multiprogramming has to wait until the process that is currently running gets to a stopping point before shifting gears. So, in this scenario Process A will be allowed to monopolize the CPU until it gets to a waiting point. At this point the OS will allow Process B to run until it gets to a stopping point. In multitasking, there is no such waiting. Tasks are started and stopped many times a second as needed by the Operating System, regardless of whether or not they've reached a stopping point. Of course, I could be off base on that.
so is it like at some point of time..processor handles a single task in multi programmin nd a many tasks in multi tasking.............nd anything related to user intervention?
So, you've got to keep in mind that at a single point in time one processor can only be doing one thing. Multi-tasking, in essence, is just dividing the amount of time the processor spends on each thing into such small chunks that you don't see it happening. Of course, if you have a multi-core machine, like many of them are these days, you *can* do multiple things at once. Each core can do one thing at a time. Not sure on the user intervention. Once again, not my area of expertise. :\
Multiprogramming means that there are many programs in the main memory but only can be executed at once. Example, you open Word and Latex (a text editor), so u can see that they are opened together but when you type in word, what do u think is happening on Latex ?! Well easily, nothing, it's not doing anything just waiting. That's what we called multiprogramming. Multitasking, you have many process executing in parallel, so the CPU switch between then in a very small time that the user can't notice. Example, you open word and you are listening to some thing in media player for example (Not music, I don't like it haha), so what is happening in this case? Sure, you can type in word and listen at the same time, and this is multitasking. And in the two cases there is no user intervention, because everything is controlled by the OS.
oh thanks.......i get it now......
wait playing an audio file - i dont think it has any intervention like it's a continuos process..........so is coz of multi tasking by a single processor.....um i mean with a single core processor..
@A.Avinash_Goutham excuse me, I didn't get what you want to say !
like in farm's reply he mentioned 'bout multi tasking is coz of different cores nd i read it is coz of swtiching b/n different tasks.......coz of intervals b/n the tasks like getting input r say displaying output......but in that music player anology........playing music is continuos so.....there wud be no switching b/n the tasks? r is it coz of multicore processors(actually i dont think so coz devices with single core processors do play music nd do some other job @ the same time) if so how is that possible?
Yeah if you notice well what I write, I said the time of switching is very very small, the user can't notice it, so also in the case of the player there is a switching. Also you should know that for the CPU all those are processes, i mean the CPU can't distinct between if this is a player or word or IDE, for the CPU all are the same (a set of instructions that he must execute that's all).
yea i kno that cpu cant distinguish but it's kinda hard to digest that playing an audio file is not continuous or may be it is like the file is loaded in an out put buffer nd a timer is initiated nd wen time s up a system call is generated.....
thank you @ktobah nd @farmdawgnation ....u helped me a lot regarding this
You are welcome @A.Avinash_Goutham , I will put this is my memory, and when I back to univ, I will ask about it, I hope I will not forget lol!
Join our real-time social learning platform and learn together with your friends!