Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
8 views6 pages

2nd CHP Osy

Download as docx, pdf, or txt
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 6

1.

draw micro kernel os structure


2.list services provided by os and explain any 4 of them(same for question 7)

1. Program Execution
The purpose of computer system is to allow the users to execute programs in an efficient manner. The
operating system provides an environment where the user can conveniently run these programs. The
user does not have to worry about the memory allocation or de-allocation or any other thing because
these things are taken care of by the operating system. To run a program, the program is required to be
loaded into the RAM first and then to assign CPU time for its execution. Operating system performs
this function for the convenience of the user. It also performs other important tasks like allocation and
de-allocation of memory, CPU scheduling etc.
2. I/O Operations
Each program requires an input and after processing the input submitted by user it produces output.
This involves the use of I/O devices. An I/O system in a computer manages communication between
the computer and devices like printers or scanners. To do this, the computer uses **device drivers**,
which are special programs. These drivers help the computer understand how to talk to the device
and send data in a way the device can understand. This allows the computer to control devices
without needing to know how the hardware works. The drivers also handle signals from the device
when it needs the computer's attention.

3. File System Manipulation


While working on the computer, generally a user is required to manipulate various types of files like
as opening a file, saving a file and deleting a file from the storage disk. This is an important task that
is also performed by the operating system. Thus operating system makes it easier for the user
programs to accomplish their task by providing the file system manipulation service.
4. Communication
In an operating system, communication refers to how different programs (or processes) share data
and information with each other. In a multitasking environment, multiple processes often run
simultaneously, and they may need to exchange data to perform tasks. The operating system manages
this by providing a way for the processes to communicate, usually through shared memory or
message passing.
8. **Protection System**: Keeps different programs running on a computer separate, so they don't
mess with each other.
9. **Accounting**: Keeps track of how much and what resources (like memory or processing power)
each user is using.

10. **Protection and Security**: Makes sure only the right people can use the computer by asking for
things like a username and password.
3. what is system calls explain any two types
A system call is a mechanism used by programs to request services from the operating system (OS).
In simpler terms, it is a way for a program to interact with the underlying system, such as accessing
hardware resources or performing privileged operations.
 System calls provide an interface between a user program and Operating System .
 The system calls expose the services offered by the operating system to user programs.
 These are set of functions methods. Most system calls are written in assembly language and are
machine
dependent.
 Numerous higher level languages such as ‘C’ also permit to make system calls directly.
1. Information Maintenance
System calls like `get process attributes()` and `set process attributes()` allow user programs to
interact with the operating system to gather or change details about a running process.

- **get process attributes()**: This call retrieves information about a process, such as its priority, state
(running, sleeping, etc.), memory usage, and other relevant details.
- **set process attributes()**: This call modifies certain properties of a process, like changing its
priority or limiting its resources (e.g., CPU or memory usage).

These system calls help in managing and optimizing processes in a system.1. get time or date, set time
or date
2. get system data, set system data
3. get process, file, or device attributes
4. set process, file, or device attributes
2. Process Control
Processes need to be controlled as in a running process must be able to halt its execution either
normally or
abnormally.Also one process may need to run some other process to complete its own execution. So
all these
system calls come under this category.
1. end, abort
2. load, execute
3. create process, terminate process
4. get process attributes, set process attributes
5. wait for time, wait event, signal event
6. allocate and free memory
B) File Management
To work with files, we need to perform several actions:

1. **Create** and **delete** files: We need to provide the file's name and possibly some details
about it.
2. **Open** a file: After creating a file, we need to open it to use it.
3. **Use the file**: We can read, write, or move around in the file (like rewinding or skipping to the
end).
4. **Close the file**: When we're done using the file, we close it.

If we organize files into folders, we need similar actions for those folders too. We also need to check
and change file details, like the name, type, or security settings. To do this, we use system calls like
**get file attributes** (to check details) and **set file attributes** (to change details). Some systems
have additional calls for tasks like moving or copying files. Other systems might offer programs or
tools that perform these tasks, which can be used by other programs like an API.
1. create file, delete file
2. open, close
3. read, write, reposition
4. get file attributes, set file attributes

4. list the components of os and list them in detail any 1


 process management
 memory management
 secondary storage management
 I/O management
 File management
 Protection
 Network management
 Command interpretation

File Management
A file is a collection of related information made by a user. Computers store files on disks (long-term
storage). Examples of storage are magnetic tapes, magnetic disks, and optical disks. Each type has
different speeds, storage sizes, and ways to get the data.y
Files are usually kept in folders to keep them organized. These folders can have files and other folders
inside them.
1. The creation and deletion of files.
2. The creation and deletion of directions.
3. The support of primitives for manipulating files and directions.
4. The mapping of files onto secondary storage.
5. The back up of files on stable storage media.

5. explain monolotic os structure and layered structure with diagram


6. describe any 4 secondary storage memory activities
Secondary storage is used to store data and programs that can't fit in the computer's main memory.
This storage is important because the main memory is limited in size and loses all its data when the
computer is turned off. Secondary storage, like hard drives or USB drives, holds data even when the
power is off. Programs and files, such as word processors or compilers, are kept on these storage
devices until they are needed and loaded into the computer's memory for use.
Activities:
 Free space management
 Storage allocation
 Storage de-allocation
 Disk scheduling.
To read a piece of data that is stored at the end of the file, one has to read all of the data that comes
before it-you
cannot jump directly to the desired data. This is similar to the way cassette tape players work. If one
wants to
listen to the last song on a cassette tape, he has to either fast-forward over all of the songs that come
before it or

listen to them. There is no way to jump directly to a specific song.

8.differnce between linux and unix

Differences Linux Unix

Origins Linux was developed in the 1990s by Linus Unix was developed in the 1970s at Bell Labs
Torvalds as a free and open-source alternative to
Differences Linux Unix

Unix.

Linux, on the other hand, is open-source software Unix is a proprietary operating system, meaning that it requires a
Licensing and can be used freely without any licensing fees. license to use.

File system supports – Ext2, Ext3, Ext4, Jfs,


File system supports – jfs, gpfs, hfs, hfs+, ufs, xfs, zfs
File system supports ReiserFS, Xfs, Btrfs, FAT, FAT32, NTFS

Linux provides two GUIs, KDE and Gnome. But Initially, Unix was a command-based OS, however later a GUI was
there are many other options. For example, LXDE, created called Common Desktop Environment. Most distributions now
Xfce, Unity, Mate, and so on. ship with Gnome.
Graphical User Interface

It is used everywhere from servers, PCs,


It is used on servers, workstations, and PCs.
Use Cases smartphones, tablets to mainframes.

Source Code Availability The source is accessible to the general public. The source is not accessible to the general public.

Some Linux versions Some Unix versions are SunOS, Solaris, SCO UNIX, AIX, HP/UX, ULTRIX,
Operating System Versions are Ubuntu, Debian GNU, Arch Linux, etc. etc.

9.explain how parameter is done while implementation of system call

Three general methods exist for passing parameters to the OS:

1. Parameters can be passed in registers.

2. When there are more parameters than registers, parameters can be stored in a block and the
block address

can be passed as a parameter to a register.

3. Parameters can also be pushed on or popped off the stack by the operating system.
10. Describe activities of I/0 system

An I/O system in a computer manages communication between the computer and devices like
printers or scanners. To do this, the computer uses **device drivers**, which are special programs.
These drivers help the computer understand how to talk to the device and send data in a way the
device can understand. This allows the computer to control devices without needing to know how
the hardware works. The drivers also handle signals from the device when it needs the computer's
attention.

Activities:

 Providing interfaces to other system components.

 Managing devices

 Transferring data

 Detecting I/O completion

11. explain booting process in detail with example

You might also like