Operating System Short Notes
Operating System Short Notes
1. UNIX
a) File facilities
create (name, amode) Creates a new file called name with the specified access
permission given by amode.
open (name, oflag, amode) Opens the file name ; oflag specifies opening for reading,
writing, append etc; amode as above; returns a file
descriptor fd for used in other calls.
read(fd, buf, size) Reads up to size bytes form the file specified by fd (obtained
from open) into the user buffer buf.
write(fd, buf, count) Writes count bytes form the user buffer buf to the file
specified by fd.
Process facilities
signal(sig, func) Allows the calling process to control the handling of signals;
a user-supplied function identified by func can be activated
on receipt of the signal sig.
MS-DOS
MS-DOS doesnot use the term ‘system call’, but MS-DOS functions are
invoked by means of software interrupts.
These are generated by the machine code INT instruction which, when
executed, caused the processor to be
interrupted
Nachos: Virtual os environment
"Nachos" refers to "Not Another Completely Heuristic Operating System." It's an instructional
operating system used in computer science education. Nachos provides a simulated environment
where students can experiment with operating system concepts without needing real hardware or
risking system instability. This environment allows students to implement and test various operating
system functionalities, such as process management, memory management, file systems, and more,
within a controlled and virtual setting.
Argument commands or command like arguments-
User mode Vs Kernel mode
Layered approach:
It involves organizing the system into distinct layers, each responsible for a specific set of functions or
services.
Advantages:
Dis adv.:
Overhead, Inefficiency- Communication between layers often involves data copying and protocol
processing, which can lead to inefficiencies, Dependency issues.
Anticipatory fetching is a technique used in computer architecture and operating systems to improve
the performance of memory access by predicting the data that will be needed in the near future and
fetching it into the cache or memory ahead of time. This technique aims to reduce the latency
associated with accessing data.
2 types:
Pseudo code for start to ready state: