Digital movies, video clips and music are becoming an increasingly common way to present information and entertainment using a computer. In multimedia applications, a lot of data manipulation (e.g. A/D, D/A and format conversion) is required and this involves a lot of data transfer, which consumes many resources. The integration of discrete and continuous multimedia data demands additional services from many operating system components. The major aspect in this context is real-time processing of continuous media data.
An operating system whose primary job is serving videos would differ from a traditional operating system in three ways.
The File System
6.1 PROCESS SCHEDULING
For the processing of audio and video, multimedia application demands that humans perceive these media in a natural, error-free way. These continuous media data originate at sources like microphones, cameras and files. If all that the system is doing is serving videos, and if all of the videos have the same frame rate, video resolution, etc, then process scheduling is very simple. Each video has a thread which reads one frame at a time and sends it to the user. Round Robin is a perfect scheduling algorithm for this. But you need a timing mechanism to make sure that each process runs at the correct frequency. Run a clock with 30 ticks per second. At each tick, all threads are run sequentially in the same order, when a thread is done, it issues a suspend system call that releases the CPU. This algorithm works perfectly as long as the number of threads is small enough. But there is a problem. The frame sizes for MPEG differ in size, and processes come and go.
6.2 THE FILE SYSTEM
Need for file system:
Computers must store large amount of data so that it does not have to rely on its limited address space during processing.
The termination of a process should not alter (or take away) the data stored.
Stored data should be shared by multiple processes that may need that data simultaneously.
The file system thus enables the computer handles processes better and more efficiently. Operating systems support file systems to enable the computer operate at the most efficiency.
6.3 DISK SCHEDULING
Disk scheduling is where operating systems allocates resources to of I/O requests arriving for disk. Disk scheduling is also known as I/O scheduling. Disk scheduling is important because:
Multiple I/O requests may arrive by different processes and only one I/O request can be served at a time by disk controller.
File systems must be accessed in an efficient manner - this is so especially with hard drives, which are the slowest to access.
In multiple processes over a period of time, a list of requests to access the disk builds up. For efficiency purposes, all requests (from all processes) are aggregated together. The technique that the operating system uses to determine which requests to satisfy first is called disk scheduling.