
168 Cal.App.4th 910 (2008)
In re KELVIN CANNON on Habeas Corpus.
In re ROBERT LUCA on Habeas Corpus.
Nos. A121142, A121143.
Court of Appeals of California, First District, Division One.
November 25, 2008.
*913 J. Frank McCabe, under appointment by the Court of Appeal, for Petitioners Kelvin Cannon and Robert Luca.
Edmund G. Brown, Jr., Attorney General, Dane R. Gillette, Chief Assistant Attorney General, Julie L. Garland, Assistant Attorney General, Jennifer A. Neill and Amy Daniel, Deputy Attorneys General, for Respondent State of California.

OPINION
MARGULIES, J.
Kelvin Cannon and Robert Luca (petitioners), inmates in a secured housing facility in state prison, filed similar petitions for habeas corpus contending that food service in the facility was inadequate. Following an evidentiary hearing, the trial court rejected most of their contentions, but it concluded that the prison was failing to fulfill its regulatory mandate to serve two hot meals daily to the prisoners. Because we conclude that petitioners failed to demonstrate that the prison's food service violated any of their constitutional or statutory rights, we reverse.

I. BACKGROUND
Petitioners filed separate petitions for habeas corpus relief with respect to the conditions of their confinement at the security housing unit (SHU) at Pelican Bay State Prison (prison). The trial court issued an order to show cause with respect to both petitions and consolidated them for hearing. We have consolidated the two appeals filed with respect to the trial court's order.
Both petitions raised a variety of concerns with respect to the meals served to SHU inmates. Following an evidentiary hearing, the trial court issued a written order rejecting most of petitioners' contentions, but it granted limited relief with respect to the temperature of the food served. Petitioners did not appeal with respect to their denied claims, but the prison's warden has appealed the relief granted against the prison. We discuss only the evidence related to this relief.
(1) Pursuant to statutory authority (Pen. Code. § 5058), the Department of Corrections and Rehabilitation (Department) has promulgated a regulation that requires inmates in state prisons to be "provided three meals each day, two of which shall be served hot." (Cal. Code Regs., tit. 15, § 3050, *914 subd. (a)(2).) Compliance with this regulation raises unique issues at the SHU because of the nature of the prisoners' confinement.
The SHU is designed to house inmates who "pose a definite and serious threat to the safety of others or themselves" or who are deemed "a threat to the security of the institution for escape, major destruction of property, or activities leading to disorder." SHU inmates are segregated from the remainder of the prison population. Their activities are subject to significant restrictions, and they are closely monitored. At the time of the hearing, there were nearly 1,100 inmates in the SHU, distributed among 22 separate units, with 48 inmates per unit.
Despite their isolation, SHU inmates receive the same food as other prison inmates. As a security precaution, SHU inmates are fed in their cells through a port in the cell door. The food is served to them on individual trays, known as "slammer trays," that are made of heavy plastic and thermally insulated. Slammer trays are designed to be stacked, with the bottom of one tray serving as the top of the tray beneath it, thereby insulating the lower tray.
Food for all the prison's inmates is prepared in a single central kitchen, from which it is transported to "satellite kitchens" for final preparation and distribution. After central kitchen preparation, the food is chilled quickly and stored until it is sent to the satellite kitchens, where it is reheated before serving. The reheating process is monitored to ensure that the food is reheated to a minimum of 165 degrees Fahrenheit, a treatment intended to protect against bacterial growth.
The SHU has its own satellite kitchen. Following reheating in the SHU satellite kitchen, the food is promptly transferred to large containers set in a line, maintained at a minimum of 140 degrees Fahrenheit. Slammer trays are passed down the line and filled with food by non-SHU inmate workers. The filled trays are stacked on an open cart for transport to a unit of the SHU. Each transport cart holds enough slammer trays to serve all the inmates in one SHU unit.
Once the trays for a particular SHU unit are prepared and stacked on a transport cart, correctional officers at the unit are called to pick up the cart from the kitchen. Pushing a transport cart from the satellite kitchen to an individual SHU unit takes about five minutes, but security and other delays can occasionally extend the time required for a correctional officer to pick up the cart from the satellite kitchen and transport it to the unit to 20 to 30 minutes. When the transport cart reaches the unit, a correctional officer must measure and record the temperature of the food. Temperature logs show that hot food typically ranges from 110 to 120 degrees Fahrenheit when it reaches *915 the units, although there are occasional readings outside this range. Testimony at the hearing placed 120 degrees Fahrenheit as the ideal temperature for consumption of hot food.
Once the temperature is recorded, the trays are distributed to the inmates, a process that requires 10 to 20 minutes. The correctional officers frequently change the order in which inmates are served to ensure that particular inmates are not consistently the last to receive their food. The total time elapsed from the end of the hot line to the SHU inmates' cells is typically from 20 to 45 minutes, but it can reach an hour in unusual circumstances.
Except as inherent in the process described above, there is no attempt to control the temperature of the food at the time it reaches SHU inmates, and the prison maintains no regulations specifying the temperature of food at the time of its delivery to their cells.
Although, as noted, the trial court rejected most of petitioners' claims, it held that the prison "has not satisfied the mandate" of the regulation requiring that inmates be served two hot meals per day. As the court held, "[t]hose involved in food service . . . . do not follow any standards with respect to temperature at time of delivery to the consumer. What does hot mean? Respondent tells us `served hot' simply means not served cold or `not cooked' . . . . [¶] . . . The plain meaning of `hot food' is a temperature range that is acceptable to most consumers. Respondent should determine that range and establish a preparation/serving procedure to assure a reasonable level of compliance. It should recognize that exigent circumstances may limit performance at times. The court orders respondent to do so and file and serve the proposed procedure within 90 days of service of the ruling."

II. DISCUSSION
The warden has appealed the trial court's judgment, contending that the trial court lacked the discretion to substitute its judgment for the judgment of the prison in the manner of serving hot meals.

A. The Appropriate Standard for Relief

(2) Before addressing this contention, we note that we do not share the assumptions of the trial court and the parties with respect to the appropriate standard for awarding habeas corpus relief. "The function of habeas corpus has evolved from the traditional remedy for release of a prisoner to include a declaration of rights of a prisoner not entitled to outright release. [Citations.] The writ of habeas corpus may be used to secure fundamental rights of a person lawfully in custody." (In re Brindle (1979) 91 Cal.App.3d 660, 669 *916 [154 Cal.Rptr. 563], italics added; see In re Riddle (1962) 57 Cal.2d 848, 851 [22 Cal.Rptr. 472, 372 P.2d 304] [writ of habeas corpus can be used to protect "fundamental basic rights" of prisoners].) More recent cases have dropped the limitation to "fundamental" rights, stating that the writ of habeas corpus can be used by inmates to address a deprivation of their "rights" while in confinement. (In re Arias (1986) 42 Cal.3d 667, 678 [230 Cal.Rptr. 505, 725 P.2d 664], abrogated by statute on another point as recognized in Thompson v. Department of Corrections (2001) 25 Cal.4th 117, 130 [105 Cal.Rptr.2d 46, 18 P.3d 1198]; In re Davis (1979) 25 Cal.3d 384, 387 [158 Cal.Rptr. 384, 599 P.2d 690].) Most recently, In re Bode (1999) 74 Cal.App.4th 1002 [88 Cal.Rptr.2d 536], was willing to entertain a habeas corpus writ alleging a violation of inmate statutory rights, without discussing the appropriateness of such relief.
(3) There can be little doubt that petitioners have a right to the provision of proper nourishment while incarcerated, and we do not question the trial court's decision to conduct an evidentiary hearing with respect to the broad range of complaints tendered by petitioners in their writ petitions with respect to their food. At the hearing, however, it became clear, as the trial court effectively held by rejecting the bulk of petitioners' contentions, that SHU food service is not so deficient as to threaten petitioners' right to proper nourishment while in custody. (See LeMaire v. Maass (9th Cir. 1993) 12 F.3d 1444, 1456 ["The Eighth Amendment requires only that prisoners receive food that is adequate to maintain health; it need not be tasty or aesthetically pleasing."].)
(4) Rather than denying the petitions on the basis that petitioners' had failed to show a violation of their rights, the court proceeded to grant them relief upon finding that the prison is not in compliance with a food service regulation promulgated by the Department. We are unaware of any decision holding that prisoners have a constitutional, fundamental, or indeed any right to have a prison comply with its internal regulations, so long as the claimed violation of the regulations does not otherwise violate the prisoners' rights. The writ of habeas corpus was expanded to permit lawfully incarcerated inmates to challenge the conditions of their confinement to ensure that, while in confinement, their basic rights are respected. It was not intended to provide them a means to micromanage the prison. Because there has been no demonstration that petitioners have a constitutional or statutory right to be served two meals per day of hot food, the petitions should have been denied on the ground that petitioners failed to demonstrate the necessary prerequisite for habeas corpus relief: a violation of their rights.[1]


*917 B. Administrative Review

(5) Instead of dismissing the habeas corpus petitions for failure to demonstrate a violation of inmate rights, the trial court treated them as though they were petitions for a writ of mandamus and evaluated the prison's compliance with and interpretation of its own regulation. It is the writ of mandate, not habeas corpus, that is "the traditional remedy for the failure of a public official to perform a legal duty." (Common Cause v. Board of Supervisors (1989) 49 Cal.3d 432, 442 [261 Cal.Rptr. 574, 777 P.2d 610].) On appeal, the warden has implicitly acceded to this treatment of the petitions, raising only the contention that the trial court exceeded its proper role by substituting its own judgment for that of the prison.
(6) As suggested above, we do not believe that applying an administrative standard of review in these circumstances is appropriate.[2] Even assuming, however, that it was proper to treat these as petitions for administrative mandamus, the trial court's decision was flawed. "As a general matter, courts will be deferential to government agency interpretations of their own regulations, particularly when the interpretation involves matters within the agency's expertise and does not plainly conflict with a statutory mandate. . . . [W]e will not disturb the agency's determination without a demonstration that it is clearly unreasonable." (Environmental Protection & Information Center v. California Dept. of Forestry & Fire Protection (2008) 44 Cal.4th 459, 490 [80 Cal.Rptr.3d 28, 187 P.3d 888], citation omitted.) This is particularly true with respect to regulations governing prison administration, since "courts are ill equipped to deal with the complex and difficult problems of prison administration and reform, which are not readily susceptible to resolution by court decree. `Running a prison is an inordinately difficult undertaking that requires expertise, planning, and the commitment of resources, all of which are peculiarly within the province of the legislative and executive branches of government. Prison administration is, moreover, a task that has been committed to the responsibility of those branches, and separation of powers concerns counsel a policy of judicial restraint.'" (In re Collins (2001) 86 Cal.App.4th *918 1176, 1182 [104 Cal.Rptr.2d 108].) "Because trial and appellate courts perform the same function in mandamus actions, an appellate court reviews the agency's action de novo." (Sequoia Union High School Dist. v. Aurora Charter High School (2003) 112 Cal.App.4th 185, 195 [5 Cal.Rptr.3d 86].)
The relevant portion of the regulation construed by the trial court reads as follows:
"(a) Each inmate shall be provided a wholesome, nutritionally balanced diet. . . .
"(1) Inmates confined in segregated housing shall be served food representative of that being served to general population inmates. Food shall not be withheld nor standard menu varied as a disciplinary sanction for any inmate.
"(2) Inmates shall be provided three meals each day, two of which shall be served hot. Variations to the two hot meals per day requirement may be allowed to accommodate religious observances, religious meal programs, and institution emergencies. . . ." (Cal. Code Regs., tit. 15, § 3050.)
The trial court adopted its own interpretation of the term "served hot," which the court found to constitute the plain meaning of the termthe "temperature range that is acceptable to most consumers." The trial court's legal task, however, was not to select the most appropriate, desirable, or plain meaning for the regulatory language and impose that meaning on the prison. The trial court's limited task was to determine whether the prison's own interpretation of the regulation was "clearly unreasonable" under the circumstances. (Environmental Protection & Information Center v. California Dept. of Forestry & Fire Protection, supra, 44 Cal.4th at p. 490.)
(7) The prison contends that its interpretation of "served hot" is that "two inmate meals per day must be heated before serving and then served as quickly as possible."[3] Particularly given the special circumstances prevailing at the SHU, this interpretation is not clearly unreasonable. The security *919 measures required in the SHU make food service more challenging than serving the general population. As a result, "serving" inmates in the SHU is a process that begins when the food is transferred to the slammer trays and ends when those trays are given to the inmates. To define the phrase "served hot" to require the food to be very hot (about 140 degrees Fahrenheit) at the time the food is placed in insulated trays and to transport the insulated trays promptly to the inmates is a reasonable means of coping with the special demands of the SHU, while satisfying the language of the regulation. The regulation itself recognizes that it will not be possible to provide SHU inmates precisely the same food service as the general population, stating that "[i]nmates confined in segregated housing shall be served food representative of that being served to general population inmates." (Cal. Code Regs., tit. 15, § 3050, subd. (a)(1), italics added.)
Contrary to the trial court's holding, there is nothing in the language of the regulation that requires food to be presented to the inmates at the most aesthetically pleasing temperature. Further, the trial court disregarded entirely the traditional "`policy of judicial restraint'" exercised toward prison administration. (In re Collins, supra, 86 Cal.App.4th at p. 1182.) It is plain from the testimony at the hearing that the prison takes pains to provide hot meals to SHU inmates within the constraints that SHU security imposes. The court proceeded to impose its own interpretation without any apparent regard for the practical implications of that interpretation on prison administration.
Nor is there substantial evidence that the prison regularly violates its regulation, as properly interpreted. There is no question that the food is hot when transferred to the slammer trays, and the responsible correctional officers testified that they pick up the trays and distribute them to inmates as promptly as security conditions permit. There was no evidence that this process regularly results in the serving of cold meals. Rather, the temperature logs showed that hot food virtually always arrives at the SHU units above room temperature, generally within a few degrees of the 120 degrees Fahrenheit considered ideal for consumption. While it is entirely possible that, as petitioners testified, their food is sometimes served to them lukewarm or cold, the temperature records suggest this is the exception, not the rule.
(8) Because the trial court imposed its own interpretation of the regulation rather than affording proper deference to the prison's interpretation, and because there is no substantial evidence to support the trial court's judgment that the prison regularly violates the regulation, the court's ruling was clearly in error, even applying mandamus review.


*920 III. DISPOSITION
The portion of the trial court's judgment awarding relief to petitioners is reversed, and the matter is remanded to the trial court for entry of judgment for the warden.
Marchiano, P. J., and Swager, J., concurred.
NOTES
[1]  Without expressly acknowledging this problem, petitioners make the conclusory argument, "For SHU inmates to receive `hot' foods at a temperature which is undetermined, and in fact unknown, by [the Department] at the time it is served to the inmates while general population inmates are served `hot' food at 140?, is a denial of equal protection of the law." No authority is cited for this proposition, and petitioners make no attempt to analyze their contention under accepted equal protection doctrine. In fact, SHU prisoners do not constitute a protected class, and the different confinement conditions of the SHU inmates and the general population plainly provide a rational justification for the disparate treatment. (See, e.g., Nevada Dept. of Human Resources v. Hibbs (2003) 538 U.S. 721, 735-736 [155 L.Ed.2d 953, 123 S.Ct. 1972]; Williams v. Rhodes (1968) 393 U.S. 23, 30 [21 L.Ed.2d 24, 89 S.Ct. 5] ["this Court has firmly established the principle that the Equal Protection Clause does not make every minor difference in the application of laws to different groups a violation of our Constitution"].)
[2]  We do so only because the warden has argued the case in this manner.
[3]  This is a different interpretation from the prison's contention at trial that "hot" meant cooked and warm. Regardless of the argument made by counsel in the trial court, however, it is plain from the prison's food service practices in the SHU that it has always interpreted the regulation to have exactly the meaning now argued.

In any event, we do not find clearly unreasonable the interpretation offered to the trial court: two meals per day of food that is cooked, rather than raw, and not cold at the time it is passed to the inmate. The term "served hot" clearly requires food to be cooked, rather than raw. Further, the term suggests that the temperature be elevated above room temperature. Otherwise, the food would be perceived as cold. Both of these components are present in the prison's interpretation.
