System Calls, System Programs, Operating-System Generation
System Calls, System Programs, Operating-System Generation
CS8493-OPERATING SYSTEMS
ROHINI COLLEGE OF ENGINEERING & TECHNOLOGY
• Parameters are generally passed to system calls via registers, or less commonly, by values
pushed onto the stack. Large blocks of data are generally accessed indirectly, through a
memory address passed in a register or on the stack, as shown in Figure
CS8493-OPERATING SYSTEMS
ROHINI COLLEGE OF ENGINEERING & TECHNOLOGY
CS8493-OPERATING SYSTEMS
ROHINI COLLEGE OF ENGINEERING & TECHNOLOGY
5. Communication
• Communication system calls create/delete communication connection, send/receive
messages, transfer status information, and attach/detach remote devices.
• The message passing model must support calls to:
• Identify a remote process and/or host with which to communicate.
• Establish a connection between the two processes.
• Open and close the connection as needed.
• Transmit messages along the connection.
• Wait for incoming messages, in either a blocking or non-blocking state.
• Delete the connection when no longer needed.
• The shared memory model must support calls to:
• Create and access memory that is shared amongst processes ( and threads. )
• Provide locking mechanisms restricting simultaneous access.
• Free up shared memory and/or dynamically allocate it as needed.
• Message passing is simpler and easier, ( particularly for inter-computer communications ),
and is generally appropriate for small amounts of data.
• Shared memory is faster, and is generally the better approach where large amounts
of data are to be shared, ( particularly when most processes are reading the data rather than
writing it, or at least when only one or a small number of processes need to change any given
data item. )
6. Protection
• Protection provides mechanisms for controlling which users / processes have access to
which system resources.
• System calls allow the access mechanisms to be adjusted as needed, and for non- privileged
users to be granted elevated access permissions under carefully controlled temporary
circumstances.
• Once only of concern on multi-user systems, protection is now important on all systems,
in the age of ubiquitous network connectivity.
CS8493-OPERATING SYSTEMS
ROHINI COLLEGE OF ENGINEERING & TECHNOLOGY
CS8493-OPERATING SYSTEMS
ROHINI COLLEGE OF ENGINEERING & TECHNOLOGY
• Systems sometimes need to be re-configured after the initial installation, to add additional
resources, capabilities, or to tune performance, logging, or security.
Information that is needed to configure an OS include:
• What CPU(s) are installed on the system, and what optional characteristics does each have?
• How much RAM is installed? ( This may be determined automatically, either at install or
boot time. )
• What devices are present? The OS needs to determine which device drivers to include,
as well as some device-specific characteristics and parameters.
• What OS options are desired, and what values to set for particular OS parameters.
The latter may include the size of the open file table, the number of buffers to use, process
scheduling (priority) parameters, disk scheduling algorithms, number of slots in the process
table, etc.
2 Options
• At one extreme the OS source code can be edited, re-compiled, and linked into a new
kernel.
• At the other extreme a system configuration may be entirely defined by table data, in which
case the "rebuilding" of the system merely requires editing data tables.
• Once a system has been regenerated, it is usually required to reboot the system to activate
the new kernel. Because there are possibilities for errors, most systems provide some
mechanism for booting to older or alternate kernels.
CS8493-OPERATING SYSTEMS
ROHINI COLLEGE OF ENGINEERING & TECHNOLOGY
All forms of ROM are also known as firmware, since their characteristics fall
somewhere between those of hardware and those of software.
A problem with firmware in general is that executing code there is slower than
executing code in RAM.
Some systems store the operating system in firmware and copy it to RAM for fast
execution.
A final issue with firmware is that it is relatively expensive, so usually only small
amounts are available.
For large operating systems the bootstrap loader is stored in firmware, and the
operating system is on disk.
The Bootstrap program has a piece of code that can read a single block at a fixed
location from disk into memory and execute the code from that Boot block.
The program stored in the boot block may be sophisticated enough to load the entire
operating system into memory and begin its execution.
A disk that has a Boot partition is called as a Boot Disk.
GRUB is an example of an open-source bootstrap program for Linux systems.
CS8493-OPERATING SYSTEMS