Notes
Notes
• New: A process that has just been created but has not yet been admitted to the pool of
executable processes by the OS. Typically, a new process has not yet been loaded into main
memory, although its process control block has been created.
• Running: The process that is currently being executed. For this chapter, we will assume a
computer with a single processor, so at most one process at a time can be in this state.
• Ready: A process that is prepared to execute when given the opportunity.
• Blocked/Waiting:4 A process that cannot execute until some event occurs, such as the
completion of an I/O operation.
• Exit: A process that has been released from the pool of executable processes by the OS,
either because it halted or because it aborted for some reason.
3) Describe Microkernel with a diagram.
This structure designs the operating system by removing all non-essential components from
the kernel and implementing them as system and user programs.
This result in a smaller kernel called the micro-kernel.
Advantages of this structure are that all new services need to be added to user space and
does not require the kernel to be modified.
Thus it is more secure and reliable as if a service fails then rest of the operating system
remains untouched. Mac OS is an example of this type of OS.
• Process control
o end, abort
o load, execute
o create process, terminate process
o get process attributes, set process attributes
o wait for time
o wait event, signal event
o allocate and free memory
• File management
o create file, delete file
o open, close
o read, write, reposition
o get file attributes, set file attributes
• Device management
o request device, release device
o read, write, reposition
o get device attributes, set device attributes
o logically attach or detach devices
• Information maintenance
o get time or date, set time or date
o get system data, set system data
o get process, file, or device attributes
o set process, file, or device attributes
• C ommunica tions
o create, delete communication connection
o send, receive messages
o transfer status information
o attach or detach remote devices
8) Explain Layered structure.
• An OS can be broken into pieces and retain much more control on system.
• In this structure the OS is broken into number of layers (levels).
• The bottom layer (layer 0) is the hardware and the topmost layer (layer N) is the user
interface.
• These layers are so designed that each layer uses the functions of the lower level layers only.
• This simplifies the debugging process as if lower level layers are debugged and an error
occurs during debugging then the error must be on that layer only as the lower level layers
have already been debugged.
chmod is a command that lets you change the permissions of a file or directory to all types of
users. You can grant or revoke the permission by using chmod command.
CPU Utilization
Binary Semaphores: The binary semaphores are like counting semaphores but their value is
restricted to 0 and 1. The wait operation only works when the semaphore is 1 and the signal
operation succeeds when semaphore is 0. It is sometimes easier to implement binary
semaphores than counting semaphores.
Advantages of IPC:
• Enables processes to communicate with each other and share resources, leading to
increased efficiency and flexibility.
• Facilitates coordination between multiple processes, leading to better overall system
performance.
• Allows for the creation of distributed systems that can span multiple computers or networks.
Disadvantages of IPC:
• Increases system complexity, making it harder to design, implement, and debug.
• Can introduce security vulnerabilities, as processes may be able to access or modify data
belonging to other processes.
17)
1. Draw Gantt chart for FCFS, SJF(Preemptive) and Round Robin (Quantum=2). 2.
Also calculate average waiting time and turnaround time for above scheduling
algorithms.