List ?ve services provided by an operating system (OS). Explain how each service provides convenience to the users. Can some of the OS services be provided by user level programs?
- Error detection- Error detection is an OS service that is provided both at software and hardware level. Error detection at hardware level ensures that all data transfers are inspected to make sure the data is not corrupted in the process. For media, data is checked to make sure they are no changes since the last write operation. Error detection at software level ensures media is checked for data consistency. A user level program cannot be trusted for error detection thus the operating system handles all types of errors.
- File- system manipulation- User level programs cannot to be trusted with the process of file creation, naming, allocation or deletion. The operating system is entrusted to make sure that blocks of disk used by files are kept in track. The OS makes sure that during file deletion, the name file information of the file is removed and blocks are freed up. The operating system also ensures protection to make sure that files are accessed correctly
- I/O operations- communication to tapes, disks, serial lines and other devices must happen at low level (Dugan, 2013). The only thing that the user is supposed to specify is the device and the operation to be performed on the device and then the operating system converts the request into controller-specific or device-specific commands. User-level programs are not trustworthy when accessing devices they should have access to and accessing the devices when they are otherwise unused.
- Program execution- A user-level program cannot be trusted with allocation of CPU time thus the operating system loads sections or contents of a file into memory and begins execution.
- Communications- For communication to happen between systems messages must be converted into packets and then sent to the network controller, then transmitted across a communication medium and finally the message is reassembled by the systems at the destination. A user level program cannot be trusted with coordinating access to network devices or might even packets that are not intended for them.
It’s possible for some OS level services to be provided by user level programs for example memory management can be provided using user level programs.
To which extent are the two OS's (Linux/Unix and Windows) essentially the same and importantly different?
Windows and Unix/Linux are the same in terms of provision of system operating services like file system manipulation, error detection, I/O operations, program execution and communications among other services. Both operating system provide these services at operating system level.
They are essentially different on how they handle concurrent processing and that makes them different.
Discuss multiprocessing systems and explain how multiprocessing increases the utilisation of resources.
Multiprocessing can be defined as the use of more than one processor to process more than one program in a coordinated manner. Multiprocessing is of two types;
- Symmetric multiprocessing/ tightly coupled
- Massively parallel multiprocessing
Symmetric multiprocessing a single operating system is responsible for coordinating all the processors by making sure they share the main memory and the data path or Input/output Bus. This type of multiprocessing is commonly known as shared everything system and is usually about 16 processors.
Massively parallel multiprocessing is commonly known as loosely coupled processing. For this type of multiprocessing approximately 200 or more processors can work on the same application with each processor having its own operating system and memory. However, the data path between processors is shared allowing the processors to communicate. Configuration of this type of multiprocessing is very complicated and requires partitioning of the shared database among the processors so as to assign each processor a job. This type of system is known as shared nothing.
Multiprocessing increases the utilization of resources by running of one more than one process each on different cores while using the same peripherals and main memory. By running more than one process the main memory resources and peripherals are fully utilized. Multiprocessing as a concept is different from multiprogramming and the two should not be confused.
Illustrate the concept of batch processing operating system.
To understand batch processing we need to understand a batch job. A batch job is a job or task that runs without user interaction or can be scheduled to run if resources are available. Thus batch processing happens for those jobs that are executed with little user interaction. An example of a batch job is a program reading a very large file and then generating a report as output.
OS administration using command line interface (CLI)
- Create a new subdirectory called MN404-tempin your home directory.
- Create a new subdirectory called assign1in MN404-temp.
- Create a new subdirectory called assign2in MN404-temp.
- Display the contents of the directory MN404-temp.
- Delete the directory assign2.
- Display content of the directory MN404-temp
- Change your current working directory to MN404-temp.
- Create a new subdirectory called assign2 in MN404-temp.
- Create a new file called MyFile.txt using the touch command and insert two lines into the file.
- The first line should be a sentence that tells me your favourite movie.
- The second line should be a sentence that tells me your favourite food.
- Display the contents of the file MyFile.txt to the standard output (screen).
- Copy the file MyFile.txt to directory assign1 and rename it to t_1.txt.
- Change your working directory to assign1
- Make a copy of t_1.txt with the name t_2.txt (in the same directory).
- Display the contents of the directory assign1.
- Copy the t_1.txt file to directory assign2.
- Display the contents of the directory assign2.
D. Dugan, "Operating System Services", CS, 2013. [Online]. Available: https://www.cs.nmt.edu/~cs325/spring2013/Lec03-OSService.pdf. [Accessed: 02- May- 2018].