In: Computer Science
A. Answer the following questions: Describe the two general roles of an operating system
and elaborate why these roles are important.
B. What is a process? What are attributes of a process?
C. Describe the three state process model, describe what transitions are valid between the
three states, and describe an event that might cause such a transition.
D. What is the function of the ready queue?
E.. What is the producer consumer problem? Give an example of its occurrence in operating
systems.
A. An operating system is an intermediate layer between hardware and application software.
1. The major role of an operating system is to ensure correct operation of the computer system. Dual mode of operation(User mode and Kernel mode), privileged instructions such as I/O instructions and halt instructions which can be executed only in kernel mode , memory protection,and timer interrupt are basic building blocks used by operating system to achieve correct operation.
2.The second general role of an operating system is to provide resource and memory management. An operating system manages memory by keeping track of what parts of memory are being used and by whom.It allocates and deallocates memory space and also manages space on mass storage devices.
B. A process is a program in execution.It consists of instructions written in machine language.It is an active entity and resides in main memory.It is a dynamic object.
Attributes of a process include Process ID, Program Counter, Process State, Prioirity, General Purpose Registers, List of open files and open devices.
C.Three-state process model is constituted of READY, RUNNING & WAITING. Processes entering the system initially go into the READY state.They leave the system from the RUNNING state. For these three states, the process occupies the space in main memory.
The possible transitions that are valid between the three states are :
D. The process that are residing in the main memory and are ready and waiting to execute are kept in ready queue.The queue exists to establish a fair and efficient order for processes to be executed.
PLEASE LIKE THE ANSWER IF YOU FIND IT HELPFUL OR YOU CAN COMMENT IF YOU NEED CLARITY / EXPLANATION ON ANY POINT.