Professional Documents
Culture Documents
OS Lec 3 & 4
OS Lec 3 & 4
SetFileSecurity() Chmod()
Protection InitlializeSecurityDescriptor() Umask()
SetSecurityDescriptorGroup () Chown()
Types of System Call
• open()
• The open() system call is used to provide access to a file in a file system. This system call allocates resources to the
file and provides a handle that the process uses to refer to the file. A file can be opened by multiple processes at the
same time or be restricted to one process. It all depends on the file organisation and file system.
• read()
• The read() system call is used to access data from a file that is stored in the file system. The file to read can be
identified by its file descriptor and it should be opened using open() before it can be read. In general, the read()
system calls takes three arguments i.e. the file descriptor, buffer which stores read data and number of bytes to be
read from the file.
• write()
• The write() system calls writes the data from a user buffer into a device such as a file. This system call is one of the
ways to output data from a program. In general, the write system calls takes three arguments i.e. file descriptor,
pointer to the buffer where data is stored and number of bytes to write from the buffer.
• close()
• The close() system call is used to terminate access to a file system. Using this system call means that the file is no
longer required by the program and so the buffers are flushed, the file metadata is updated and the file resources are
de-allocated.
System Program
• In an operating system a user is able to use different types of system programs and the system program is responsible
for all the application software performance of the computer.
• The system programs are responsible for the development and execution of a program and they can be used by the
help of system calls because system calls define different types of system programs for different tasks.
System Program
• File management − These programs create, delete, copy, rename, print, exit and generally manipulate the files and
directory.
• Status information − It is the information regarding input, output process, storage and the CPU utilization time how
the process will be calculated in how much memory required to perform a task is known by status information.
• Programming language supports − compiler, assembler, interrupt are programming language support used in the
operating system for a particular purpose in the computer.
• Programming Loading and execution − The needs to enter the program and after the loading of a program it needs
to execute the output of the programs and this task is also performed by system calls by the help of system programs.
• Communication − These services are provided by the user because by using this number of devices communicates
with each other by the help of device or wireless and communication is necessary for the operating system.
• Background services − There are different types of services available on the operating system for communication
and background service is used to change the background of your window and it also works for scanning and
detecting viruses in the computer.
Virtual Machine
• A virtual machine (VM) is a virtual environment which functions as a virtual computer system with its own CPU,
memory, network interface, and storage, created on a physical hardware system.
• VMs are isolated from the rest of the system, and multiple VMs can exist on a single piece of hardware, like a server.
That means, it as a simulated image of application software and operating system which is executed on a host
computer or a server.
• It has its own operating system and software that will facilitate the resources to virtual computers.
• Characteristics of virtual machines
• The characteristics of the virtual machines are as follows −
• Multiple OS systems use the same hardware and partition resources between virtual computers.
• Separate Security and configuration identity.
• Ability to move the virtual computers between the physical host computers as integrated files.
Virtual Machine
• Advantages of virtual machines
• Virtual machines are easy to manage and maintain, and they offer several advantages over physical machines:
• VMs can run multiple operating system environments on a single physical computer, saving physical space, time and
management costs.
• Virtual machines support legacy applications, reducing the cost of migrating to a new operating system. For example, a Linux
virtual machine running a distribution of Linux as the guest operating system can exist on a host server that is running a non-
Linux operating system, such as Windows.
• VMs can also provide integrated disaster recovery and application provisioning options.