OS Assignemnt
OS Assignemnt
Submitted by:
Aiyesha Afzaal
Roll no:
22-ARID-4351
Department:
BS (computer science)
Submitted to:
Mam Iqra Saleem
Question no 1:
Explain the main components of an operating system, including:
1.Kernel:
The kernel is the core part of the OS. It acts as a bridge between applications and the
hardware. Think of it as the manager that coordinates everything happening in the
system. It handles requests from programs and translates them into actions performed
by the hardware.
2.Process Management:
This component manages all the processes (running programs) in the system. It
makes sure that each program gets enough CPU time to run efficiently, handles
switching between programs (context switching), and manages their states (like running,
waiting, or terminated).
3.Memory Management:
Memory management is responsible for keeping track of each byte in a computer’s
memory. It allocates memory to programs when they need it and frees it up when they’re
done. It ensures that one program doesn’t use memory allocated to another program,
preventing crashes.
5.Device Management:
This component manages all hardware devices, like printers, disks, and network
cards. The OS communicates with these devices through drivers, which are special
programs that allow the OS to control hardware and perform actions like printing or
reading data.
Types of Kernels
- Monolithic Kernel:
This type includes all essential services like process management, memory
management, and device drivers in one large block of code. It can be fast because
everything runs in the same space.
- Microkernel:
This type runs only the most basic services in the kernel, while other services run in
user space. This makes it more modular and easier to maintain but can be slower due to
more communication overhead between components.
-Hybrid Kerne:
This combines aspects of both monolithic and microkernels. It includes some services
in the kernel for performance but keeps others modular for flexibility.
- Process Management:
The OS keeps a list of all running processes and their states. It uses a scheduler to
determine which process runs at any given time, ensuring that CPU time is shared fairly.
- Memory Management:
The OS uses a technique called paging to break memory into blocks and allocates
these blocks to processes as needed. It also uses a memory map to keep track of what
memory is in use and what is free.
- File Systems:
Common types include FAT (File Allocation Table), NTFS (New Technology File
System), and ext4 (Fourth Extended Filesystem). Each has its own way of organizing
and accessing files. The OS provides APIs (Application Programming Interfaces) for
applications to interact with these file systems.
Examples:
- Early mainframe systems lie IBM’s OS/360.
Typical Applications:
- Used in environments where large volumes of similar tasks are processed, like payroll
systems or data processing jobs.
Advantages:
- Efficient use of system resources since jobs are processed in groups.
- Reduces idle time for the CPU.
Examples:
- UNIX, Linux, and Windows with multiple user sessions.
Typical Applications:
- Multi-user systems like servers or educational environments.
Advantages:
- Efficient for interactive tasks; users can run programs simultaneously.
- Maximizes CPU usage and provides fast response times.
3. Distributed Operating Systems
Key Characteristics:
- Manages a group of distinct computers and makes them appear as a single system to
users.
- Resources are shared across multiple machines.
Examples:
- Google’s Android, Apache Hadoop.
Typical Applications:
- Cloud computing, web hosting services, and large-scale data processing.
Advantages:
- Improved resource utilization and fault tolerance.
- Scalability, as new machines can be added easily.
4. Network Operating Systems
Key Characteristics:
- Designed to manage network resources and enable communication between devices.
- Provides services like file sharing, printer access, and communication protocols.
Examples:
- Microsoft Windows Server, Novell NetWare.
Typical Applications:
- Business networks, where multiple computers need to connect and share resources.
Advantages:
- Centralized management of resources.
- Facilitates communication and collaboration among users.
5. Real-Time Operating Systems (RTOS)
Key Characteristics:
- Designed to respond to inputs within a guaranteed time frame.
- Predictability and timing are crucial for the system’s function.
Examples:
- VxWorks, QNX.
Typical Applications:
- Embedded systems, industrial automation, medical devices, and automotive systems.
Advantages:
- High reliability for systems that must operate without delays.